It's me again with esql woes... but I think this question goes beyond ESQL/JDBC.
The strange behavior I'm seeing is this:
I have an XSP page that normally produces XML data as output. I add one line to that XSP page, and it no longer produces any XML data. (In IE, this results in an IE error: XML document must have a top level element.) This would suggest that there was an error which caused the pipeline to completely fail and emit no data. But there is no error message in the Cocoon response or in any logs. Weird!
Here is the XSP page:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsp:page
xmlns:esql="http://apache.org/cocoon/SQL/v2" xmlns:xsp="http://apache.org/xsp"
xmlns:xsp-request="http://apache.org/xsp/request/2.0"
xmlns:sil="http://www.sil.org/namespace/cocoon-sql-logicsheet">
<operation home-page="home_Ethnologue_Database"
name="Create_Ethnologue_Continent" role-abbrev="editor" system="Ethnologue"
type="create">
<esql:connection>
<esql:pool>GEM-Ethnologue-SQLServer-updater</esql:pool>
<esql:execute-query>
<esql:call>{call Create_Ethnologue_Continent(<esql:parameter direction="out" type="Int">NewID</esql:parameter>)}</esql:call>
<esql:update-results>
<rows-affected>
<esql:get-update-count/>
</rows-affected>
</esql:update-results>
<esql:call-results>
<newID>
<!-- ** <esql:get-int from-call="true" column="NewID" /> ** offending line -->
</newID>
</esql:call-results>
<esql:error-results>
<error>
<exception>
<esql:to-string/>
</exception>
<message>
<esql:get-message/>
</message>
</error>
</esql:error-results>
<esql:no-results>
<no-results/>
</esql:no-results>
</esql:execute-query>
</esql:connection>
<auto-link on="success" page="edit_Ethnologue_Continent">
<with-param name="_id" use-param="_id"/>
</auto-link>
<auto-link on="failure" page="_back"/>
</operation>
</xsp:page>
When the "** offending line" (see above) is commented out, this XSP page gives the expected result:
<operation ...>
<rows-affected>1</rows-affected>
<newID/>
<auto-link on="success" page="edit_Ethnologue_Continent">
<with-param name="_id" use-param="_id"/>
</auto-link>
<auto-link on="failure" page="_back"/>
</operation>But when the "** offending line" is uncommented, I get no output from Cocoon.
Doing a diff on the generated java code, the only difference is the presence of the line
XSPObjectHelper.xspExpr(contentHandler, _esql_query.getCallableStatement().getInt("NewID"));
Again, if this line is causing an exception, shouldn't I see it somewhere?
I'm afraid I'm not experienced enough with Java debugging to know how to run Cocoon in a debugger and trace what's happening on this line...
I tried adding debug statements (getLogger().error(...)) in <xsp:logic> tags into the XSP to further diagnose the problem, but they didn't seem to cause any output (maybe I have to configure logging somehow?)
Can anybody suggest a way for me to troubleshoot this problem?
Thanks, Lars
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
