[Catalyst] Error loading data from schema

Kenneth S Mclane ksmclane at us.ibm.com
Wed Apr 4 17:11:15 GMT 2012


From:
Eden Cardim <edencardim at gmail.com>
To:
The elegant MVC web framework <catalyst at lists.scsys.co.uk>
Date:
04/04/2012 11:13 AM
Subject:
Re: [Catalyst] Error loading data from schema



>>>>> "Kenneth" == Kenneth S Mclane <ksmclane at us.ibm.com> writes:

    Kenneth> I am getting the following error: Caught exception in
    Kenneth> dbms::Controller::AccountView->list "Can't call method "all" 
on
    Kenneth> an undefined value at
    Kenneth> 
/tmp/catalyst/dbms/script/../lib/dbms/Controller/AccountView.pm
    Kenneth> line 7."

    Kenneth> this is the referenced sub:

    Kenneth> sub list : Local { my ($self, $c) = @_; $c->stash(accounts =>
    Kenneth> $c->model('dbms::ACCOUNT_VIEW')->all); $c->stash(template =>
    Kenneth> 'accountview/list.tt2'); }

    Kenneth> I have seen quite a few posts about this error but no real
    Kenneth> explanations of what is causing the issue.  I created a view 
in
    Kenneth> the DB containing the data I need to display on the page. The
    Kenneth> error is occurring at this line: $c->stash(accounts => $c->
    Kenneth> model('dbms::ACCOUNT_VIEW')->all); which I have tried several
    Kenneth> different things. If I remove the ->all I get no error and my
    Kenneth> header row appears. I cannot find anything that tells me
    Kenneth> specifically what this should be composed of. Any pointers to
    Kenneth> help figure this out are appreciated.

When the app loads, you should get a list of loaded components, please 
show us
that list.
 
[debug] Debug messages enabled
[debug] Statistics enabled
[debug] Loaded plugins:
.----------------------------------------------------------------------------.
| Catalyst::Plugin::ConfigLoader  0.30   |
'----------------------------------------------------------------------------'

[debug] Loaded dispatcher "Catalyst::Dispatcher"
[debug] Loaded engine "Catalyst::Engine"
[debug] Found home "/tmp/catalyst/dbms"
[debug] Loaded Config "/tmp/catalyst/dbms/dbms.conf"
[debug] Loaded components:
.-----------------------------------------------------------------+----------.
| Class                                                           | Type  
|
+-----------------------------------------------------------------+----------+
| dbms::Controller::AccountView                                   | 
instance |
| dbms::Controller::Root                                          | 
instance |
| dbms::Model::ORANGES                                            | 
instance |
| dbms::Model::ORANGES::Account                                   | class  
 |
| dbms::Model::ORANGES::AccountView                               | class  
 |
| dbms::Model::ORANGES::Alert                                     | class  
 |
| dbms::Model::ORANGES::Assignment                                | class  
 |
| dbms::Model::ORANGES::Assignments                               | class  
 |
| dbms::Model::ORANGES::CfgAssignments                            | class  
 |
| dbms::Model::ORANGES::Check                                     | class  
 |
| dbms::Model::ORANGES::Compliance                                | class  
 |
| dbms::Model::ORANGES::Contact                                   | class  
 |
| dbms::Model::ORANGES::Department                                | class  
 |
| dbms::Model::ORANGES::File                                      | class  
 |
| dbms::Model::ORANGES::Fixtime                                   | class  
 |
| dbms::Model::ORANGES::Frequency                                 | class  
 |
| dbms::Model::ORANGES::Latest                                    | class  
 |
| dbms::Model::ORANGES::Manager                                   | class  
 |
| dbms::Model::ORANGES::Metrics                                   | class  
 |
| dbms::Model::ORANGES::Priv                                      | class  
 |
| dbms::Model::ORANGES::Progress                                  | class  
 |
| dbms::Model::ORANGES::Report                                    | class  
 |
| dbms::Model::ORANGES::Retention                                 | class  
 |
| dbms::Model::ORANGES::Schedule                                  | class  
 |
| dbms::Model::ORANGES::Server                                    | class  
 |
| dbms::Model::ORANGES::Status                                    | class  
 |
| dbms::Model::ORANGES::Subsystem                                 | class  
 |
| dbms::Model::ORANGES::Ticket                                    | class  
 |
| dbms::Model::ORANGES::Upload                                    | class  
 |
| dbms::View::HTML                                                | 
instance |
| dbms::View::accountview                                         | 
instance |
'-----------------------------------------------------------------+----------'

[debug] Loaded Private actions:
.----------------------+--------------------------------------+--------------.
| Private              | Class                                | Method   |
+----------------------+--------------------------------------+--------------+
| /default             | dbms::Controller::Root               | default  |
| /end                 | dbms::Controller::Root               | end   |
| /index               | dbms::Controller::Root               | index   |
| /accountview/list    | dbms::Controller::AccountView        | list   |
'----------------------+--------------------------------------+--------------'

[debug] Loaded Path actions:
.-------------------------------------+--------------------------------------.
| Path                                | Private   |
+-------------------------------------+--------------------------------------+
| /accountview/list/...               | /accountview/list   |
'-------------------------------------+--------------------------------------'

[info] dbms powered by Catalyst 5.90011
HTTP::Server::PSGI: Accepting connections at http://0:3000/

Strange, I do not see it listed, yet it got created and works when I call 
the /index.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20120404/9de6d691/attachment.htm


More information about the Catalyst mailing list