FAQ
Something IS missing - the 'Addresses.pm' module! Actually, I'd be
surprised if it's actually missing, however Perl can't find it for some
reason. I would check the 'package' declaration in your module against
the error. It could be an issue with plurality, likely because a change
was made somewhere along the line in how DBIC handles this. Whatever
the case, perl is looking for that module and can't find it.

On 7/26/2010 8:57 AM, Marc Gamontini wrote:
hi,
I tried to install an old CRUD Catalyst example (Rockway's AddressBook
app, detailed in chapter 3 from his PACKT book) and I got errors.
I've fully fonctional examples (from the Definitive Guide), like
SneayCat - thank you, it's an excellent one ! - on the same machine, a
CentOS 5.5 config with Perl 5.8.8, Catalyst 5.80024 and modules, among
them :
Catalyst::Devel is up to date (1.28)
DBIx::Class is up to date (0.08123).
Catalyst::Model::DBIC::Schema is up to date (0.43)
Catalyst::Devel is up to date (1.28).
Catalyst::Plugin::Authentication is up to date (0.10016).
Catalyst::Plugin::Authorization::Roles is up to date (0.08).
Catalyst::Plugin::ConfigLoader is up to date (0.28).
Catalyst::Plugin::Session is up to date (0.30).
Catalyst::Plugin::Session::State::Cookie is up to date (0.17).
Catalyst::Plugin::Session::Store::FastMmap is up to date (0.13).
Catalyst::Plugin::StackTrace is up to date (0.11).
Catalyst::Plugin::Static::Simple is up to date (0.29).
Class::MOP is up to date (1.04)
I applied changes detailed here
(/AddressBook::Schema::AddressDB::Result/):
http://wiki.catalystframework.org/wiki/thebookerrata
http://lists.scsys.co.uk/pipermail/catalyst/2009-April/021929.html
It doesn't work for me and i'm lost : I don't understand why the
component can't be instantiated. Is something missing ?
Thank you in advance for your help !
Marc
Report :
#script/addressbook_server.pl <http://addressbook_server.pl>
Couldn't load class (AddressBook) because: Couldn't instantiate
component "AddressBook::Model::AddressDB", "Couldn't load class
(AddressBook::Schema::AddressDB) because:
DBIx::Class::Schema::throw_exception():
DBIx::Class::Row::throw_exception(): Can't locate
AddressBook/Schema/AddressDB/Result/Addresses.pm in @INC (@INC
contains: /root/AddressBook/script/../lib
/root/perl5/lib/perl5/i386-linux-thread-multi /root/perl5/lib/perl5
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .)
at /root/perl5/lib/perl5/Class/C3/Componentised.pm line 135.
Compilation failed in require at
/root/perl5/lib/perl5/Class/C3/Componentised.pm line 135.
Compilation failed in require at
/root/perl5/lib/perl5/Class/C3/Componentised.pm line 135.
Compilation failed in require at
/root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP.pm line 114.
at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP.pm line 120
Class::MOP::__ANON__('DBIx::Class::Schema::throw_exception():
DBIx::Class::Row::thr...') called at /root/perl5/lib/perl5/Try/Tiny.pm
line 98
Try::Tiny::try('CODE(0xaefb290)',
'Try::Tiny::Catch=REF(0xaeb31b0)') called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP.pm line 125

Class::MOP::load_first_existing_class('AddressBook::Schema::AddressDB') called
at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP.pm line 137
Class::MOP::load_class('AddressBook::Schema::AddressDB')
called at /root/perl5/lib/perl5/Catalyst/Model/DBIC/Schema/Types.pm
line 21

Catalyst::Model::DBIC::Schema::Types::__ANON__('AddressBook::Schema::AddressDB')
called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Moose/Meta/TypeCoercion.pm
line 63

Moose::Meta::TypeCoercion::__ANON__('AddressBook::Schema::AddressDB')
called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Moose/Meta/TypeCoercion.pm
line 97

Moose::Meta::TypeCoercion::coerce('Moose::Meta::TypeCoercion=HASH(0xae2b0e4)',
'AddressBook::Schema::AddressDB') called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Moose/Meta/TypeConstraint.pm
line 90

Moose::Meta::TypeConstraint::coerce('Moose::Meta::TypeConstraint=HASH(0xae6f4dc)',
'AddressBook::Schema::AddressDB') called at
/root/perl5/lib/perl5/MooseX/Types/TypeDecorator.pm line 206
eval {...} called at
/root/perl5/lib/perl5/MooseX/Types/TypeDecorator.pm line 205

MooseX::Types::TypeDecorator::AUTOLOAD('MooseX::Types::TypeDecorator=HASH(0xadcaef0)',
'AddressBook::Schema::AddressDB') called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Moose/Meta/Attribute.pm
line 742

Moose::Meta::Attribute::_coerce_and_verify('Moose::Meta::Attribute=HASH(0xaeab4e0)',
'AddressBook::Schema::AddressDB',
'AddressBook::Model::AddressDB=HASH(0xaf55448)') called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Moose/Meta/Attribute.pm
line 398

Moose::Meta::Attribute::initialize_instance_slot('Moose::Meta::Attribute=HASH(0xaeab4e0)',
'Moose::Meta::Instance=HASH(0xaefb254)',
'AddressBook::Model::AddressDB=HASH(0xaf55448)', 'HASH(0xaf55304)')
called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP/Class.pm line 567

Class::MOP::Class::_construct_instance('Moose::Meta::Class=HASH(0xadd3528)',
'HASH(0xaf55304)') called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP/Class.pm line 540

Class::MOP::Class::new_object('Moose::Meta::Class=HASH(0xadd3528)',
'HASH(0xaf55304)') called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Moose/Meta/Class.pm line 256

Moose::Meta::Class::new_object('Moose::Meta::Class=HASH(0xadd3528)',
'HASH(0xaf55304)') called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Moose/Object.pm line 25
Moose::Object::new('AddressBook::Model::AddressDB',
'AddressBook', 'HASH(0xae9ed8c)') called at generated method (unknown
origin) line 3

Catalyst::Model::DBIC::Schema::new('AddressBook::Model::AddressDB',
'AddressBook', 'HASH(0xae9ed8c)') called at
/root/perl5/lib/perl5/MooseX/Traits/Pluggable.pm line 131

MooseX::Traits::Pluggable::new_with_traits('AddressBook::Model::AddressDB',
'AddressBook') called at
/root/perl5/lib/perl5/CatalystX/Component/Traits.pm line 145

CatalystX::Component::Traits::COMPONENT('AddressBook::Model::AddressDB',
'AddressBook', 'HASH(0xaf553a0)') called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP/Method/Wrapped.pm
line 48

Class::MOP::Method::Wrapped::__ANON__('AddressBook::Model::AddressDB',
'AddressBook', 'HASH(0xaf553a0)') called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP/Method/Wrapped.pm
line 89

Catalyst::Model::DBIC::Schema::COMPONENT('AddressBook::Model::AddressDB',
'AddressBook', 'HASH(0xaf553a0)') called at
/root/perl5/lib/perl5/Catalyst.pm line 2502
eval {...} called at /root/perl5/lib/perl5/Catalyst.pm line 2502
Catalyst::setup_component('AddressBook',
'AddressBook::Model::AddressDB') called at
/root/perl5/lib/perl5/Catalyst.pm line 2416
Catalyst::setup_components('AddressBook') called at
/root/perl5/lib/perl5/Catalyst.pm line 1142
Catalyst::setup('AddressBook') called at
/root/AddressBook/script/../lib/AddressBook.pm line 42
require AddressBook.pm called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP.pm line 114
Class::MOP::__ANON__() called at
/root/perl5/lib/perl5/Try/Tiny.pm line 71
eval {...} called at /root/perl5/lib/perl5/Try/Tiny.pm line 67
Try::Tiny::try('CODE(0x9f9cd50)',
'Try::Tiny::Catch=REF(0xa74b390)') called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP.pm line 125
Class::MOP::load_first_existing_class('AddressBook') called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP.pm line 137
Class::MOP::load_class('AddressBook') called at
/root/perl5/lib/perl5/Catalyst/ScriptRole.pm line 61

Catalyst::ScriptRole::_run_application('Catalyst::Script::Server=HASH(0xa7726f4)')
called at /root/perl5/lib/perl5/Catalyst/Script/Server.pm line 181

Catalyst::Script::Server::run('Catalyst::Script::Server=HASH(0xa7726f4)')
called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP/Method/Wrapped.pm
line 48

Class::MOP::Method::Wrapped::__ANON__('Catalyst::Script::Server=HASH(0xa7726f4)')
called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP/Method/Wrapped.pm
line 89

Catalyst::Script::Server::run('Catalyst::Script::Server=HASH(0xa7726f4)')
called at /root/perl5/lib/perl5/Catalyst/ScriptRunner.pm line 20
Catalyst::ScriptRunner::run('Catalyst::ScriptRunner',
'AddressBook', 'Server') called at script/addressbook_server.pl
<http://addressbook_server.pl> line 8
at /root/perl5/lib/perl5/MooseX/Types/TypeDecorator.pm line 208

MooseX::Types::TypeDecorator::AUTOLOAD('MooseX::Types::TypeDecorator=HASH(0xadcaef0)',
'AddressBook::Schema::AddressDB') called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Moose/Meta/Attribute.pm
line 742

Moose::Meta::Attribute::_coerce_and_verify('Moose::Meta::Attribute=HASH(0xaeab4e0)',
'AddressBook::Schema::AddressDB',
'AddressBook::Model::AddressDB=HASH(0xaf55448)') called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Moose/Meta/Attribute.pm
line 398

Moose::Meta::Attribute::initialize_instance_slot('Moose::Meta::Attribute=HASH(0xaeab4e0)',
'Moose::Meta::Instance=HASH(0xaefb254)',
'AddressBook::Model::AddressDB=HASH(0xaf55448)', 'HASH(0xaf55304)')
called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP/Class.pm line 567

Class::MOP::Class::_construct_instance('Moose::Meta::Class=HASH(0xadd3528)',
'HASH(0xaf55304)') called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP/Class.pm line 540

Class::MOP::Class::new_object('Moose::Meta::Class=HASH(0xadd3528)',
'HASH(0xaf55304)') called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Moose/Meta/Class.pm line 256

Moose::Meta::Class::new_object('Moose::Meta::Class=HASH(0xadd3528)',
'HASH(0xaf55304)') called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Moose/Object.pm line 25
Moose::Object::new('AddressBook::Model::AddressDB',
'AddressBook', 'HASH(0xae9ed8c)') called at generated method (unknown
origin) line 3

Catalyst::Model::DBIC::Schema::new('AddressBook::Model::AddressDB',
'AddressBook', 'HASH(0xae9ed8c)') called at
/root/perl5/lib/perl5/MooseX/Traits/Pluggable.pm line 131

MooseX::Traits::Pluggable::new_with_traits('AddressBook::Model::AddressDB',
'AddressBook') called at
/root/perl5/lib/perl5/CatalystX/Component/Traits.pm line 145

CatalystX::Component::Traits::COMPONENT('AddressBook::Model::AddressDB',
'AddressBook', 'HASH(0xaf553a0)') called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP/Method/Wrapped.pm
line 48

Class::MOP::Method::Wrapped::__ANON__('AddressBook::Model::AddressDB',
'AddressBook', 'HASH(0xaf553a0)') called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP/Method/Wrapped.pm
line 89

Catalyst::Model::DBIC::Schema::COMPONENT('AddressBook::Model::AddressDB',
'AddressBook', 'HASH(0xaf553a0)') called at
/root/perl5/lib/perl5/Catalyst.pm line 2502
eval {...} called at /root/perl5/lib/perl5/Catalyst.pm line 2502
Catalyst::setup_component('AddressBook',
'AddressBook::Model::AddressDB') called at
/root/perl5/lib/perl5/Catalyst.pm line 2416
Catalyst::setup_components('AddressBook') called at
/root/perl5/lib/perl5/Catalyst.pm line 1142
Catalyst::setup('AddressBook') called at
/root/AddressBook/script/../lib/AddressBook.pm line 42
require AddressBook.pm called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP.pm line 114
Class::MOP::__ANON__() called at
/root/perl5/lib/perl5/Try/Tiny.pm line 71
eval {...} called at /root/perl5/lib/perl5/Try/Tiny.pm line 67
Try::Tiny::try('CODE(0x9f9cd50)',
'Try::Tiny::Catch=REF(0xa74b390)') called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP.pm line 125
Class::MOP::load_first_existing_class('AddressBook') called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP.pm line 137
Class::MOP::load_class('AddressBook') called at
/root/perl5/lib/perl5/Catalyst/ScriptRole.pm line 61

Catalyst::ScriptRole::_run_application('Catalyst::Script::Server=HASH(0xa7726f4)')
called at /root/perl5/lib/perl5/Catalyst/Script/Server.pm line 181

Catalyst::Script::Server::run('Catalyst::Script::Server=HASH(0xa7726f4)')
called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP/Method/Wrapped.pm
line 48

Class::MOP::Method::Wrapped::__ANON__('Catalyst::Script::Server=HASH(0xa7726f4)')
called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP/Method/Wrapped.pm
line 89

Catalyst::Script::Server::run('Catalyst::Script::Server=HASH(0xa7726f4)')
called at /root/perl5/lib/perl5/Catalyst/ScriptRunner.pm line 20
Catalyst::ScriptRunner::run('Catalyst::ScriptRunner',
'AddressBook', 'Server') called at script/addressbook_server.pl
<http://addressbook_server.pl> line 8"Compilation failed in require at
/root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP.pm line 114.
at /root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP.pm line 120
Class::MOP::__ANON__('Couldn\'t instantiate component
"AddressBook::Model::AddressD...') called at
/root/perl5/lib/perl5/Try/Tiny.pm line 98
Try::Tiny::try('CODE(0x9f9cd50)',
'Try::Tiny::Catch=REF(0xa74b390)') called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP.pm line 125
Class::MOP::load_first_existing_class('AddressBook') called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP.pm line 137
Class::MOP::load_class('AddressBook') called at
/root/perl5/lib/perl5/Catalyst/ScriptRole.pm line 61

Catalyst::ScriptRole::_run_application('Catalyst::Script::Server=HASH(0xa7726f4)')
called at /root/perl5/lib/perl5/Catalyst/Script/Server.pm line 181

Catalyst::Script::Server::run('Catalyst::Script::Server=HASH(0xa7726f4)')
called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP/Method/Wrapped.pm
line 48

Class::MOP::Method::Wrapped::__ANON__('Catalyst::Script::Server=HASH(0xa7726f4)')
called at
/root/perl5/lib/perl5/i386-linux-thread-multi/Class/MOP/Method/Wrapped.pm
line 89

Catalyst::Script::Server::run('Catalyst::Script::Server=HASH(0xa7726f4)')
called at /root/perl5/lib/perl5/Catalyst/ScriptRunner.pm line 20
Catalyst::ScriptRunner::run('Catalyst::ScriptRunner',
'AddressBook', 'Server') called at script/addressbook_server.pl
<http://addressbook_server.pl> line 8


_______________________________________________
List: Catalyst@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/

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 5 | next ›
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedJul 26, '10 at 12:57p
activeJul 26, '10 at 4:45p
posts5
users3
websitecatalystframework.org
irc#catalyst

3 users in discussion

Steve: 2 posts Marc Gamontini: 2 posts Will: 1 post

People

Translate

site design / logo © 2022 Grokbase