Two Laptop Bag*
The moose likes JDBC and the fly likes Exception with DB2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Exception with DB2 " Watch "Exception with DB2 " New topic
Author

Exception with DB2

Rajendar Goud
Ranch Hand

Joined: Mar 06, 2002
Posts: 220
Hi ,
iam running a java application which uses ibm db2 driver.The driver is
com.ibm.db2.jcc.DB2Driver.

i am running the application using Tomcat4.1 with jdk1.4.2 and makes use of tomcat connection pooling also.

the code for connection pooling is as follows

javax.naming.Context ctx = new javax.naming.InitialContext();
if(ctx == null )
throw new Exception("Error - No Context");
javax.sql.DataSource ds =
(javax.sql.DataSource)ctx.lookup(
"java:comp/env/jdbc/db2mccts");
//name of the database connection pool defined in the resource link for that context.
if (ds != null) {
conn = ds.getConnection();}


Also i am making use of Scrollable ResultSet ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY.

iam facing the below Error. Is that the DB2 Driver is not able to support this ResultSet ?


com.ibm.db2.jcc.c.SQLException: DB2 SQL error: SQLCODE: -243, SQLSTATE: 36001, SQLERRMC: sSQL_CURLH200C1
at com.ibm.db2.jcc.c.cf.e(cf.java:1108)
at com.ibm.db2.jcc.c.cf.a(cf.java:882)
at com.ibm.db2.jcc.c.cf.c(cf.java:870)
at com.ibm.db2.jcc.a.be.g(be.java:119)
at com.ibm.db2.jcc.a.be.a(be.java:40)
at com.ibm.db2.jcc.a.s.a(s.java:31)
at com.ibm.db2.jcc.a.bq.g(bq.java:103)
at com.ibm.db2.jcc.c.cf.g(cf.java:866)
at com.ibm.db2.jcc.c.cf.a(cf.java:1330)
at com.ibm.db2.jcc.c.cf.executeQuery(cf.java:262)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:188)
at com.db.ac.mccTracking.business.query.ETListTableModelFactory.setETListTableModel(ETListTableModelFactory.java:199)
at com.db.ac.mccTracking.business.model.ETListBean.updateListData(ETListBean.java:828)
at org.apache.jsp.ETListCtrl_jsp._jspService(ETListCtrl_jsp.java:126)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)
at java.lang.Thread.run(Thread.java:595)



Any Help highly appreciated.

Thanks,
Rajendar
Rajendar Goud
Ranch Hand

Joined: Mar 06, 2002
Posts: 220
hi ,
any response pls?

cheers
Raj
Gaurav Chikara
Ranch Hand

Joined: Jun 09, 2000
Posts: 410
check whether db2java.zip file is in your server's classpath
This is a simple class path problem and not driver related


SCJP,SCWCD,SCBCD<br />If Opportunity doesn't knock then build the door
Rajendar Goud
Ranch Hand

Joined: Mar 06, 2002
Posts: 220
Hi,
i am working with Tomcat4.1.31,so i modified the db2java.zip to db2java.jar and tested it.but the db2java.jar doesnt contain the driver class used by Db2. So i tried the db2jcc.jar which contains the class com.ibm.db2.jcc.DB2Driver . But still iam facing the same problem.so i dont think its a classpath problem.
Does any one used the Scrollable ResultSet with this Driver?

Hoping for a fast response!

Thanks,
Rajendar
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception with DB2
 
Similar Threads
Connection Pooling
Error in JSP
isOutdated Compiler?
jasperException: oracle.jdbc.driver. OracleDriver
DynaActionForm - Exception creating bean