Hi, sorry if this is a newbie question.
 
I am having a great deal of difficulty getting RMI dynamic stub-downloads
to work under tomcat.  Working across two servers, I can write a test
that works just fine, but when implementing this test under a tomcat
servlet, I get the age old ClassNotFound error
 
Error = java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
        java.lang.ClassNotFoundException: com.dna.gt.server.GTEmailServer_Stub
Stacktrace =
java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
        java.lang.ClassNotFoundException: com.dna.gt.server.GTEmailServer_Stub
        at sun.rmi.registry.RegistryImpl_Stub.lookup(RegistryImpl_Stub.java:104)
        at java.rmi.Naming.lookup(Naming.java:53)
......
 
Let me provide some detail...
 
I have added the following to my web.xml
 
    <context-param>
        <param-name>java.rmi.server.codebase</param-name>
        <param-value>http://xxx.xxx.xxx.xxx:8080/stubs/</param-value>  (yes the stub server is also tomcat)
    </context-param>
 
The test looks something like this...
 
        try
        {
            System.out.println("Before Naming.lookup");
            MyInterface lxClient =
                (MyInterface)Naming.lookup("//xxx.xxx.xxx.xxx:1099/MyBoundServerName");
            System.out.println("Got a remote object!");
 
            if (lxGTClient != null)
            {
                System.out.println("Its not null!");
                System.out.println(lxClient.testServer());
            }
  
        }
        catch (Exception e)
        {
            System.out.println("Error = " + e);
            System.out.println("Stacktrace = ");
            e.printStackTrace();
        }
 
Where Naming.lookup throws a RemoteException.
 
Please help me out here with some suggestions of what I am not configuring properly....
Is it even possible to do this?
 
Thanks in advance -- Mark

Reply via email to