<br>
<table width=100%>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">From:</font>
<td><font size=1 face="sans-serif">Francisco Obispo &lt;fobispo@isc.org&gt;</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">To:</font>
<td><font size=1 face="sans-serif">The elegant MVC web framework &lt;catalyst@lists.scsys.co.uk&gt;</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Date:</font>
<td><font size=1 face="sans-serif">04/04/2012 09:47 AM</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Subject:</font>
<td><font size=1 face="sans-serif">Re: [Catalyst] Error loading data from
schema</font></table>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2>The error is because $c-&gt;model('dbms::ACCOUNT_VIEW')
is not defined.<br>
<br>
Did you create the view after creating the model? if so, try re-running
the create script so it can pick up the changes.<br>
<br>
Also, to avoid fatal errors, you should attempt to load the model first,
and then send to the template a data structure only if it loads properly.<br>
<br>
<br>
<br>
On Apr 4, 2012, at 7:28 AM, Kenneth S Mclane wrote:<br>
<br>
&gt; I am getting the following error: Caught exception in dbms::Controller::AccountView-&gt;list
&quot;Can't call method &quot;all&quot; on an undefined value at /tmp/catalyst/dbms/script/../lib/dbms/Controller/AccountView.pm
line 7.&quot; <br>
&gt; <br>
&gt; this is the referenced sub: <br>
&gt; <br>
&gt; sub list : Local { <br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; my ($self, $c) = @_; <br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; $c-&gt;stash(accounts =&gt; $c-&gt;model('dbms::ACCOUNT_VIEW')-&gt;all);
<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; $c-&gt;stash(template =&gt; 'accountview/list.tt2');
<br>
&gt; } <br>
&gt; <br>
&gt; I have seen quite a few posts about this error but no real explanations
of what is causing the issue. &nbsp;I created a view in the DB containing
the data I need to display on the page. &nbsp;The error is occurring at
this line: $c-&gt;stash(accounts =&gt; $c-&gt;model('dbms::ACCOUNT_VIEW')-&gt;all);
which I have tried several different things. If I remove the -&gt;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.<br>
&gt; <br>
&gt; Regards <br>
&gt; <br>
</font></tt>
<br><tt><font size=2>Thanks for the quick response. I did create it after
but I also re-ran the script and it pulled it in. I found my error, I was
using the wrong schema name, hence the object didn't exist. Now it is giving
me &quot;Couldn't render template &quot;accountview/list.tt2: file error
- config/main: not found&quot;, so I need to go track that one down. If
I can get this one page working I'll be able to create all the pages I
need then add auth and CRUD and I'm in business.<br>
<br>
<br>
<br>
</font></tt>
<br>
<br>