• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 413
  • 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*$/)
  • 2
1 Solution
satmetrix_itAuthor Commented:
I was able to figure it out. I was missing an environment variable.

perllib value=./perlmod;../perlmod
satmetrix_itAuthor Commented:
This was teh fix.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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