[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=bb&op=viewtopic&p=3928690#3928690

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=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=lnk&kid=110944&bid=241720&dat=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] - EB CMP / Exception intercepted by the container

2006-03-07 Thread vthevenin
Hello,

I'm facing a slightly problem with EB (CMP) 2.1, JBoss 4.0.3SP1.

I've got a SLSB that try to create an EB, but the creation failed due to a 
constraint violation - this is not the problem.
The EB create() is done in a try/catch block.

The problem is that the exception thrown is not caught by the catch() block at 
all, it seems like the container intercepts the error and redirect it directly 
to the client.

I think it is a configuration issue, but I don't know where to search. I looked 
at standardjboss file to the "interceptor" section, I tried different things 
but it does not resolve anything.

If you got any idea, please share ! Thanks in advance.

Vincent.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3928425#3928425

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3928425


---
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=lnk&kid=110944&bid=241720&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user