I am getting SQLSTATE: 23504 even though I am using cascade delete
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > WebSphere > WebSphere Application Server > I am getting SQLSTATE: 23504 even though I am using cascade delete




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

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


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-22-05 12:50 PM

Hello all

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

javax.transaction.TransactionRolledbackException: CORBA TRANSACTION_ROLLEDBA
CK 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.TransactionRolledbac
kException:  ; nested exception is:
javax.ejb.TransactionRolledbackLocalException:  ; nested exception is: com.i
bm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -532, SQLSTATE: 23504, SQ
LERRMC: CCSP.CUSTOMER_NUMBER.CUSTOMERN_FK  vmcid: 0x0  minor code: 0  comple
ted: No
at com.ibm.ejs.csi.OrbUtilsImpl.mapException(OrbUtilsImpl.java:76)
at com.ibm.ejs.container.RemoteExceptionMappingStrategy.mapEJBException(Remo
teExceptionMappingStrategy.java:391)
at com.ibm.ejs.container.RemoteExceptionMappingStrategy.mapException(RemoteE
xceptionMappingStrategy.java:112)
at com.ibm.ejs.container.RemoteExceptionMappingStrategy.setUncheckedExceptio
n(RemoteExceptionMappingStrategy.java:202)
at com.ibm.ejs.container.EJSDeployedSupport.setUncheckedException(EJSDeploye
dSupport.java(Compiled Code))


For some reason, activating the cache and changing the driver caused this er
ror to happen. I don't know whether this is a WAS bug or not. Can anyone hel
p me out?
Thanks alot





[ Post a follow-up to this message ]



    Re: I am getting SQLSTATE: 23504 even though I am using cascade delete  
Paul Ilechko


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-22-05 12:50 PM

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 h
elp 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.






[ Post a follow-up to this message ]



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


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-24-05 11: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 ha
ve 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 anyt
hing about this who can help me out..
Thanks





[ Post a follow-up to this message ]



    Re: I am getting SQLSTATE: 23504 even though I am using cascade delete  
Paul Ilechko


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-24-05 11: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.






[ Post a follow-up to this message ]



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


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-25-05 07: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 t
hat was fixed with this fixpack 5. This PMR had to do with another caching p
roblem. I am guessing that this was partially what caused the problem at han
d. 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





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:21 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register