Broken PoCo::MQ

2 views
Skip to first unread message

Kevin Esteb

unread,
Jul 22, 2011, 5:45:49 PM7/22/11
to PoCo::MQ
Well for some reason I seem to have broken the message queue. It must have been when I was trying to fix a installation bug with DBIx::Class and assorted addons. Anyway, I updated to v0.2.10 which installed an new version of Moose, this fixed the original problem, but produced a new one. Here is the error message:

Due to a method name conflict in roles 'POE::Component::MessageQueue::Storage' and 'POE::Component::MessageQueue::Storage::Generic::Base', the method 'log' must be implemented or excluded by 'POE::Component::MessageQueue::Storage::Generic::DBI' at /wise/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Moose/Meta/Role/Application/ToClass.pm line 127
Moose::Meta::Role::Application::ToClass::check_required_methods('Moose::Meta::Role::Application::ToClass=HASH(0x136791e0)', 'Moose::Meta::Role=HASH(0x13683900)', 'Moose::Meta::Class=HASH(0x135e95b0)') called at /wise/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Moose/Meta/Role/Application.pm line 55
Moose::Meta::Role::Application::apply('Moose::Meta::Role::Application::ToClass=HASH(0x136791e0)', 'Moose::Meta::Role=HASH(0x13683900)', 'Moose::Meta::Class=HASH(0x135e95b0)') called at /wise/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Moose/Meta/Role/Application/ToClass.pm line 35
Moose::Meta::Role::Application::ToClass::apply('Moose::Meta::Role::Application::ToClass=HASH(0x136791e0)', 'Moose::Meta::Role=HASH(0x13683900)', 'Moose::Meta::Class=HASH(0x135e95b0)', 'HASH(0x13683ca0)') called at /wise/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Moose/Meta/Role.pm line 470
Moose::Meta::Role::apply('Moose::Meta::Role=HASH(0x13683900)', 'Moose::Meta::Class=HASH(0x135e95b0)') called at /wise/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Moose/Util.pm line 159
Moose::Util::_apply_all_roles('Moose::Meta::Class=HASH(0x135e95b0)', 'undef', 'POE::Component::MessageQueue::Storage::Generic::Base') called at /wise/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Moose/Util.pm line 98
Moose::Util::apply_all_roles('Moose::Meta::Class=HASH(0x135e95b0)', 'POE::Component::MessageQueue::Storage::Generic::Base') called at /wise/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Moose.pm line 65
Moose::with('Moose::Meta::Class=HASH(0x135e95b0)', 'POE::Component::MessageQueue::Storage::Generic::Base') called at /wise/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Moose/Exporter.pm line 356
Moose::with('POE::Component::MessageQueue::Storage::Generic::Base') called at /wise/lib/perl5/site_perl/5.8.8/POE/Component/MessageQueue/Storage/Generic/DBI.pm line 21
require POE/Component/MessageQueue/Storage/Generic/DBI.pm called at (eval 580) line 2
POE::Component::Generic::Child::BEGIN() called at /wise/lib/perl5/site_perl/5.8.8/POE/Component/MessageQueue/Storage/Generic/DBI.pm line 0
eval {...} called at /wise/lib/perl5/site_perl/5.8.8/POE/Component/MessageQueue/Storage/Generic/DBI.pm line 0
eval 'use POE::Component::MessageQueue::Storage::Generic::DBI
;' called at /wise/lib/perl5/site_perl/5.8.8/POE/Component/Generic/Child.pm line 356
POE::Component::Generic::Child::package_load('POE::Component::MessageQueue::Storage::Generic::DBI') called at /wise/lib/perl5/site_perl/5.8.8/POE/Component/Generic.pm line 99
POE::Component::Generic::new('POE::Component::Generic', 'package', 'POE::Component::MessageQueue::Storage::Generic::DBI', 'object_options', 'ARRAY(0x12e1e4a0)', 'packages', 'HASH(0x135e5680)', 'error', 'HASH(0x135e5760)') called at /wise/lib/perl5/site_perl/5.8.8/POE/Component/Generic.pm line 27
POE::Component::Generic::spawn('POE::Component::Generic', 'package', 'POE::Component::MessageQueue::Storage::Generic::DBI', 'object_options', 'ARRAY(0x12e1e4a0)', 'packages', 'HASH(0x135e5680)', 'error', 'HASH(0x135e5760)') called at /wise/lib/perl5/site_perl/5.8.8/POE/Component/MessageQueue/Storage/Generic.pm line 90
POE::Component::MessageQueue::Storage::Generic::BUILD('POE::Component::MessageQueue::Storage::DBI=HASH(0x13564650)', 'HASH(0x135e51b0)') called at /wise/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Class/MOP/Method.pm line 125
Class::MOP::Method::execute('Moose::Meta::Method=HASH(0x132f2a10)', 'POE::Component::MessageQueue::Storage::DBI=HASH(0x13564650)', 'HASH(0x135e51b0)') called at /wise/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Moose/Object.pm line 59
Moose::Object::BUILDALL('POE::Component::MessageQueue::Storage::DBI=HASH(0x13564650)', 'HASH(0x135e51b0)') called at /wise/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Moose/Meta/Class.pm line 278
Moose::Meta::Class::new_object('Moose::Meta::Class=HASH(0x12e0dfb0)', 'HASH(0x135e51b0)') called at /wise/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Moose/Object.pm line 28
Moose::Object::new('POE::Component::MessageQueue::Storage::DBI', 'dsn', 'DBI:SQLite:dbname=/data/db/mq/mq.db', 'username', '', 'password', '', 'options', 'ARRAY(0x12e1e4a0)') called at /wise/lib/perl5/site_perl/5.8.8/POE/Component/MessageQueue/Storage/DBI.pm line 35
Class::MOP::Class:::around('CODE(0x12278030)', 'POE::Component::MessageQueue::Storage::DBI', 'dsn', 'DBI:SQLite:dbname=/data/db/mq/mq.db', 'username', '', 'password', '') called at /wise/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Class/MOP/Method/Wrapped.pm line 162
Class::MOP::Method::Wrapped::__ANON__('POE::Component::MessageQueue::Storage::DBI', 'dsn', 'DBI:SQLite:dbname=/data/db/mq/mq.db', 'username', '', 'password', '') called at /wise/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Class/MOP/Method/Wrapped.pm line 91
POE::Component::MessageQueue::Storage::DBI::new('POE::Component::MessageQueue::Storage::DBI', 'dsn', 'DBI:SQLite:dbname=/data/db/mq/mq.db', 'username', '', 'password', '') called at /wise/lib/perl5/site_perl/5.8.8/POE/Component/MessageQueue/Storage/Default.pm line 263
POE::Component::MessageQueue::Storage::Default::new('POE::Component::MessageQueue::Storage::Default', 'data_dir', '/data/db/mq', 'timeout', 4, 'throttle_max', 2, 'front', 'POE::Component::MessageQueue::Storage::Memory=HASH(0x134cbac0)', 'front_max', 'undef', 'granularity', 'undef') called at /wise/sbin/mq.pl line 254
Compilation failed in require at (eval 580) line 2.
BEGIN failed--compilation aborted at (eval 580) line 2.
3581: Sessions were started, but POE::Kernel's run() method was never
3581: called to execute them. This usually happens because an error
3581: occurred before POE::Kernel->run() could be called. Please fix
3581: any errors above this notice, and be sure that POE::Kernel->run()
3581: is called. See documentation for POE::Kernel's run() method for
3581: another way to disable this warning.

I don't understand Moose. So I really don't know what this error message is really saying. But my fix was to copy/paste the log method from 'POE::Component::MessageQueue::Storage::Generic::Base' to 'POE::Component::MessageQueue::Storage::Generic::DBI'. This seems to have fixed my problem.

Just passing it along in case there is a real fix for this problem.


David Snopek

unread,
Jul 25, 2011, 5:12:26 PM7/25/11
to poc...@googlegroups.com
Hi Kevin,

Thanks for reporting this bug! I updated Moose and I'm able to
reproduce. I think this might be a bug in Moose, because as best as I
can tell, we are correctly using "excludes" in
PoCo::MQ::Storage::Generic::Base. But I don't have a solution yet!

Regards,
David.

2011/7/22 Kevin Esteb <kes...@wsipc.org>:

> --
> You received this message because you are subscribed to the Google Groups "PoCo::MQ" group.
> To post to this group, send email to poc...@googlegroups.com.
> To unsubscribe from this group, send email to pocomq+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pocomq?hl=en.
>
>

--
Blog: http://www.linguatrek.com
H2Oscore: http://www.h2oscore.com
BiblioBird: http://www.bibliobird.com

David Snopek

unread,
Jul 25, 2011, 5:26:50 PM7/25/11
to poc...@googlegroups.com
Aha! I think I worked this out. It looks like Moose changed the
arguments to 'with' but forgot to update their documentation here:

http://search.cpan.org/~doy/Moose-2.0201/lib/Moose/Spec/Role.pod#Composition_Edge_Cases

Yet *did* update it here:

http://search.cpan.org/~doy/Moose-2.0201/lib/Moose/Manual/Roles.pod#METHOD_EXCLUSION_AND_ALIASING

Attached is a patch to fix this. I'll do some more testing and make a
release when I get a chance.

Regards,
David.

2011/7/25 David Snopek <dsn...@gmail.com>:

pocomq-moose-2.0201.patch

Naveed Massjouni

unread,
Jul 25, 2011, 5:57:56 PM7/25/11
to poc...@googlegroups.com
Great catch David. Will you sync the github repo with the patch? Even
better, just make github the official repo for development. I believe
that you will have much more contributions if you do.
-Naveed

David Snopek

unread,
Jul 25, 2011, 6:56:17 PM7/25/11
to poc...@googlegroups.com
Committed to bzr and git.

People are free to send me contributions via git right now! And yet
they don't. :-/

Regards,
David.

2011/7/25 Naveed Massjouni <nave...@gmail.com>:

Reply all
Reply to author
Forward
0 new messages