Solved

CLI0126E  Operation invalid at this time. SQLSTATE=HY011

Posted on 2004-08-26
14
2,698 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
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

 
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

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

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

Suggested Solutions

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…
There are numerous questions about how to setup an IBM HTTP Server to be administered from WebSphere Application Server administrative console. I do hope this article will wrap things up and become a reference for this task. You need three things…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

791 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