I've been asked to help support the upgrade of a legacy application from WAS 3.5 to WAS 5.1, with little to no documentation present on the app itself. Bascially the application contains one servlet that binds an object to the RMI registry in WebSphere using the init() method.
As part of the upgrade, I've taken the source code I found, and rebuilt it, using ant for compiling the classes, then creating the RMI stubs/skeletons (<rmic> task). I'm able to compile an .ear file, and deploy it to the server. When I start the application, I'm receiving the following error in the server logs:
error binding my factory: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: com.foo.MyFactory_Stub (no security manager: RMI class loader disabled)
Here is the code:
And finally, the class:
I'm sure there's some setup that I am missing, and not being exceptionally familiar with RMI, it may be something very simple. Any help would be greatly appreciated.
This error comes when the program during an RMI call try to de-serialize (unmarshall) an object, the class definition for which is not present in the local JVM.
The stub classes you have created must be available in the classloader of the code throwing this exception.