I have JNDI/RMI server program problems with JBuilder 5 IDE, but it works fine in DOS prompt directly with JDK.
I am writing program to test JNDI with RMI. My program is similar to "Hello World" sample of JNDI Web site. I have Java SDK version 1.3.1_02 installed. It is fine if under DOS prompt to work: 1. javac *.java 2. copy generated class file to class directory 3. rmic <Implementation class name> 4. start rmiregistry 5. java -Djava.naming.factory.initial=com.sun.jndi.rmi.registry.RegistryContextFactory -Djava.security.policy=policy -Djava.naming.provider.url=rmi://localhost <Implementation class name>
(I have policy file created to grant AllPermission.)
But if I work under JBuilder 5 IDE, have JDK 1.3.1_02 configured by "New JDK Wizard", choose JDK 1.3.1_02 as Paths in Project Properties. As Properties for implementation class Java file, I have "RMI compiler settings" "Generate RMI stub/skeleton" checked with option "-v1.2". I start RMI Registry, and make and run implementation class, then have exception:
javax.naming.CommunicationException. Root exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: java.lang.ClassNotFoundException: testjndi.I1Impl_Stub
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: java.lang.ClassNotFoundException: testjndi.I1Impl_Stub
James, I'm afraid I don't have the answer, but I am having the exact same problem, but using JBuilder 6. I have tried moving the source for the stub around in all different combinations, but I still can't see what I'm doing wrong. If anyone does have the answer, I'd be most grateful.