Forums Register Login

CreateException/EJBException :/

+Pie Number of slices to send: Send


i'm trying to throw a message with a meaningful message in the above code.

it appears like it's nesting my exception in a InvocationTargetException in a CreateException in a EJBException:

output from e.getMessage() = nested exception is: javax.ejb.EJBException: nested exception is: javax.ejb.CreateException: Could not create stateless EJB: java.lang.reflect.InvocationTargetException

output from e.getCausedByException().getMessage() = nested exception is: javax.ejb.CreateException: Could not create stateless EJB: java.lang.reflect.InvocationTargetException

why doesn't this print out "my message" to console? i get a stack trace and message that doesn't mention "my message" at all.

Cheers.

DSR
+Pie Number of slices to send: Send
It sounds like something your EJB container does specifically. For stateless session beans, your container's the only one to care if it gets created, so it's not like anybody else (except you) is going to see that message anyways. I suppose you could try specializing CreateException and override its toString method -- but that's alot of work just for a stack trace.
+Pie Number of slices to send: Send
Thanks.

It does look that way - incidentally this is on Sun ONE Application Server 7.0

I'll output to log a message along with the throw.

DSR
Everybody's invited. Except this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1279 times.
Similar Threads
ejbLoad is not getting called
ejb create() Error java.lang. IllegalStateEx: Failed to find method for hash
Create Exception
error while running EJB from java client on JBOSS
session bean create error() can anyone plzz help me out...
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 14:45:13.