It looks to me as if there is an error in the error reporting.  The actual
error is (and should be) a compilation error - these lines:
      org.apache.cocoon.components.language.LanguageException: Error
compiling test_xsp:
      ERROR 1 (org/apache/cocoon/www/tutorial/test_xsp.java):
I'm not sure where the line
      Line 306, column 0: Unhandled exception type SQLException
came from; it appears to be gathering it from the generated code, but it
isn't the exception you got, I think.

The compilation error is because you don't have the required single non-xsp
child element of xsp:page.  E.g., you have
<xsp:page>
      <esql:connection>
            ....

but you MUST have a non-XSP child element which will be the root element of
the generated XML, like so:
<xsp:page
      <mypage>
            <esql:connection>
                  ....
-Christopher



|---------+---------------------------->
|         |           Frederik Himpe   |
|         |           <[EMAIL PROTECTED]|
|         |           afox.com>        |
|         |           Sent by: news    |
|         |           <[EMAIL PROTECTED]|
|         |           rg>              |
|         |                            |
|         |                            |
|         |           09/15/2003 10:36 |
|         |           AM               |
|         |           Please respond to|
|         |           users            |
|         |                            |
|---------+---------------------------->
  
>--------------------------------------------------------------------------------------------------------------|
  |                                                                                    
                          |
  |       To:       [EMAIL PROTECTED]                                                  
                    |
  |       cc:                                                                          
                          |
  |       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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to