Solved

CLI0126E  Operation invalid at this time. SQLSTATE=HY011

Posted on 2004-08-26
14
2,658 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
 
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

-Xmx and -Xms are the two JVM options often used to tune JVM heap size.   Here are some common mistakes made when using them:   Assume BigApp is a java class file for the below examples. 1.         Missing m, M, g or G at the end …
Verbose logging is used to diagnose garbage collector problems. By default, -verbose:gc output is written to either native_stderr.log or native_stdout.log.   It is also possible to redirect the logs to a user-specified file. This article will de…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

744 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

15 Experts available now in Live!

Get 1:1 Help Now