[Catalyst] DBIC::Schema issue - out of ideas.

Alejandro Imass alejandro.imass at gmail.com
Wed Feb 18 00:47:17 GMT 2009


Are you using a static schema? (it seems).

If so, and unless you have customized the generated Schema files, it
is usually safe to delete your Schema classes and generate the ORM
model again.

If you re-generate your static schema, on top of the old one, the
model class will not overwrite and you will have a xxxx.new class
sitting beside the old one. Also the schema loader does not deal with
table drops and I think it doesn't deal with updates either, so you
are always better off by deleting your schema classes prior to
reloading your static schema.

On Wed, Feb 18, 2009 at 7:26 AM,  <kakimoto at tpg.com.au> wrote:
>
> hi, everyone :)
>
>  I just updated my ORM (DBIx::Class) based on the latest tutes. The
> application was working fine until I found a bug which led to another
> bug. I corrected the error and saw an update to the tute. With itchy
> fingers, I decided to update my ORM and now, when  I run myApp_server.pl
> or myApp_test.pl,  I get the errors below.
>
> kakimoto at gautica:~/projects/myApp/script$ ./server
> Couldn't instantiate component "myApp::Model::myAppDB", "Cannot load
> schema class 'myApp::Schema': DBIx::Class::Schema::throw_exception():
> DBIx::Class::Row::throw_exception(): Can't locate myAppDB/Listi
> ngs.pm in @INC (@INC contains:
> /home/kakimoto/projects/myApp/script/../lib /etc/perl
> /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5
> /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/pe
> rl/5.8 /usr/local/lib/site_perl .
> /home/kakimoto/projects/myApp/lib/myApp/Schema) at
> /usr/local/share/perl/5.8.8/Class/C3/Componentised.pm line 126.
> Compilation failed in require at
> /usr/local/share/perl/5.8.8/Class/C3/Componentised.pm line 126.
> Compilation failed in require at
> /usr/local/share/perl/5.8.8/Catalyst/Model/DBIC/Schema.pm line 295.
>  at ./server line 56" at ./server line 56
>  Compilation failed in require at ./server line 56.
>  kakimoto at gautica:~/projects/myApp/script$
>
>
> 1) './server' = './myApp_server.pl'
> 2) line 56 in ./server reads 'require myApp;'
>
>
> what I have done:
> ============
>
> 1) Googled and found another post which has the similar error message.
> Sadly, the cause is different and that post was for a catalyst app on
> activestate perl
> (http://www.nabble.com/Issue-with-Tutorial-section-3-td21139137.html)
>
> 2) did a sanity check (ie " perl -cw myApp_server.pl " ) and it checks
> out fine. Syntax is ok. This is off
> http://lists.scsys.co.uk/pipermail/catalyst/2006-November/010337.html
>
> 3) nope, i did not miss any ending ';' (based on
> http://lists.scsys.co.uk/pipermail/catalyst/2006-November/010232.html).
>
> 4) read up on the docs. These are (not limited to):
>  - DBIx::Class,
>  -Catalyst::Model::DBIC::Schema
>  - Catalyst tutes (again)
>  - etc...
>
>
> I am going to have to break down the app to only its authorisation
> components and try debugging from there.
>
> Any ideas?
>
> Thanks,
> K. akimoto
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>



More information about the Catalyst mailing list