Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2889
  • Last Modified:

CLI0126E Operation invalid at this time. SQLSTATE=HY011

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
mvkraju
Asked:
mvkraju
  • 6
  • 6
1 Solution
 
damonfCommented:
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
 
mvkrajuAuthor Commented:
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
 
damonfCommented:
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
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
damonfCommented:
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
 
mvkrajuAuthor Commented:
Is it enough to get newest version 7 driver or do i need to install the same db2 version client in my machine?

0
 
damonfCommented:
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
 
mvkrajuAuthor Commented:
Sorry, it doesn't work that way, i tried it in the past. There is no backward compatibility as per DB2 Client.
0
 
mvkrajuAuthor Commented:
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
 
damonfCommented:
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
 
mvkrajuAuthor Commented:
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
 
mvkrajuAuthor Commented:
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
 
damonfCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 6
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now