geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcin Swinoga <Marcin.Swin...@pl.ibm.com>
Subject Error trying to set a binary stream as a PreparedStatement argument
Date Wed, 28 Oct 2009 20:21:23 GMT

Hi,

I was just trying to execute a query that is supposed to insert some rows
into a database table mapping the values from a given XML.
While executing the query I got a "java.lang.AbstractMethodError:
org.tranql.connector.jdbc.PreparedStatementHandle.setBinaryStream
(ILjava/io/InputStream;)V"

The following code:
...
Connection conn = ctx.lookup("java:comp/env/jdbc/mak");
String sql = "INSERT INTO myTable (ID_MAIN, TXT) " +
" FROM XMLTABLE ('$i//REC' PASSING CAST (? AS XML) AS \"i\"" +
" COLUMNS " +
" ID_MAIN BIGINT PATH 'ID_MAIN', " +
" TXT VARGRAPHIC(300) PATH 'TXT' ) AS x";

PreparedStatement insertStmt = conn.prepareStatement(sql);
insertStmt.setBinaryStream(1, new ByteArrayInputStream("<?xml
version=\"1\"?>
<FIND><REC><ID_MAIN>140093</ID_MAIN><TXT>885.0-3</TXT></REC></FIND>".getBytes
()));
insertStmt.executeUpdate();

was run as part of a web application on WAS CE 2.1.1.3 with a DB2
connection pool configured as pool type: /TranQL XA Resource Adapter for
DB2/

Could you please direct me to what am I doing wrong?.

Below is the full stack trace:

2009-10-28 11:10:27,552 ERROR [[SzukajController]] Servlet.service() for
servlet SzukajController threw exception java.lang.AbstractMethodError:
org.tranql.connector.jdbc.PreparedStatementHandle.setBinaryStream
(ILjava/io/InputStream;)V
at database.SzukajDB.getXMLintoDB(SzukajDB.java:211)
at controllers.SzukajController.processRequest(SzukajController.java:160)
at controllers.SzukajController.doPost(SzukajController.java:57)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:206)
at filters.LoginFilter.doFilter(LoginFilter.java:57)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:206)
at filters.EncodingFilter.doFilter(EncodingFilter.java:32)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:191)
at org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke
(DefaultSubjectValve.java:56)
at org.apache.geronimo.tomcat.GeronimoStandardContext
$SystemMethodValve.invoke(GeronimoStandardContext.java:406)
at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke
(GeronimoBeforeAfterValve.java:47)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:109)
at org.apache.catalina.valves.AccessLogValve.invoke
(AccessLogValve.java:567)
at org.apache.geronimo.tomcat.valve.ThreadCleanerValve.invoke
(ThreadCleanerValve.java:40)
at org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Unknown Source)

Best Regards,
Marcin


Mime
View raw message