CantLocateObject

From Request Tracker Wiki
Jump to navigation Jump to search

Can't locate object method "foo"

These errors are generally caused by missing or mis-installed Perl modules. make testdeps and make fixdeps try to diagnose and fix any problems.

Can't locate object method "new" via package "RT::Handle" at rt3/lib/RT.pm

This problem may be caused if DBIx::SearchBuilder can't be found because it isn't installed or it might not be in the perl library search path, especially if RT has been running fine and it just stops working. I encountered it after upgrading perl on my system. In this case, check your system and install/reinstall DBIx::SearchBuilder as necessary.

If Perl modules do exist, and they are in correct path, also check permissions on files. If you install Perl modules as root, and your umask has been changed to 027 then the permissions on all the new files will not allow Apache to use the files and you won't see any 'Accessed Denied' messages.

FIXME: does anybody remember what was described on the page referenced in this section? /Many times, the problem may be as described in http://fsck.com/rtfm/factoid.html?id=231. Unfortunately this site is no longer maintained; the author says "All /rtfm links died long before the wiki came into existence." archive.org also does not have a copy of this article./

Can't locate object method "content_type" via package "Apache2::RequestRec" at /opt/rt3/bin/webmux.pl line 108.

This happens if you're missing parts of Bundle::Apache2. Though "make testdeps" may show everything in order, parts of this may still be missing. This error can be fixed almost every single time by getting the Apache2 bundle with CPAN: perl -MCPAN -e'install Bundle::Apache2'. This should clear up any missing parts and remove the error. Be sure to restart Apache after you do this.