[Catalyst] Some "How Do I ..." questions

Bill Moseley moseley at hank.org
Wed Apr 27 17:40:32 CEST 2005


On Wed, Apr 27, 2005 at 10:55:38AM -0400, Andy Grundman wrote:
> Bill Moseley wrote:
> >Still same error:
> >
> >[Wed Apr 27 07:44:41 2005] [catalyst] [error] Caught exception "Can't 
> >locate object method "search" via package "ServerDB::M::CDBI::User" 
> >(perhaps you forgot to load "ServerDB::M::CDBI::User"?) at 
> >/home/moseley/ServerDB/script/../lib/Catalyst/Plugin/Authentication/CDBI.pm line 248."
> 
> When starting script/server.pl, check the debug output.  You should see 
> a line like this:
> [debug] Loaded tables "application role server support_history user 
> user_role"

Argh, nightmare module installation.

Well, one thing I missed was:

  Can't locate Class/DBI/Plugin/AbstractCount.pm

is failing a test.  Perhaphs that is causing the problem?


t/03sql....1..4
ok 1 - sql statement 1
ok 2 - bind param list 1
not ok 3 - sql statement 2

If I modify that test to:

    ok( $main::sql eq "SELECT COUNT(*)\nFROM __TABLE__\nWHERE ( artist = ? AND release BETWEEN ? AND ? AND title like ? )\n"
      , "sql statement 2 [$main::sql]"
      );

not ok 3 - sql statement 2 [SELECT COUNT(*)
# FROM __TABLE__
# WHERE ( artist = ? AND release BETWEEN ? AND ? AND title LIKE ? )
# ]

Well, "like" ne "LIKE".


BTW - What determines a fatal error?  I mean, should script/server.pl continue to
start on a missing module?

Here's the versions you asked about:

    $ perl -MCatalyst -le 'print $Catalyst::VERSION'
    5.10

    $ perl -MCatalyst::Model::CDBI -le 'print $Catalyst::Model::CDBI::VERSION'
    0.07

    $ perl -MClass::DBI::Loader -le 'print $Class::DBI::Loader::VERSION'
    0.19


Sorry for the volume, but here's the full server startup log.
The error on REFERENCES is odd.  Is that a SQLite issue?



Still not starting.  Something else is broken on my machine.
[Wed Apr 27 08:34:25 2005] [catalyst] [debug] Debug messages enabled
[Wed Apr 27 08:34:25 2005] [catalyst] [debug] Loaded plugins
.=----------------------------------------------------------------------------=.
| Catalyst::Plugin::FormValidator                                             |
| Catalyst::Plugin::Session::FastMmap                                         |
| Catalyst::Plugin::Static                                                    |
| Catalyst::Plugin::Authentication::CDBI                                      |
'=----------------------------------------------------------------------------='

[Wed Apr 27 08:34:25 2005] [catalyst] [debug] Loaded dispatcher "Catalyst::Dispatcher"
[Wed Apr 27 08:34:25 2005] [catalyst] [debug] Loaded engine "Catalyst::Engine::HTTP"
[Wed Apr 27 08:34:25 2005] [catalyst] [debug] Found home "/home/moseley/ServerDB/script/.."
SQL ERROR: Unknown column constraint: 'REFERENCES'!

[Wed Apr 27 08:34:26 2005] [catalyst] [debug] Couldn't load tables "SQL ERROR: Unknown column constraint: 'REFERENCES'!

"
Couldn't instantiate "ServerDB::M::CDBI", "Can't call method "classes" on an undefined value at /usr/local/share/perl/5.8.4/Catalyst/Model/CDBI.pm line 67.
" at /usr/local/share/perl/5.8.4/Catalyst/Engine.pm line 665
Use of 'new' is deprecated at /usr/local/share/perl/5.8.4/Module/Pluggable/Fast.pm line 84. Use 'create' instead
Couldn't instantiate "ServerDB::M::CDBI::Server", "create needs a hashref at /usr/local/share/perl/5.8.4/Module/Pluggable/Fast.pm line 84
" at /usr/local/share/perl/5.8.4/Catalyst/Engine.pm line 665
Use of 'new' is deprecated at /usr/local/share/perl/5.8.4/Module/Pluggable/Fast.pm line 84. Use 'create' instead
Couldn't instantiate "ServerDB::M::CDBI::Application", "create needs a hashref at /usr/local/share/perl/5.8.4/Module/Pluggable/Fast.pm line 84
" at /usr/local/share/perl/5.8.4/Catalyst/Engine.pm line 665
[Wed Apr 27 08:34:26 2005] [catalyst] [debug] Loaded components
.=----------------------------------------------------------------------------=.
| ServerDB::C::Login                                                          |
| ServerDB::C::Report                                                         |
| ServerDB::C::Server::Search                                                 |
| ServerDB::C::Static                                                         |
| ServerDB::C::Server::History                                                |
| ServerDB::V::TT                                                             |
| ServerDB::C::Server::Apps                                                   |
| ServerDB::C::Server                                                         |
'=----------------------------------------------------------------------------='

Can't locate object method "_cache" via package "ServerDB::M::CDBI::Application" at /usr/local/share/perl/5.8.4/Catalyst/Dispatcher.pm line 348.
Compilation failed in require at script/server.pl line 10.
BEGIN failed--compilation aborted at script/server.pl line 10.


-- 
Bill Moseley
moseley at hank.org




More information about the Catalyst mailing list