[jboss-user] [Installation, Configuration & Deployment] - simple servlet jsp application with Oracle 9i -- using Oracl

amit.rajpurkar do-not-reply at jboss.com
Wed Aug 23 21:52:47 EDT 2006


I am trying to use OraclePreparedStatement from Connection object and its throwing an exception:-- 

2006-08-24 11:35:32,019 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/myapp001].[Controller]] Servlet.service() for servlet Controller threw exception
java.lang.ClassCastException: org.jboss.resource.adapter.jdbc.WrappedPreparedStatement
	at com.smiths.myapp01.business.DatabaseOperator.captureFile(DatabaseOperator.java:146)
	at com.smiths.myapp01.servlets.Controller.processRequest(Controller.java:82)
	at com.smiths.myapp01.servlets.Controller.doPost(Controller.java:432)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
	at java.lang.Thread.run(Thread.java:595)
2006-08-24 11:39:41,099 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] Running RemoverTask


The code line from where this exception arises is:
OraclePreparedStatement pstmt = (OraclePreparedStatement)conn.prepareStatement(sqlString.toString());

conn is the java.sql.Connection object coming from jndi (oracle-xa-ds.xml)

Any suggestions as to where i can be wrong????

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967127#3967127

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967127



More information about the jboss-user mailing list