cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nadine Carlton" <nadine_carl...@hp.com>
Subject esql no method found errors
Date Sat, 10 Feb 2001 01:37:39 GMT
Hi,

  I've just installed Cocoon 1.8.2 and Tomcat 3.2.1 and I have
updated the sample esql.xml to work with my oracle instance.
The sample works fine.

  However, I'm adding some result changes to use <esql:get-column-name>
and <esql:get-string> and I'm getting xsp method not found errors.  

The esql code is calling 
getMetaData().getColumnName(<xsl:value-of select="@column" /> )
Should this be _esql_query.resultset_metadata.getColumnName
(<xsl:value-of select="@column" /> )  ?

The getString error is from the get-string-encoded template, used 
in get-columns and get-string.  I don't think there is a getString
method in the jdbc resultset.  Donald?  

Here is a simple
change to the esql sample that hits the getColumnName error:

<esql:execute-query>
<esql:query>select deptno,dname from dept</esql:query>
<esql:results>
<header>header info</header>
<esql:row-results>
<department>
<id><esql:get-int column="deptno"/></id>
<name><esql:get-string column="dname"/></name>
<esql:connection>
<esql:driver>oracle.jdbc.driver.OracleDriver</esql:driver>
<esql:dburl>jdbc:oracle:thin:@nc703572:1521:orant815</esql:dburl>
<esql:username>scott</esql:username>
<esql:password>tiger</esql:password>
<esql:execute-query>
<esql:query>select ename from emp where deptno = <esql:parameter type="int"><esql:get-int
ancestor="1" column="deptno"/></esql:parameter></esql:query>
<esql:results>
<esql:row-results>
<user><esql:get-string column="ename"/></user>
<esql:get-column-name>1</esql:get-column-name>
</esql:row-results>
</esql:results>
<esql:no-results>
<user>No employees</user>
</esql:no-results>
</esql:execute-query>
</esql:connection>
</department>
</esql:row-results>
<footer>footer info</footer>
</esql:results>
</esql:execute-query>


java.lang.Exception: XSP Java Compiler: Compilation failed for _evuesql.java
309: No method matching getColumnName() found in interface java.sql.ResultSetMetaData.

          xspExpr(_esql_query.resultset.getMetaData().getColumnName(), document)

                                                                   ^

329: No method matching getString() found in interface java.sql.ResultSet.

          xspExpr(_esql_query.resultset.getString()

                                                 ^

2 errors



 at org.apache.cocoon.processor.xsp.language.java.XSPJavaProcessor.compile(XSPJavaProcessor.java,
Compiled Code)
 at java.lang.Exception.<init>(Exception.java, Compiled Code)
 at org.apache.cocoon.processor.xsp.language.java.XSPJavaProcessor.compile(XSPJavaProcessor.java,
Compiled Code)
 at org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java, Compiled Code)
 at org.apache.cocoon.Engine.handle(Engine.java, Compiled Code)
 at org.apache.cocoon.Cocoon.service(Cocoon.java:183)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
 at org.apache.tomcat.core.Handler.service(Handler.java:286)
 at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java,
Compiled Code)
 at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java, Compiled Code)
 at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java, Compiled Code)
 at java.lang.Thread.run(Thread.java:479)


Nadine Carlton
HP

Mime
View raw message