F
francois.x.hetu
Hi,
I have this subroutine, called periodically by cron, which always gives
out this error:
Cron <otrs at xxx> $HOME/bin/GenericAgent.pl -c db >> /dev/null
DBI::db=HASH(0xa778fd8)->disconnect invalidates 1 active statement
handle
(either destroy statement handles or call finish on them before
disconnecting) at /opt/otrs/Kernel/System/DB.pm line 219, <PRODUCT>
line 4.
Here is the subroutine:
sub Disconnect {
my $Self = shift;
# debug
if ($Self->{Debug} > 2) {
$Self->{LogObject}->Log(
Caller => 1,
Priority => 'debug',
Message => "DB.pm->Disconnect",
);
}
#$Self->{dbh}->finish() if ($Self->{dbh});
# do disconnect
$Self->{dbh}->disconnect() if ($Self->{dbh});
return 1;
}
I tried to put the line, as above (not commented out off course):
$Self->{dbh}->finish() if ($Self->{dbh});
This in turn gave me this error:
Cron $HOME/bin/GenericAgent.pl -c db >> /dev/null
(in cleanup) Can't locate object method "finish" via package "DBI::db"
at
/opt/otrs/Kernel/System/DB.pm line 220, <PRODUCT> line 4.
Or:
Cron $HOME/bin/PostMasterPOP3.pl >> /dev/null
(in cleanup) Can't call method "finish" on an undefined value at
/opt/otrs/Kernel/System/DB.pm line 220, <PRODUCT> line 4 during global
destruction.
Being new to the Perl universe, I'm a little baffled by those errors.
I'm looking for a practical way to remove all error messages linked to
the use of disconnect(), especially since those errors do not, it
seems, help me target a real problem: from what I gather, all db
operations run fine.
Thanks
François
I have this subroutine, called periodically by cron, which always gives
out this error:
Cron <otrs at xxx> $HOME/bin/GenericAgent.pl -c db >> /dev/null
DBI::db=HASH(0xa778fd8)->disconnect invalidates 1 active statement
handle
(either destroy statement handles or call finish on them before
disconnecting) at /opt/otrs/Kernel/System/DB.pm line 219, <PRODUCT>
line 4.
Here is the subroutine:
sub Disconnect {
my $Self = shift;
# debug
if ($Self->{Debug} > 2) {
$Self->{LogObject}->Log(
Caller => 1,
Priority => 'debug',
Message => "DB.pm->Disconnect",
);
}
#$Self->{dbh}->finish() if ($Self->{dbh});
# do disconnect
$Self->{dbh}->disconnect() if ($Self->{dbh});
return 1;
}
I tried to put the line, as above (not commented out off course):
$Self->{dbh}->finish() if ($Self->{dbh});
This in turn gave me this error:
Cron $HOME/bin/GenericAgent.pl -c db >> /dev/null
(in cleanup) Can't locate object method "finish" via package "DBI::db"
at
/opt/otrs/Kernel/System/DB.pm line 220, <PRODUCT> line 4.
Or:
Cron $HOME/bin/PostMasterPOP3.pl >> /dev/null
(in cleanup) Can't call method "finish" on an undefined value at
/opt/otrs/Kernel/System/DB.pm line 220, <PRODUCT> line 4 during global
destruction.
Being new to the Perl universe, I'm a little baffled by those errors.
I'm looking for a practical way to remove all error messages linked to
the use of disconnect(), especially since those errors do not, it
seems, help me target a real problem: from what I gather, all db
operations run fine.
Thanks
François