Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Need RMI help with upgrading a legacy application on WebSphere 5.1

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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:

Servlet:


Interface:


Remote Object:


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.

Thanks,
Chris
 
Bartender
Posts: 1638
IntelliJ IDE MySQL Database Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
a wee bit from the empire
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic