WebSphere Application Server - I am getting SQLSTATE: 23504 even though I am using cascade delete

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Application Server > September 2005 > I am getting SQLSTATE: 23504 even though I am using cascade delete





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

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

2005-09-22, 7:50 am

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(RemoteExceptionMappingSt
rategy.java:391)
at com.ibm.ejs.container.RemoteExceptionMappingStrategy. mapException(RemoteExceptionMappingStrat
egy.java:112)
at com.ibm.ejs.container.RemoteExceptionMappingStrategy. setUncheckedException(RemoteExceptionMap
pingStrategy.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
Paul Ilechko

2005-09-22, 7:50 am

nelsaeed@eg.ibm.com wrote:

> 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


You might want to consider only changing one thing at a time, so you can
see which of the changes actually caused the error. This is called
"debugging". It's a technique that has been used for many years in
software development.

2005-09-24, 6:03 pm

Thanks alot for the very helpful input Paul!!!
Unfortunately, life isn't as simple as we would like it to be and I don't have full control over the environment on which my application resides.
Anyway, whether the driver change caused this problem or if it was the cache activation, I am guessing that it is a WAS bug anyways.
I am still looking for someone who has faced a similar problem or knows anything about this who can help me out..
Thanks
Paul Ilechko

2005-09-24, 6:03 pm

nelsaeed@eg.ibm.com wrote:

> Thanks alot for the very helpful input Paul!!! Unfortunately, life
> isn't as simple as we would like it to be and I don't have full
> control over the environment on which my application resides. Anyway,
> whether the driver change caused this problem or if it was the cache
> activation, I am guessing that it is a WAS bug anyways. I am still
> looking for someone who has faced a similar problem or knows anything
> about this who can help me out.. Thanks



If you expect helpful input, you should at least make some kind of
effort yourself.

2005-09-25, 2:55 am

Well, I can assure you that I did alot of googling before resorting to this forum.
It is much easier for to look for the answer myself than have to ask someone and wait for an answer.
Anyway, I was able to bypass that problem.
I was using WAS v 5.1.1, but I upgraded it to 5.1.1.5 bec. there was a PMR that was fixed with this fixpack 5. This PMR had to do with another caching problem. I am guessing that this was partially what caused the problem at hand. Anyway, after installing
the fixpack, I no longer have the problem.
Hope this can be of help to anyone who runs into that problem.
Thanks
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com