• 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

I am getting SQLSTATE: 23504 even though I am using cascade delete

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all

In my application, I am using EJBs. I have 2 EJBs that have a 0ne-to-many relationship (customer-customerNumbers). I have enabled the cascade delete.
When I was using DB2 legacy CLI based type 2 JDBC driver, when I tried to delete the customer, it would delete the customer and all of its numbers without any problems.
When I enabled caching (Life time in cache) and changed to DB2 universal JDBC driver, when I try to do the same, I get the following error:

javax.transaction.TransactionRolledbackException: CORBA TRANSACTION_ROLLEDBACK 0x0 No; nested exception is:
org.omg.CORBA.TRANSACTION_ROLLEDBACK:

Trace from server: 306148906 at host a25ciwps001.toronto.ca.ibm.com >>
org.omg.CORBA.TRANSACTION_ROLLEDBACK: javax.transaction.TransactionRolledbackException: ; nested exception is:
javax.ejb.TransactionRolledbackLocalException: ; nested exception is: com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -532, SQLSTATE: 23504, SQLERRMC: CCSP.CUSTOMER_NUMBER.CUSTOMERN_FK vmcid: 0x0 minor code: 0 completed: No
at com.ibm.ejs.csi.OrbUtilsImpl.mapException(OrbUtilsImpl.java:76)
at com.ibm.ejs.container.RemoteExceptionMappingStrategy.mapEJBException(RemoteExceptionMappingStrategy.java:391)
at com.ibm.ejs.container.RemoteExceptionMappingStrategy.mapException(RemoteExceptionMappingStrategy.java:112)
at com.ibm.ejs.container.RemoteExceptionMappingStrategy.setUncheckedException(RemoteExceptionMappingStrategy.java:202)
at com.ibm.ejs.container.EJSDeployedSupport.setUncheckedException(EJSDeployedSupport.java(Compiled Code))


For some reason, activating the cache and changing the driver caused this error to happen. I don't know whether this is a WAS bug or not. Can anyone help me out?
Thanks alot
 
The happiness of your life depends upon the quality of your thoughts -Marcus Aurelius ... think about this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic