[JBoss-user] [Persistence,JBoss/CMP, Hibernate, Database] - Re: EB CMP / Exception intercepted by the container

2006-04-12 Thread mhilberink
Hey,
I have the same problem, I cannot catch the exception thrown by a primary key 
violation. 

Does anybody have a solution? 

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3936836#3936836

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3936836


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence,JBoss/CMP, Hibernate, Database] - Re: EB CMP / Exception intercepted by the container

2006-03-08 Thread 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.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3928690#3928690

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3928690


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user