[rt-users] Can't call method "Id" without a package or object reference

Ruslan Zakirov ruz at bestpractical.com
Wed Jul 27 17:48:56 EDT 2011


On Thu, Jul 28, 2011 at 12:57 AM, mattbookpro <matthew.forero at temple.edu> wrote:
>
> I have searched high and low all over Google to solve this issue with no
> luck.
>
> This is a fresh install and the error I'm getting is during "make
> initialize-database". I have followed all the instructions completely and
> accurately (and multiple times).
>
> Your help is hugely, greatly appreciated.
>
>
> OS: RHEL 5.5 64-bit
>
> Excerpt of error:
>
> [root at pts1 rt-4.0.1]# make initialize-database
> /usr/bin/perl -I/opt/rt4/local/lib -I/opt/rt4/lib sbin/rt-setup-database
> --action init --prompt-for-dba-password
> Subroutine _InitSQL redefined at
> /usr/lib/perl5/vendor_perl/5.8.8/RT/Tickets_Overlay_SQL.pm line 63.
> Subroutine _SQLLimit redefined at
> /usr/lib/perl5/vendor_perl/5.8.8/RT/Tickets_Overlay_SQL.pm line 87.
> Subroutine _SQLJoin redefined at
> /usr/lib/perl5/vendor_perl/5.8.8/RT/Tickets_Overlay_SQL.pm line 106.
> Subroutine _OpenParen redefined at


RT4 should be isolated from RT3's files. In your case files of RT3 are
installed in perl's default paths, so RT4 finds them and loads. In RT4
we merged XXX.pm and XXX_Overlay.pm, but code still loads
XXX_Overlay.pm files. In your case it's old code from RT3 that gets
mixed with new code.

Either cleanup your system or the following patch to prevent loading
of overlay files. I can not promisse patch would fix all issues.

diff --git a/lib/RT/Base.pm b/lib/RT/Base.pm
index 3c209f2..deff196 100644
--- a/lib/RT/Base.pm
+++ b/lib/RT/Base.pm
@@ -156,7 +156,7 @@ sub _ImportOverlays {
     my $class = shift;
     my ($package,undef,undef) = caller();
     $package =~ s|::|/|g;
-    for my $type (qw(Overlay Vendor Local)) {
+    for my $type (qw(Vendor Local)) {
         my $filename = $package."_".$type.".pm";
         eval { require $filename };
         die $@ if ($@ && $@ !~ m{^Can't locate $filename});


-- 
Best regards, Ruslan.



More information about the rt-users mailing list