cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank Taffelt" <frank.taff...@interface-business.de>
Subject Re: Unhandled exception type SQLException
Date Mon, 15 Sep 2003 14:58:17 GMT
try the following, note the nested esql:row-results in esql:results:


<esql:connection>
  <esql:pool>sheria</esql:pool>
  <esql:execute-query>
    <esql:query>SELECT loginname, password FROM actors</esql:query>
    <esql:results>
    <users>
      <esql:row-results>
        <user>
           <login><esql:get-string column="loginname"/></login>
           <password><esql:get-string column="password"/></password>
        </user>
      </esql:row-results>
     </users>
   </esql:results>
   <esql:no-results>
    <nousers/>
   </esql:no-results/>
   <esql:error-results>
       <error/>
   </esql:error-results>
</esql:execute-query>

hth, frank

----- Original Message -----
From: "Frederik Himpe" <frederikhimpe@arafox.com>
To: <users@cocoon.apache.org>
Sent: Monday, September 15, 2003 4:36 PM
Subject: esql: Unhandled exception type SQLException


> Hello,
>
> Does anybody know why this simple xsp file causes an "Unhandled exception
> type SQLException" error?
>
> <xsp:page
>       language="java"
>       xmlns:xsp="http://apache.org/xsp"
>       xmlns:esql="http://apache.org/cocoon/SQL/v2"
> >
>
> <esql:connection>
>   <esql:pool>sheria</esql:pool>
>   <esql:execute-query>
>     <esql:query>SELECT loginname, password FROM actors</esql:query>
>     <esql:error-results/>
>     <esql:results/>
>     <users>
>         <esql:row-results>
>           <user>
>              <login><esql:get-string column="loginname"/></login>
>              <password><esql:get-string column="password"/></password>
>           </user>
>         </esql:row-results>
>       </users>
>     <esql:no-results/>
>     <esql:error-results>
> <error/>
>     </esql:error-results>
>   </esql:execute-query>
>
> </esql:connection>
> </xsp:page>
>
> Error message:
>
> cause
>
> org.apache.cocoon.components.language.LanguageException: Error compiling
test_xsp:
> ERROR 1 (org/apache/cocoon/www/tutorial/test_xsp.java):
> ...
>     if (_esql_query != null) {
>       _esql_queries.push(_esql_query);
>     }
>
>
> // start error (lines 306-306) "Unhandled exception type SQLException"
>     _esql_query = _esql_connection.createQuery(
>
> // end error
>              String.valueOf(""),
>              String.valueOf(
>       ""
>
>
> ...
> Line 306, column 0: Unhandled exception type SQLException
>
> I'm using Cocoon 2.1.1 on Tomcat 4.1.27 with PostgreSQL JDBC drivers.
>
> Frederik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message