Jigsaw & RMI

Hi,

	I am having big trouble while trying to write a servlet that
communicates via RMI with a server. Jigsaw itself seems to work,
writing 'simple' servlets seems to be no problem. My RMI-server is also
working and serves other clients that are connected via RMI. But a
servlet trying to do the same, fails.

	It seems that the real problem is to access the sub classes of the
RMI-server, since the servlet always dumps exceptions like:

----------
java.rmi.UnmarshalException: Return value class not found; nested
exception is: java.lang.ClassNotFoundException: test.Server_Stub
at sun.rmi.registry.RegistryImpl_Stub.lookup(RegistryImpl_Stub.java:109)
at java.rmi.Naming.lookup(Naming.java:60)
[snip]
-----------

	The stubs are NOT in the classpath of jigsaw, but they should be
loaded remotly via RMI too (having set the rmi.server.codebase property).
I checked that with a simple Java-App that also had NO access to the
stub-classes via CLASSPATH. It worked.

	Anyway, I tried to include the stub-classes in the CLASSPATH of
jigsaw and it randomly worked, but I have to restart jigsaw every time I
changed the stubs (according to the documentation), which is not
acceptable. 

	I also tried to include the stub-classes in my servlet directory,
but the servlet indexer assumed that these are servlets too and crashed
while trying to create servlet-wrappers for them (the stubs were loaded
twice and the classloader threw then an exception that there is a
duplicate name 8-[  ). When I removed the indexer from my servlets
directory and created servlet-wrappers for the servlets manually the
stub-classes still could not be found.

	I'd really appreciate any hint how to solve that riddle, since it
seems to be completely impossible (for me) to combine Jigsaw and RMI.
Thanx in advance.

	Karsten Boehm
 

Received on Wednesday, 17 March 1999 16:08:55 UTC