[Catalyst] Error creating CDBI model

Kevin Old kevinold at gmail.com
Wed Nov 23 15:28:35 CET 2005


On 11/23/05, Maxim Nechaev <nechaev at technodesign.ru> wrote:
> All looks ok but when i try run server i get error message:
> xeim at slack:~/MyApp/script$ ./myapp_server.pl
> Use of uninitialized value in hash element at /usr/lib/perl5/site_perl/5.8.7/Class/DBI/Loader/Generic.pm line 119.
> Couldn't instantiate component "MyApp::Model::User", "Can't call method "classes" on an undefined value at /usr/lib/perl5/site_perl/5.8.7/Catalyst/Model/CDBI.pm line 68." at /usr/lib/perl5/site_perl/5.8.7/Module/Pluggable/Fast.pm line 86
> Compilation failed in require at ./myapp_server.pl line 47.

Maxim,

I had this error the other day and it went away when I added a primary
key to the only table I had in the database I was using.

I assume that PK's are now required in tables when using CDBI.

Kevin
--
Kevin Old
kevinold at gmail.com



More information about the Catalyst mailing list