Solved

CLI0126E  Operation invalid at this time. SQLSTATE=HY011

Posted on 2004-08-26
14
2,684 Views
Last Modified: 2013-12-10
Hi,

  I have 2 EJB modules in my project, one is EJB1.1 and the other one is EJB 2.0. I am using WSAD 5.1.1, i created 2 data sources one with type V4 for EJB 1.1 Entity bean and one with type v5 for EJB 2.0 Entity bean. I used COM.ibm.db2.jdbc.DB2XADataSource as the implementation class for both the data sources.

 When i start the server in the Test Environment i am getting the following Exception, i am using DB2 7.1.1

[8/26/04 11:26:08:786 EDT] 3ce9fbda EJBContainerI I WSVR0207I: Preparing to start EJB jar: AWPositionSummaryEntityEJB1.jar
[8/26/04 11:26:09:347 EDT] 3ce9fbda ConnectO      E CONM6012E: Database error setting AutoCommit for data source (DB2EHOST).
[8/26/04 11:26:09:447 EDT] 3ce9fbda JDBCPersister W CNTR0031W: Error starting CMP bean BBHActionView2004EAR#AWPositionSummaryEntityEJB1.jar#PositionSummaryEntity:
 com.ibm.ejs.persistence.EJSPersistenceException: ; nested exception is:
      COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0126E  Operation invalid at this time. SQLSTATE=HY011
      at com.ibm.ejs.persistence.EJSJDBCPersister.initialize(EJSJDBCPersister.java:452)
      at com.ibm.ejs.persistence.EJSJDBCPersister.create(EJSJDBCPersister.java:195)
      at com.ibm.ws.cpi.JDBCPersisterFactoryImpl.create(JDBCPersisterFactoryImpl.java:102)
      at com.ibm.ejs.container.BeanMetaData.completeInitialization(BeanMetaData.java:1247)
      at com.ibm.ws.runtime.component.EJBContainerImpl.createBeanMetaData(EJBContainerImpl.java:981)
      at com.ibm.ws.runtime.component.EJBContainerImpl.createModuleMetaData(EJBContainerImpl.java:796)
      at com.ibm.ws.runtime.component.EJBContainerImpl.createMetaData(EJBContainerImpl.java:1517)
      at com.ibm.ws.runtime.component.MetaDataMgrImpl.createFactoryMetaData(MetaDataMgrImpl.java:115)
      at com.ibm.ws.runtime.component.MetaDataMgrImpl.createMetaData(MetaDataMgrImpl.java:159)
      at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:350)
      at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:575)
      at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:271)
      at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:249)
      at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
      at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
      at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:125)
      at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
      at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
      at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:183)
      at com.ibm.ws.runtime.WsServer.start(WsServer.java:128)
      at com.ibm.ws.runtime.WsServer.main(WsServer.java:225)

I appreciate your help.

Thanks
0
Comment
Question by:mvkraju
  • 6
  • 6
14 Comments
 
LVL 7

Expert Comment

by:damonf
ID: 11904265
I've run into this error before.  It seems to be caused when the database thinks you are setting autoCommit in the middle of a transaction.  If memory serves, I couldn't find anyplace in my code where I was setting autocommit, yet I got the error anyway.  Unfortunately for you, you're using CMP so you can't just set autoCommit wherever you want.  Do you need the XA driver?  I think the XA driver makes this harder.  Also, I noticed you're using a pretty old version of DB2 ... have you tried using a newer driver version.  We got by some of our problems by using a newer driver (7.2 fixpack 7)
0
 

Author Comment

by:mvkraju
ID: 11904709
Initially i used COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource driver, that time i  used to get the following error

INFO : 2004-08-25 16:42:02,202 BS58631 bbh.av.ejb.response.ResponsesBean ResponsesBean: BS58631(3): saveNewResponseRecord: finding position record: 20040225091010477360
[8/25/04 16:42:02:202 EDT] 7db23081 TransactionIm E WTRN0062E: An illegal attempt to use multiple resources that have only one-phase capability has occurred within a global transaction.

So i changed it to XA Driver. When i am using DB2 7.1.1 as my Data base can i user newer driver that is 7.2 fixpack 7 ???

Thanks
0
 
LVL 7

Expert Comment

by:damonf
ID: 11904810
Okay, so you definitely need the XA capability.  I was just checking.

Yes, you can use a newer driver with the older databse.  My backend is 7.1.
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 7

Expert Comment

by:damonf
ID: 11904829
BTW I'm not suggesting 7.2 fp 7 is necessarily the best version to use ... it just happens to be the one I'm using.  If I were you I'd use the newest version 7 driver I could get my hands on.
0
 

Author Comment

by:mvkraju
ID: 11905445
Is it enough to get newest version 7 driver or do i need to install the same db2 version client in my machine?

0
 
LVL 7

Expert Comment

by:damonf
ID: 11905705
I'm not sure what you mean ... installing the client and the driver are the same thing.  I may have confused you by mixing terms.
0
 

Author Comment

by:mvkraju
ID: 11906455
Sorry, it doesn't work that way, i tried it in the past. There is no backward compatibility as per DB2 Client.
0
 

Author Comment

by:mvkraju
ID: 11906973
I guess just i can try with db2java.zip newer version, i no need to install client as per Application server.
I will give a try, let's see....
0
 
LVL 7

Accepted Solution

by:
damonf earned 125 total points
ID: 11907036
Basically if you want to use a newer db2java.zip version, you have to install a new version of the client.  Are you saying that your DB2 resides on the WebSphere server so you're effectively installing a new driver on the DB2 server platform?  If that's your issue then you are correct:  I'm pretty sure you can't upgrade the database drivers on the server machine.

However, if your DB2 resides on a DIFFERENT machine, you can install whatever client you want on the WAS box or on your workstation.
0
 

Author Comment

by:mvkraju
ID: 11917643
I tried it with new version of DB2java.zip file, it did not work.
I guess my problem is the server could not start CMP 1.1 bean.

0
 

Author Comment

by:mvkraju
ID: 11957872
It worked for me after i appled DB2 Fix Pack same as the server.
My server has DB2 V7.1.1 FP10A, so applied the same. It worked.

Please refund my point to me.
0
 
LVL 7

Expert Comment

by:damonf
ID: 11962412
I'm not going to grub for points, but I did try to help and I think I steered you in the right direction even if I didn't give you the exact answer.  That's usually worth a "B" grade.  It's not really fair to have your points refunded when the comments really did help you, even if they weren't spot on. FWIW.  If you really want your points back, you have to post a Q in the community support forum.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Define alias for servlet 5 52
Java: modify max heap size 7 146
How to Clone Weblogic and OBIEE servers to DR 6 533
VS 2015 Apache Cordova mobile app 2 88
This exercise is about for the following scenario: Dmgr and One node with 2 application server. Each application server contains it owns application. Application server name as follows server1 contains app1 server2 contains app1 Prereq…
Most of the developers using Tomcat find it easy to configure the datasource in Server.xml and use the JNDI name in the code to get the connection.  So the default connection pool using DBCP (or any other framework) is made available and the life go…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now