This content has been marked as final.
Show 2 replies
-
1. Re: EB CMP / Exception intercepted by the container
vthevenin Mar 8, 2006 4:02 AM (in response to vthevenin)May be I should add some details...
Actually, the error returned is the following:2006-03-08 09:44:15,691 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackException in method: public abstract void com.xxx.createXXX(java.lang.String,int,java.lang.String,java.lang.String,java.lang.String,int,java.lang.String,java.lang.String) throws java.lang.Exception,java.rmi.RemoteException, causedBy:
This error is normal (trying to violate a DB constraint). But instead of having the raised exception being caught by my catch{} code, it is just returned to the client, which caught the exception; a log with the error is also written in jboss.log (the message above).
To summarize, here is an illustration:try { newEB = ebLocalHome_.create(); // This raise an exception ... } catch (Exception e) { ... // This block is never reached } finally { ... // This block is reached }
And the exception is propagated up to the caller, but never caught by any of the catch{} blocks of the call stack...
Thank you for any help.
Vincent. -
2. Re: EB CMP / Exception intercepted by the container
mhilberink Apr 12, 2006 6:13 AM (in response to vthevenin)Hey,
I have the same problem, I cannot catch the exception thrown by a primary key violation.
Does anybody have a solution?