tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dini Omar" <din...@gmail.com>
Subject jdbc driver fails with tomcat
Date Fri, 26 Sep 2008 16:34:05 GMT
I am trying to send an array to a pl/sql module but for some reason i am
unable to get the connection object.

Here is the line of code that fails

[code]
Connection conn = null;
ArrayDescriptor rectabDescriptor =
ArrayDescriptor.createDescriptor("CCS21_CONSIGNMENTLIST_TYPE",conn);
<<FAILS HERE<<
ARRAY awbNoHwbs = new ARRAY(rectabDescriptor,conn,childLessAwbs);
ARRAY hwbs = new ARRAY(rectabDescriptor,conn,hwbList);

OracleCallableStatement cst =
(OracleCallableStatement)conn.prepareCall(stp.SUBMIT_CONSIGNMENT_STORED_PROC);

[/code]

Here is the stack trace

[code]
java.lang.ClassCastException:
org.apache.tomcat.dbcp.dbcp.DelegatingCallableStatement
    at
com.acbt.ccstt.data.accessors.ConsignmentDAO.submitDeclaration(ConsignmentDAO.java:301)
    at
com.acbt.ccstt.presentation.events.consignments.select.SubmitDeclaration.midAction(SubmitDeclaration.java:68)
    at
com.acbt.ccstt.presentation.events.CCS21EventAction.execute(CCS21EventAction.java:36)
    at
org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
    at
org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
    at
org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
    at
org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
    at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
    at
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
    at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
    at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
    at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
    at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
    at java.lang.Thread.run(Thread.java:595)
[/code]

And here is my connection config

Struts Web.xml file

[code]
<resource-ref>
     <description>Oracle Datasource</description>
     <res-ref-name>jdbc/ccs21db</res-ref-name>
     <res-type>javax.sql.DataSource</res-type>
     <res-auth>Container</res-auth>
    </resource-ref>
[/code]

Metainf/context.xml
[code]
    <Resource name="jdbc/thedb" auth="Container"
              type="javax.sql.DataSource"
driverClassName="oracle.jdbc.OracleDriver"
              url="jdbc:oracle:thin:@xxx.xxx.xxx.xxx:1521:dbsid"
              username="xxx" password="xxx" maxActive="20" maxIdle="10"
              maxWait="-1"/>
[/code]

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message