EJB programming & troubleshooting: Exception wrapped in RemoteRuntimeException ?
Hi everyone ,
- Posted by: Oon Kean Lin
- Posted on: March 24 2002 05:58 EST
I am running Weblogic 6.1 on Win2K on JDK 1.3
I have a method in a Stateful Session Bean that throws an application exception (an exception that extends directly from java.lang.Exception , not under java.lang.RuntimeException) on errors. This application exception is just a simple exception with all it's attributes serializable.
However , on the client side , strangely the exception gets wrapped within an exception called weblogic.rmi.extensions.RemoteRuntimeException
When I get the nested exception from weblogic.rmi.extensions.RemoteRuntimeException , it returns me the actual application exception.
I searched Weblogic 6.x documents and the documentation for weblogic.rmi.extensions.RemoteRuntimeException could not be found (but it appeared in Weblogic 5.1)
Anyone has any idea why this RemoteRuntimeException is thrown by Weblogic instead of the actual application exception ?
I have solved the above problem. I found out that weblogic.jar is in the client machine's %JDK_HOME%\jre\lib\ext (it was done for convenience's sake instead of having to specify on the classpath).
When I remove the file from the directory and specified weblogic.jar explicitly in the CLASSPATH (e.g java -classpath D:\bea\wlserver6.1\lib\weblogic.jar MyClient) , the wrapping of exception is gone and the client gets the specific exception as expected.
I am unable to explain why this happens. I am running the client and the server on two separate machines.
Both are running on Weblogic 6.1 on JDK 1.3.1 on Win2k machines. Are we being specifically forbidden to put weblogic.jar into %JDK_HOME%\jre\lib\ext ?