Skip Menu |

This queue is for tickets about the Catalyst-Plugin-AutoCRUD CPAN distribution.

Report information
The Basics
Id: 73961
Status: resolved
Priority: 0/
Queue: Catalyst-Plugin-AutoCRUD

People
Owner: Nobody in particular
Requestors: acerrito [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.113450
Fixed in: (no value)



Subject: Error when requesting table
Perl Version: perl 5, version 14, subversion 2 (v5.14.2) built for i686-linux Catalyst::Plugin::AutoCRUD version 2.113450 I was trying to set up a simple app using AutoCRUD with an external DBIC schema. I can get the db table list when I go to my app with /autocrud added to the url. But when I click on one of the table names, I get the errors you see below. [debug] "GET" request for "autocrud/madisondb/event" [debug] Path is "/autocrud/root/table" [debug] Arguments are "event" [debug] autocrud: retrieving cached config for site [default] [debug] autocrud: forwarding to f/end AutoCRUD::DisplayEngine::ExtJS2 [debug] Rendering template "list.tt" [error] Caught exception in DatabaseViewer::Model::AutoCRUD::StorageEngine::DBIC->schema_metadata "Error with filter 1 : Can't call method "extra" on an undefined value at /var/opt/madison/dev_amyc/catalyst_perl/lib/site_perl/5.14.2/SQL/Translator/Filter/AutoCRUD/StorageEngine/DBIC/ViewsAsTables.pm line 43." [error] Caught exception in DatabaseViewer::Controller::AutoCRUD::Root->do_meta "Can't bless non-reference value at /var/opt/madison/dev_amyc/catalyst_perl/lib/site_perl/5.14.2/SQL/Translator/AutoCRUD/Quick.pm line 31." [error] Caught exception in DatabaseViewer::Controller::AutoCRUD::Root->bootstrap "Can't call method "t" on an undefined value at /var/opt/madison/dev_amyc/catalyst_perl/lib/site_perl/5.14.2/Catalyst/Plugin/AutoCRUD/Controller/Root.pm line 191." [debug] Response Code: 500; Content-Type: text/html; charset=utf-8; Content-Length: 257529 [info] Request took 4.670589s (0.214/s) .------------------------------------------------------------+-----------. | Action | Time | +------------------------------------------------------------+-----------+ | /autocrud/root/base | 0.000534s | | /autocrud/root/db | 0.001046s | | -> /autocrud/root/schema | 0.000489s | | /autocrud/root/table | 4.102379s | | -> /autocrud/root/source | 4.101853s | | -> /autocrud/root/bootstrap | 4.090587s | | -> /autocrud/root/build_site_config | 0.010152s | | -> /autocrud/root/acl | 0.000615s | | -> /autocrud/root/do_meta | 4.077958s | | -> DatabaseViewer::Model::AutoCRUD::StorageEngine::DB- | 4.076052s | | IC->schema_metadata | | | -> /autocrud/displayengine/extjs2/process | 0.000511s | | /autocrud/root/end | 0.023455s | | -> DatabaseViewer::View::AutoCRUD::TT->process | 0.021753s | '------------------------------------------------------------+-----------' The contents of the Model .pm file (the authentication details are dummies here - I know I can connect to the db, that's not the issue): package DatabaseViewer::Model::MadisonDB; no strict refs; use base 'Catalyst::Model::DBIC::Schema'; $ENV{SYBASE}='/opt/sybase-15.5'; $ENV{SYBASE_OCS}='OCS'; __PACKAGE__->config( schema_class => 'MadisonDB::Schema', connect_info => { dsn => "dbi:Sybase:server=$server;database=$db", user => "user", password => "1234", } ); Any idea why I would be getting these errors? Let me know if other information would be helpful.
Hi there, First, thanks for the bug report - it's always good to hear how users are getting on. On Thu Jan 12 16:28:33 2012, ace wrote: Show quoted text
> "Error with filter 1 : Can't call method "extra" on an undefined value > at >
/var/opt/madison/dev_amyc/catalyst_perl/lib/site_perl/5.14.2/SQL/Translator/Filter/AutoCRUD/StorageEngine/DBIC/Views AsTables.pm Show quoted text
> line 43." > > __PACKAGE__->config( > schema_class => 'MadisonDB::Schema', > connect_info => { > dsn => "dbi:Sybase:server=$server;database=$db",
I've no immediate idea, but have two initial thoughts. First is that I've never ever used Sybase so it could be that the way this database works is making AutoCRUD blow up. That said, AutoCRUD should be database independent! But you never know. Can you confirm to me that usage with DBIx::Class is successful and you can work on the events table? The second thing is the events table itself (or is it a VIEW?). I'd be grateful if you could send me a copy of the DBIx::Class Result Source Class file for this table. If you don't want to have it stored in this ticketing system, email it to me at <oliver@cpan.org> directly. I wonder if the schema of this table/view could be tripping the module up (the ViewsAsTables.pm file does things like inspect primary columns, etc). regards, oliver.
Subject: Re: [rt.cpan.org #73961] Error when requesting table
Date: Thu, 26 Jan 2012 12:10:34 -0800 (PST)
To: "bug-Catalyst-Plugin-AutoCRUD [...] rt.cpan.org" <bug-Catalyst-Plugin-AutoCRUD [...] rt.cpan.org>
From: Amy Cerrito <acerrito [...] yahoo.com>
Hi, Thanks for getting back to me. I can confirm that DBIx::Class does work with this database, and I can work on this table. (I have other Catalyst-based applications that access this database). I will send the class file in a separate email. Thanks, Amy Show quoted text
________________________________ From: Oliver Gorwits via RT <bug-Catalyst-Plugin-AutoCRUD@rt.cpan.org> To: acerrito@yahoo.com Sent: Wednesday, January 25, 2012 5:52 PM Subject: [rt.cpan.org #73961] Error when requesting table <URL: https://rt.cpan.org/Ticket/Display.html?id=73961 > Hi there, First, thanks for the bug report - it's always good to hear how users are getting on. On Thu Jan 12 16:28:33 2012, ace wrote:
> "Error with filter 1 : Can't call method "extra" on an undefined value > at >
/var/opt/madison/dev_amyc/catalyst_perl/lib/site_perl/5.14.2/SQL/Translator/Filter/AutoCRUD/StorageEngine/DBIC/Views AsTables.pm
> line 43." > > __PACKAGE__->config( >    schema_class => 'MadisonDB::Schema', >    connect_info => { >        dsn => "dbi:Sybase:server=$server;database=$db",
I've no immediate idea, but have two initial thoughts. First is that I've never ever used Sybase so it could be that the way this database works is making AutoCRUD blow up. That said, AutoCRUD should be database independent! But you never know. Can you confirm to me that usage with DBIx::Class is successful and you can work on the events table? The second thing is the events table itself (or is it a VIEW?). I'd be grateful if you could send me a copy of the DBIx::Class Result Source Class file for this table. If you don't want to have it stored in this ticketing system, email it to me at <oliver@cpan.org> directly. I wonder if the schema of this table/view could be tripping the module up (the ViewsAsTables.pm file does things like inspect primary columns, etc). regards, oliver.
Subject: Re: [rt.cpan.org #73961] Error when requesting table
Date: Thu, 26 Jan 2012 21:51:26 -0000
To: bug-Catalyst-Plugin-AutoCRUD [...] rt.cpan.org
From: "Oliver Gorwits" <oliver [...] cpan.org>
Show quoted text
> I can confirm that DBIx::Class does work with this database, and I can > work on this table. (I have other Catalyst-based applications that access > this database). > > I will send the class file in a separate email.
Many thanks, I have it now. First question, is this Perl error the first error logged by Catalyst? Please can you look back in the debug log when you start the app and look for the very first request, which should log text looking like "autocrud: generated global dispatch table" - and tell me whether any errors are recorded, there? regards, oliver.
Subject: Re: [rt.cpan.org #73961] Error when requesting table
Date: Thu, 26 Jan 2012 14:00:55 -0800 (PST)
To: "bug-Catalyst-Plugin-AutoCRUD [...] rt.cpan.org" <bug-Catalyst-Plugin-AutoCRUD [...] rt.cpan.org>
From: Amy Cerrito <acerrito [...] yahoo.com>
Sorry if this is too much info - here's the output from the first request: [info] DatabaseViewer powered by Catalyst 5.90002 HTTP::Server::PSGI: Accepting connections at http://0:3123/ [info] *** Request 1 (0.011/s) [24499] [Thu Jan 26 16:55:35 2012] *** [debug] "GET" request for "autocrud" from "10.17.1.14" [debug] Path is "/autocrud/root/no_db" [debug] autocrud: backends are Model::AutoCRUD::StorageEngine::DBIC [debug] autocrud: generated global dispatch table [debug] autocrud: loaded config for site [default] [debug] Rendering template "tables.tt" [debug] Response Code: 200; Content-Type: text/html; charset=utf-8; Content-Length: 2345 [info] Request took 56.137767s (0.018/s) .------------------------------------------------------------+-----------. | Action                                                     | Time      | +------------------------------------------------------------+-----------+ | /autocrud/root/base                                        | 55.82596s | |  -> DatabaseViewer::Model::AutoCRUD::StorageEngine::DBIC-- | 55.82362s | | >dispatch_table                                            |           | | /autocrud/root/no_db                                       | 0.169019s | |  -> /autocrud/root/no_schema                               | 0.168340s | |   -> /autocrud/root/err_message                            | 0.167317s | |    -> /autocrud/root/build_site_config                     | 0.166502s | | /autocrud/root/end                                         | 0.129223s | |  -> DatabaseViewer::View::AutoCRUD::TT->process            | 0.127315s | '------------------------------------------------------------+-----------' Show quoted text
________________________________ From: Oliver Gorwits via RT <bug-Catalyst-Plugin-AutoCRUD@rt.cpan.org> To: acerrito@yahoo.com Sent: Thursday, January 26, 2012 4:51 PM Subject: Re: [rt.cpan.org #73961] Error when requesting table <URL: https://rt.cpan.org/Ticket/Display.html?id=73961 >
> I can confirm that DBIx::Class does work with this database, and I can > work on this table. (I have other Catalyst-based applications that access > this database). > > I will send the class file in a separate email.
Many thanks, I have it now. First question, is this Perl error the first error logged by Catalyst? Please can you look back in the debug log when you start the app and look for the very first request, which should log text looking like "autocrud: generated global dispatch table" - and tell me whether any errors are recorded, there? regards, oliver.
Hello again, Since I was unable to reproduce the error you have, I suspect it might be something to do with the Sybase database being represented in DBIx::Class, which isn't handled properly by the AutoCRUD module. If you didn't get any further either, then I regret the only thing to do is close this ticket. I don't have any way to reproduce the issue, sorry. regards, oliver.
Subject: Re: [rt.cpan.org #73961] Error when requesting table
Date: Wed, 25 Jul 2012 13:30:48 -0700 (PDT)
To: "bug-Catalyst-Plugin-AutoCRUD [...] rt.cpan.org" <bug-Catalyst-Plugin-AutoCRUD [...] rt.cpan.org>
From: Amy Cerrito <acerrito [...] yahoo.com>
We recently moved from Sybase to Oracle.  I'm getting the same error when I try to use AutoCRUD with the new Oracle database.   Show quoted text
________________________________ From: Oliver Gorwits via RT <bug-Catalyst-Plugin-AutoCRUD@rt.cpan.org> To: acerrito@yahoo.com Sent: Tuesday, June 5, 2012 9:42 AM Subject: [rt.cpan.org #73961] Error when requesting table <URL: https://rt.cpan.org/Ticket/Display.html?id=73961 > Hello again, Since I was unable to reproduce the error you have, I suspect it might be something to do with the Sybase database being represented in DBIx::Class, which isn't handled properly by the AutoCRUD module. If you didn't get any further either, then I regret the only thing to do is close this ticket. I don't have any way to reproduce the issue, sorry. regards, oliver.
Subject: Re: [rt.cpan.org #73961] Error when requesting table
Date: Sun, 29 Jul 2012 01:27:32 +0100
To: <bug-catalyst-plugin-autocrud [...] rt.cpan.org>
From: Oliver Gorwits <oliver [...] cpan.org>
On 2012-07-25 21:31, via RT wrote: Show quoted text
> Queue: Catalyst-Plugin-AutoCRUD > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=73961 > > > We recently moved from Sybase to Oracle.  I'm getting the same error > when I try to use AutoCRUD with the new Oracle database.
Okay, very sorry to hear that. Let's have another go at getting to the bottom of this. I'd like you to try to dump more detailed metadata from the plugin, and send that to me. Because it contains a lot of information about your DB schema, you can send this email directly to <oliver@cpan.org> so it won't be logged here in the ticketing system To get the metadata, follow the instructions at this link under "Metdata Dump": https://metacpan.org/module/Catalyst::Plugin::AutoCRUD::Manual::Troubleshooting#Metadata-Dump The URL you need will probably be something like: /autocrud/site/default/schema/madisondb/source/event/dumpmeta_html If it doesn't explode, you will get back a page which you can send me. If it does explode before displaying the metadata, try to change to a different table which does work (i.e. change the url to .../source/<somethingelse>/...). That should still have most of the useful metadata. regards, oliver.
Subject: Re: [rt.cpan.org #73961] Error when requesting table
Date: Tue, 4 Sep 2012 14:43:04 -0700 (PDT)
To: "bug-Catalyst-Plugin-AutoCRUD [...] rt.cpan.org" <bug-Catalyst-Plugin-AutoCRUD [...] rt.cpan.org>
From: Amy Cerrito <acerrito [...] yahoo.com>
It errors before I can get to the dumpmeta page: Trying to access this url: http://myserver:3000/autocrud/site/default/schema/madisondb/source/event/dumpmeta_html from var: moduleactiontype[info] *** Request 1 (0.002/s) [22025] [Tue Sep  4 17:17:52 2012] *** [debug] "GET" request for "autocrud/site/default/schema/madisondb/source/event/dumpmeta_html" from "10.17.1.16" [debug] Path is "/autocrud/ajax/dumpmeta_html" [debug] autocrud: backends are Model::AutoCRUD::StorageEngine::DBIC [debug] autocrud: generated global dispatch table [debug] autocrud: loaded config for site [default] [debug] Access forbidden by configuration to [default]->[madisondb]->[event]->[dumpmeta_html] [error] Caught exception in DatabaseViewer::Model::AutoCRUD::StorageEngine::DBIC->schema_metadata "Error with filter 1 : Can't call method "extra" on an undefined value at /var/opt/madison/dev_amyc/catalyst_perl/lib/site_perl/5.14.2/SQL/Translator/Filter/AutoCRUD/StorageEngine/DBIC/ViewsAsTables.pm line 43." [error] Caught exception in DatabaseViewer::Controller::AutoCRUD::Root->do_meta "Can't bless non-reference value at /var/opt/madison/dev_amyc/catalyst_perl/lib/site_perl/5.14.2/SQL/Translator/AutoCRUD/Quick.pm line 31." [error] Caught exception in DatabaseViewer::Controller::AutoCRUD::Root->bootstrap "Can't call method "t" on an undefined value at /var/opt/madison/dev_amyc/catalyst_perl/lib/site_perl/5.14.2/Catalyst/Plugin/AutoCRUD/Controller/Root.pm line 191." [debug] Response Code: 500; Content-Type: text/html; charset=utf-8; Content-Length: 244178 [info] Request took 19.192447s (0.052/s) .------------------------------------------------------------+-----------. | Action                                                     | Time      | +------------------------------------------------------------+-----------+ | /autocrud/root/base                                        | 14.42307s | |  -> DatabaseViewer::Model::AutoCRUD::StorageEngine::DBIC-- | 14.42053s | | >dispatch_table                                            |           | | /autocrud/root/site                                        | 0.000292s | | /autocrud/root/schema                                      | 0.000218s | | /autocrud/root/call                                        | 4.138346s | |  -> /autocrud/root/bootstrap                               | 4.137756s | |   -> /autocrud/root/build_site_config                      | 0.084003s | |   -> /autocrud/root/acl                                    | 0.000624s | |   -> /autocrud/root/do_meta                                | 4.050758s | |    -> DatabaseViewer::Model::AutoCRUD::StorageEngine::DBI- | 4.049115s | | C->schema_metadata                                         |           | | /autocrud/ajax/base                                        | 0.082276s | |  -> /autocrud/ajax/acl                                     | 0.081489s | | /autocrud/ajax/end                                         | 0.000812s | '------------------------------------------------------------+-----------' Show quoted text
________________________________ From: Oliver Gorwits via RT <bug-Catalyst-Plugin-AutoCRUD@rt.cpan.org> To: acerrito@yahoo.com Sent: Saturday, July 28, 2012 8:27 PM Subject: Re: [rt.cpan.org #73961] Error when requesting table <URL: https://rt.cpan.org/Ticket/Display.html?id=73961 > On 2012-07-25 21:31, via RT wrote:
> Queue: Catalyst-Plugin-AutoCRUD >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=73961 > > > We recently moved from Sybase to Oracle.  I'm getting the same error > when I try to use AutoCRUD with the new Oracle database.
Okay, very sorry to hear that. Let's have another go at getting to the bottom of this. I'd like you to try to dump more detailed metadata from the plugin, and send that to me. Because it contains a lot of information about your DB schema, you can send this email directly to <oliver@cpan.org> so it won't be logged here in the ticketing system To get the metadata, follow the instructions at this link under "Metdata Dump": https://metacpan.org/module/Catalyst::Plugin::AutoCRUD::Manual::Troubleshooting#Metadata-Dump The URL you need will probably be something like: /autocrud/site/default/schema/madisondb/source/event/dumpmeta_html If it doesn't explode, you will get back a page which you can send me. If it does explode before displaying the metadata, try to change to a different table which does work (i.e. change the url to .../source/<somethingelse>/...). That should still have most of the useful metadata. regards, oliver.
On Tue Sep 04 17:43:15 2012, ace wrote: Show quoted text
> It errors before I can get to the dumpmeta page:
Have you set the AUTOCRUD_DEBUG environment variable to 1 ? The log linbe "Access forbidden by configuration" suggests this is not set. https://metacpan.org/module/OLIVER/Catalyst-Plugin-AutoCRUD- 2.123610/lib/Catalyst/Plugin/AutoCRUD/Manual/Troubleshooting.pod regards, oliver. Show quoted text
> > Trying to access this url: > >
http://myserver:3000/autocrud/site/default/schema/madisondb/source/event/dumpmeta_html Show quoted text
> > from var: moduleactiontype[info] *** Request 1 (0.002/s) [22025] [Tue > Sep  4 17:17:52 2012] *** > [debug] "GET" request for > "autocrud/site/default/schema/madisondb/source/event/dumpmeta_html" > from "10.17.1.16" > [debug] Path is "/autocrud/ajax/dumpmeta_html" > [debug] autocrud: backends are Model::AutoCRUD::StorageEngine::DBIC > [debug] autocrud: generated global dispatch table > [debug] autocrud: loaded config for site [default] > [debug] Access forbidden by configuration to [default]->[madisondb]-
> >[event]->[dumpmeta_html]
> [error] Caught exception in > DatabaseViewer::Model::AutoCRUD::StorageEngine::DBIC-
> >schema_metadata "Error with filter 1 : Can't call method "extra"
> on an undefined value at >
/var/opt/madison/dev_amyc/catalyst_perl/lib/site_perl/5.14.2/SQL/Translator/Filter/AutoCRUD /StorageEngine/DBIC/ViewsAsTables.pm Show quoted text
> line 43." > [error] Caught exception in > DatabaseViewer::Controller::AutoCRUD::Root->do_meta "Can't bless > non-reference value at >
/var/opt/madison/dev_amyc/catalyst_perl/lib/site_perl/5.14.2/SQL/Translator/AutoCRUD/Quic k.pm Show quoted text
> line 31." > [error] Caught exception in > DatabaseViewer::Controller::AutoCRUD::Root->bootstrap "Can't call > method "t" on an undefined value at >
/var/opt/madison/dev_amyc/catalyst_perl/lib/site_perl/5.14.2/Catalyst/Plugin/AutoCRUD/Cont roller/Root.pm Show quoted text
> line 191." > [debug] Response Code: 500; Content-Type: text/html; charset=utf-8; > Content-Length: 244178 > [info] Request took 19.192447s (0.052/s) > .------------------------------------------------------------ > +-----------. > | Action                                                     | Time > | > +------------------------------------------------------------ > +-----------+ > | /autocrud/root/base                                        | > 14.42307s | > |  -> DatabaseViewer::Model::AutoCRUD::StorageEngine::DBIC-- | > 14.42053s | > | >dispatch_table                                            | > | > | /autocrud/root/site                                        | > 0.000292s | > | /autocrud/root/schema                                      | > 0.000218s | > | /autocrud/root/call                                        | > 4.138346s | > |  -> /autocrud/root/bootstrap                               | > 4.137756s | > |   -> /autocrud/root/build_site_config                      | > 0.084003s | > |   -> /autocrud/root/acl                                    | > 0.000624s | > |   -> /autocrud/root/do_meta                                | > 4.050758s | > |    -> DatabaseViewer::Model::AutoCRUD::StorageEngine::DBI- | > 4.049115s | > | C->schema_metadata                                         | > | > | /autocrud/ajax/base                                        | > 0.082276s | > |  -> /autocrud/ajax/acl                                     | > 0.081489s | > | /autocrud/ajax/end                                         | > 0.000812s | > '------------------------------------------------------------ > +-----------' > > > > > > ________________________________ > From: Oliver Gorwits via RT <bug-Catalyst-Plugin- > AutoCRUD@rt.cpan.org> > To: acerrito@yahoo.com > Sent: Saturday, July 28, 2012 8:27 PM > Subject: Re: [rt.cpan.org #73961] Error when requesting table > > <URL: https://rt.cpan.org/Ticket/Display.html?id=73961 > > > On 2012-07-25 21:31, via RT wrote:
> > Queue: Catalyst-Plugin-AutoCRUD > >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=73961 > > > > > We recently moved from Sybase to Oracle.  I'm getting the same error > > when I try to use AutoCRUD with the new Oracle database.
> > Okay, very sorry to hear that. Let's have another go at getting to the > bottom of this. > > I'd like you to try to dump more detailed metadata from the plugin, > and > send that to me. Because it contains a lot of information about your > DB > schema, you can send this email directly to <oliver@cpan.org> so it > won't be logged here in the ticketing system > > To get the metadata, follow the instructions at this link under > "Metdata Dump": > >
https://metacpan.org/module/Catalyst::Plugin::AutoCRUD::Manual::Troubleshooting#Metadata- Show quoted text
> Dump > > The URL you need will probably be something like: > > /autocrud/site/default/schema/madisondb/source/event/dumpmeta_html > > If it doesn't explode, you will get back a page which you can send me. > If it does explode before displaying the metadata, try to change to a > different table which does work (i.e. change the url to > .../source/<somethingelse>/...). That should still have most of the > useful metadata. > > regards, > oliver.
-- regards, oliver.