Hello,
I have a stateless Session Bean with a single test method that just throws an exception. I'm accessing the EJB via remote interface, but I'm always getting an exception on the client side that I don't understand:
Exception: [Ljava.lang.StackTraceElement; java.lang.ClassNotFoundException: [Ljava.lang.StackTraceElement; at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) ...
try{
InitialContext ic = new InitialContext();
ExSessionRemote remote = (ExSessionRemote) ic.lookup("ExSessionBean/remote");
remote.doit();
}
catch(Exception e){
System.out.println("Exception: "+e.getMessage());
e.printStackTrace();
}
public void doit() throws Exception {
throw new Exception();
}
@Remote
public interface ExSessionRemote {
public void doit() throws Exception;
}
java.lang.reflect.UndeclaredThrowableException at $Proxy0.doit(Unknown Source) at applicationclient1.Main.main(Main.java:32) Caused by: java.lang.ClassNotFoundException: [Ljava.lang.StackTraceElement; at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188)