posted 19 years ago
Hi,
I have a few classes that extend and implement java.rmi.remote object. The JAR is placed under WEB-INF/lib of a web application.
I am using WSAD 5.1.1. When I start the server, it gives me the following error. Can somebody please help me?? Not sure what I have missed..
[5/3/05 12:07:04:188 IST] 3d410866 Helpers W NMSV0610I: A NamingException is being thrown from a javax.naming.Context implementation. Details follow:
Context implementation: com.ibm.ws.naming.jndicos.CNContextImpl
Context method: rebind
Context name: localhost/nodes/localhost/servers/server1
........
..........
Root exception is java.rmi.NoSuchObjectException: object not exported
I tried creating the stub and the skeleton classes manually and added them to the JAR file but still I get the same error. The JAR is in the CLASSPATH of the server.
I also tried creating a simple remote object and tried binding it:
........
Hashtable propertiesMap = new Hashtable();
propertiesMap.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.cosnaming.CNCtxFactory");
propertiesMap.put(Context.PROVIDER_URL, "iiop://localhost:2809" );
.......
........
Context context= new InitialContext(propertiesMap);
myRemote instance = new myRemote();
context.bind("TestString",instance);
..........
........
Even this gives :
javax.naming.ConfigurationException: Problem with PortableRemoteObject.toStub(); object not exported or stub not found. Root exception is java.rmi.NoSuchObjectException: object not exported
at sun.rmi.transport.ObjectTable.getStub(ObjectTable.java:115)
at java.rmi.server.RemoteObject.toStub(RemoteObject.java:88)
at com.ibm.rmi.util.JDKBridge.getJRMPStub(JDKBridge.java:129)
at com.ibm.rmi.javax.rmi.PortableRemoteObject.toStub(PortableRemoteObject.java:138)
at javax.rmi.PortableRemoteObject.toStub(PortableRemoteObject.java:105)
at java.lang.reflect.Method.invoke(Native Method)
-raj