[Catalyst] MojoMojo example - errors with database tables

marcus marcus at thefeed.no
Sun Mar 20 13:24:43 CET 2005


Uwe Voelker writes: 

> Correct. I changed the config and SQLite2 complained about unknown 
> constraint DEFAULT. Either the db is corrupt or I have a wrong version of 
> sqlite installed (I have the newest version from CPAN).

This means your Class::DBI::SQLite is too old. I've provided a patch to the 
author which replaces SQL::Parser with a regexp to find primary keys. As 
mentioned, we've not reached a 0.1 release for mojomojo yet, hopefully we 
will get there just after easter, at that point, there will be a working 
version, for now, you will have to rough it. 

> So I ported the oracle schema to mysql and sometimes added the primary key 
> (because CDBI::Loader::MySQL wants a primary key for each table).

I believe the oracle schema is not in sync with the sqlite one, which is 
being used for development. naughton is responsible for the oracle bit, and 
he's going to reimplement the version control, and hopefully bring the 
schemas in sync. 

> The line 'Loaded tables ""' changed, but the next errors continue... 
> 
> [Sun Mar 20 11:45:01 2005] [catalyst] [debug] Loaded tables "InternalLink 
> Metadata MetadataVersion Node NodeApproval NodeVersion Person 
> PersonNodeApproval Role RoleMember RoleNodeApproval RoleNodeRights"
> Couldn't instantiate "MojoMojo::M::Core::User", "Can't locate object 
> method "new" via package "MojoMojo::M::Core::User" at 
> /usr/lib/perl5/site_perl/5.8.5/Module/Pluggable/Fast.pm line 83.
> " at /usr/lib/perl5/site_perl/5.8.5/Catalyst/Engine.pm line 709
> Couldn't require "MojoMojo::M::Core::Page", "Can't locate object method 
> "columns" via package "MojoMojo::M::Core::Page" at 
> /home/uwe/trunk/script/../lib/MojoMojo/M/Core/Page.pm line 8.
> Compilation failed in require" at 
> /usr/lib/perl5/site_perl/5.8.5/Catalyst/Engine.pm line 709
> Couldn't instantiate "MojoMojo::M::Core::Page", "Can't locate object 
> method "new" via package "MojoMojo::M::Core::Page" at 
> /usr/lib/perl5/site_perl/5.8.5/Module/Pluggable/Fast.pm line 83.
> " at /usr/lib/perl5/site_perl/5.8.5/Catalyst/Engine.pm line 709
> Couldn't require "MojoMojo::M::Core::Tag", "Can't locate object method 
> "columns" via package "MojoMojo::M::Core::Tag" at 
> /home/uwe/trunk/script/../lib/MojoMojo/M/Core/Tag.pm line 4.
> Compilation failed in require" at 
> /usr/lib/perl5/site_perl/5.8.5/Catalyst/Engine.pm line 709
> Couldn't instantiate "MojoMojo::M::Core::Tag", "Can't locate object method 
> "new" via package "MojoMojo::M::Core::Tag" at 
> /usr/lib/perl5/site_perl/5.8.5/Module/Pluggable/Fast.pm line 83.
> " at /usr/lib/perl5/site_perl/5.8.5/Catalyst/Engine.pm line 709
> Couldn't require "MojoMojo::M::Core::Revision", "Can't locate object 
> method "has_a" via package "MojoMojo::M::Core::Revision" at 
> /home/uwe/trunk/script/../lib/MojoMojo/M/Core/Revision.pm line 13.
> Compilation failed in require" at 
> /usr/lib/perl5/site_perl/5.8.5/Catalyst/Engine.pm line 709
> [Sun Mar 20 11:45:01 2005] [catalyst] [debug] Initialized components " 
> MojoMojo::M::Core::InternalLink MojoMojo::V::TT MojoMojo::C::Journal 
> MojoMojo::M::CDBI MojoMojo::M::Core::NodeApproval MojoMojo::C::Export 
> MojoMojo::M::Core::RoleNodeApproval MojoMojo::M::Core::Node 
> MojoMojo::C::Jsrpc MojoMojo::M::Core::PersonNodeApproval MojoMojo::C::Page 
> MojoMojo::C::Tag MojoMojo::M::Core::Person MojoMojo::M::Core::Metadata 
> MojoMojo::M::Core::RoleNodeRights MojoMojo::C::User 
> MojoMojo::M::Core::Revision MojoMojo::M::Core::MetadataVersion 
> MojoMojo::M::Core::Role MojoMojo::C::Feeds MojoMojo::M::Core::NodeVersion 
> MojoMojo::M::Core::RoleMember" 
> 
> I think CDBI::Loader makes the problems. When I put 'use base 
> "MojoMojo::M::CDBI";' in each MojoMojo::M::Core::* module these errors 
> disappear (of course there are warnings for subroutine redefinition). 
> 
> When I load http://localhost:3000/ I get an error about 
> MojoMojo::M::Core::Preferences - this module does not exists. 
> 
>> Sorry about the confusion, but MojoMojo is a rapidly-moving target right
>> now.
> 
> I have no problem with that. But do you check changes in that are not 
> working? If the missing module is the problem, you would have noticed 
> that. 
> 
> 
> Thank you,
> good bye, Uwe 
> 
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst
 




More information about the Catalyst mailing list