• Post Reply Bookmark Topic Watch Topic
  • New Topic

Connecting with a servlet to Server via RMI failing

 
Markus Pöstinger
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.

I am relatively new to servlets and not very experienced with RMI, so I hope you can help me a little bit to get started.

I have got a server-program called Jeherazade, which is distributing some methods via RMI and is working fine. When I try to connect to the server by a command-line client-program, that's working too. But when I try to connect to the server through a servlet, that's running on the same machine as the client-program and the server-program, it's failing.

The method in the servlet is the following (the same in the client, where it's working):



This is resulting in the following exception:

ERROR: Failed to bind Jeherazade via RMI to Servlet:
java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.lang.ClassNotFoundException: jeherazade.JeherazadeRMIImpl_Stub (no security manager: RMI class loader disabled)

I am using Tomcat 5.5 . The servlet itself and the stub JeherazadeRMIImpl_Stub.class are located in the same directory. I read on other pages, that one should try to set a SecurityManager by



But when I do that, Tomcat crashes.

In the catalina-log it says:



In the localhost-log it says:



I hope you can help me....
 
Markus Pöstinger
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am so dumb. I wrote that the Stub is located in the same directory. Of course that is totally wrong, because it has to be located in jeherazade/...Stub when being a part of package jeherazade. Now all is working fine.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!