• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Exception when using CMP

 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a Customer entity that has a uni directional 1-to-1 relation with Address enity bean.The CMR field of Customer is homeAddress and so I have abstract methods setHomeAddress() and getHomeAddress() in Customer bean.
When I create the address for customer by calling the create of the Address bean from the Customer bean the following exception is spit on the console.
java.sql.SQLException: ORA-01453: SET TRANSACTION must be first statement of transaction at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:240) at weblogic.jdbc.oci.Statement.executeUpdate(Statement.java:357) at weblogic.jdbc.oci.Connection.setTransactionIsolation(Connection.java:519) at weblogic.jdbc.common.internal.ConnectionEnv.cleanup(ConnectionEnv.java:675) at weblogic.jdbc.common.internal.ConnectionPool.release(ConnectionPool.java:174) at weblogic.jdbc.pool.Connection.close(Connection.java:140) at weblogic.jdbc.rmi.internal.ConnectionImpl.close(ConnectionImpl.java:201) at weblogic.jdbc.rmi.SerialConnection.close(SerialConnection.java:192) at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.releaseConnection(RDBMSPersistenceManager.java:1073) at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.releaseResources(RDBMSPersistenceManager.java:1057) at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.execGenKeyNamedSequenceTableUpdateAndQuery(RDBMSPersistenceManager.java:943) at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.getNextGenKeyNamedSequenceTable(RDBMSPersistenceManager.java:767) at com.titan.address.AddressEJB_fvu9sn__WebLogic_CMP_RDBMS.ejbCreateAddress(AddressEJB_fvu9sn__WebLogic_CMP_RDBMS.java:1156) at java.lang.reflect.Method.invoke(Native Method) at weblogic.ejb20.manager.DBManager.create(DBManager.java:492) at weblogic.ejb20.manager.DBManager.localCreate(DBManager.java:471) at weblogic.ejb20.internal.EntityEJBLocalHome.create(EntityEJBLocalHome.java:167) at com.titan.address.AddressBean_fvu9sn_LocalHomeImpl.createAddress(AddressBean_fvu9sn_LocalHomeImpl.java:77) at com.titan.customer.CustomerBean.setAddress(CustomerBean.java:50) at com.titan.customer.CustomerBean.setAddress(CustomerBean.java:89) at com.titan.customer.CustomerBean_1q1rpd_EOImpl.setAddress(CustomerBean_1q1rpd_EOImpl.java:120) at com.titan.customer.CustomerBean_1q1rpd_EOImpl_WLSkel.invoke(Unknown Source) at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:298) at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:267) at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

I am using weblogic 6.1 and database is oracle.
 
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It seems pradeep that this is something related to the Isolation levels in your xml. What i feel is that u are using bean managed persistence and u have set the Transaction_Required as the isolation level and since there is no transaction started before u call methods on your bean, this exception is being thrown. Please verufy that my assumptions are right and if they are, please start a new UserTransaction before u start calling methods on the bean.
HTH
 
Beware the other head of science - it bites! Nibble on this message:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic