• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 402
  • Last Modified:

Perl script error: Can't locate object method "getError"

I have two servers running a script. one server works fine and the other gets an error. The perl directories on both servers are identical.

here is the error:
Can't locate object method "getError" via package "Sms::DbUtils" at utilities.pl
 line 286.

here is that part of teh code:
sub retrieveConfiguration_new
{
      my ($db,$t_config,$system_id,$configName,$logFileName) = @_;
      my ($data_type, $value1, $value2);
      my $sql = "SELECT data_type, value1, value2 FROM $t_config WHERE system_id = '$system_id' AND name = '$configName' AND enabled = '1'";      
      my %row = $db->getRow($sql);
      $dbError = $db->getError();                <-- this is line 286
      if ($dbError!~/^\s*$/)
      {
            &trace($logFileName,$sql);
            &trace($logFileName,$dbError);
            exit(1);
0
satmetrix_it
Asked:
satmetrix_it
  • 2
1 Solution
 
satmetrix_itAuthor Commented:
I was able to figure it out. I was missing an environment variable.

perllib value=./perlmod;../perlmod
0
 
satmetrix_itAuthor Commented:
This was teh fix.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now