[Catalyst] Error loading data from schema

Kenneth S Mclane ksmclane at us.ibm.com
Wed Apr 4 14:28:31 GMT 2012


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

this is the referenced sub:

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

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

Regards

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


More information about the Catalyst mailing list