[jboss-user] [EJB 3.0] - Re: StackOverflowException caused by throwing app exception

2008-02-28 Thread LordCoven
Is it OK if the test case pre-supposes an installed and running OpenLDAP server?
I'll see if I can get a test case sorted which works without one, though.
Cheers,
C

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4132770
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [EJB 3.0] - StackOverflowException caused by throwing app exception with

2008-02-27 Thread LordCoven
Hi All,

Just had and resolved a really nasty problem. I've got a stateful (but I'd also 
tried the same with a stateless) EJB3 session bean which access an OpenLDAP 
backend to find some user data. I'm catching the NamingException when 
attempting the search and throwing my own application exception 
(UnableToQueryLdapException extends RuntimeException) with the NamingException 
added as the cause (i.e. super(e) in the constructor of the application 
exception).
I caused the search to fail by providing a bogus baseDN and in debugging was 
able to see the NamingException being caught and containing all the information 
I'd expect, but when I then threw it on as part of my application exception the 
app bombed out with a huge recursive stack trace to do with serialization.
When I changed the application exception to only take the message of the 
NamingException (e.getMessage()), the problem went away.

Sounds like it might be a nasty bug in the serialization code in JBoss?

I'm using JBoss 4.2.2.GA
The behaviour was tested on an XP box and an OS X 10.5.2 box both with JDK5.

Cheers,
Clive

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4132618
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user