• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

How to configure Tomcat to provide codebase property for RMI?

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I encountered a problem when using dynamic copying of RMI/JRMP classes and trying to configure Tomcat (4.0.4) to create a codebase for that.
So, I created a new HTTP connector and context path for my application in server.xml file:

Application class files are stored in
C:\Tomcat4\webapps\myapp\WEB-INF\classes folder
Run the application with following system property: -Djava.rmi.server.codebase=http://localhost:2001/myapp\WEB-INF\classes
Finally, when trying to create an instance of Remote class, I get the following exception:

But I'm sure that I have stubs generated and stored in proper location, so the problem appears to be in invalid configuraion of Tomcat.
Does anybody know what I'm missing? Your help is greatly appreciated.
Andrey
[ January 24, 2003: Message edited by: Andrey Karachoun ]
[ January 24, 2003: Message edited by: Andrey Karachoun ]
 
Andrey Karachoun
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Folks, does anybody know?
My problem is: when I used ClassFileServer from Java examples listening on port 2001 my codebase worked fine; when I started using and configuring Tomcat I began getting that java.rmi.ServerException: nested exception is:
java.rmi.UnmarshalException: nested exception is:
java.lang.ClassNotFoundException: *_Stub
My class files and generated stubs are in WEB-INF folder. I've heard that Tomcat protects this folder from accessing by web - could this be the reason that caused the exception?
 
All of life is a contant education - Eleanor Roosevelt. Tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic