cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Rusnak <martin.rus...@voipac.com>
Subject Problem getting result set from Oracle stored procedures
Date Fri, 05 Sep 2003 07:02:29 GMT
Hello all,

I am trying to get result set from a stored procedure (function)
in Oracle database, using Cocoon 2.1 ESQL. My working Java code
looks like the following:


CallableStatement cstmt = conn.prepareCall("{?=call sp_resultset()}");
cstmt.registerOutParameter(1,OracleTypes.CURSOR);
cstmt.execute();
ResultSet rs = (ResultSet)cstmt.getObject(1);


I tried to use esql:call element with the @resultset-from-object
attribute, but the page processing failed with LanguageException.
Here is the XSP code snippet I used:


<esql:execute-query>
	<esql:call resultset-from-object="1">{?=call sp_resultset()}</esql:call>
	<esql:call-results>
		<esql:row-results>
			<row>
			<esql:get-columns/>
			</row>
		</esql:row-results>
	</esql:call-results>
</esql:execute-query>



The exeption message is:


org.apache.cocoon.components.language.LanguageException: Error compiling 
servers_ora_xsp:
ERROR 1 (org/apache/cocoon/www/noc/docs/servers_ora_xsp.java):
...
"resultset-from-object",
"resultset-from-object",
"CDATA",
"1"

// start error (lines 518-518) "Syntax error on token ";", ")" expected"
);

// end error


this.contentHandler.startElement(
"http://apache.org/cocoon/SQL/v2",

...
Line 518, column 0: Syntax error on token ";", ")" expected




The question is if there is a bug in ESQL transformation and possibly
in my ESQL code...

Thanks for your help


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


Mime
View raw message