Ralf, solved the problem I had, but don't really have a "proper" answer to the UndeclaredThrowableException - sort of an explanation: My problem was, that I could not send any objects (not just Exceptions) from the server to the client, due to a classpath problem in Resin (the servlet engine I use - see www.caucho.com) What happened was, that the standard classloader (which handles the deserialization) loaded the class from a different location then Resins class loader and eventhough it is the exact same class, they are not assignable. All these problems go away if the class is only available on one location. Soo - my guess about the UndeclaredThrowableException is, that it when it gets deserialized a different class (different, as in differnet location) is used which does not match the exception declared (pulled in by a different class loader). Check first, whether you can send objects from client to server (bothways), that there is only one copy of your exception classes around (my problem with resin was, that I had the same (exception) class in CLASSPATH as well as in WEB-INF which stuffed things up) Hope this helps - if you find a better explanation, pls let me know. Cheers, Robert. > -----Original Message----- > From: Ralf Purnhagen [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, 3 January 2001 1:55 > To: jBoss > Subject: [jBoss-User] Re: application exception problem > > > Hi Robert, > > because i have the same problem of getting an UndeclaredThrowable- > Exception can you please tell me, if you already have any solution > for it. I posted a question to this list two weeks ago, but nobody > answered to it. > > Thank you, > Ralf > > Robert Schulz wrote: > > > > I have problems catching exceptions thrown from a create > method with jBoss > > 2.0 Final > > and server and client on different VMs. > > > > I tried two approaches > > i) throwing a subclass of java.lang.Exception > > ii) throwing a subclass of javax.ejb.CreateException > > I declared the exceptions in home and in the corresponding > ejbCreate, > > compiles fine, > > the verifier is happy and everything seems fine server > side. The problem is > > catching > > it client side (different VM). In case > > i) a java.reflect.UndeclaredThrowable exception is thrown - > the contained > > exception > > has a class name which is my Exception class, but I > cannot reference it > > client side > > (the getClass().getName() is correct, but instanceof > returns false, so I > > can't > > cast > > ii) the exception is thrown correctly client side, but > again I can't seem to > > catch > > it - it looks like a class versioning problem (both > classes are of the > > same type > > according to .getClass().getString() but instanceof > returns false and > > consequently > > I can't catch the exception ... I am sure there is only > one version of > > the class > > around. > > In both cases I put the exception class in the bean jar and > in the classpath > > of the > > client ... something goes wrong when the exception gets > shipped to the > > client ... > > > > Any ideas? > > > > Tx, > > R. > > -- > > Robert Schulz > > [EMAIL PROTECTED] > > > > -- > > -------------------------------------------------------------- > > To subscribe: [EMAIL PROTECTED] > > To unsubscribe: [EMAIL PROTECTED] > > List Help?: [EMAIL PROTECTED] > > > -- > -------------------------------------------------------------- > To subscribe: [EMAIL PROTECTED] > To unsubscribe: [EMAIL PROTECTED] > List Help?: [EMAIL PROTECTED] > -- -------------------------------------------------------------- To subscribe: [EMAIL PROTECTED] To unsubscribe: [EMAIL PROTECTED] List Help?: [EMAIL PROTECTED]
