The Artima Developer Community
Sponsored Link

Java Answers Forum
ClassNotFoundException: xx_Stub with JBuilder5 IDE but fine in DOS prompt

1 reply on 1 page. Most recent reply: Mar 5, 2002 9:26 AM by Lee

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
James Hong

Posts: 1
Nickname: james
Registered: Feb, 2002

ClassNotFoundException: xx_Stub with JBuilder5 IDE but fine in DOS prompt Posted: Feb 25, 2002 11:58 PM
Reply to this message Reply
Advertisement
Hi,

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:

"C:\jdk1.3.1_02\bin\javaw -classpath "D:\test\testJNDI\classes;C:\jdk1.3.1_02\demo\jfc\Java2D\Java2Demo.jar;C:\jdk1. 3.1_02\jre\lib\i18n.jar;C:\jdk1.3.1_02\jre\lib\jaws.jar;C:\jdk1.3.1_02\jre\lib\r t.jar;C:\jdk1.3.1_02\jre\lib\sunrsasign.jar;C:\jdk1.3.1_02\lib\dt.jar;C:\jdk1.3. 1_02\lib\htmlconverter.jar;C:\jdk1.3.1_02\lib\tools.jar" -Djava.naming.factory.initial=com.sun.jndi.rmi.registry.RegistryContextFactory -Djava.security.policy=policy -Djava.naming.provider.url=rmi://localhost testjndi.I1Impl
before initial context

before rebind RemoteHelloServer

HelloServer Exception: null

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

java.lang.ClassNotFoundException: testjndi.I1Impl_Stub

at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall .java:245)

at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)

at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:354)

at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)

at com.sun.jndi.rmi.registry.RegistryContext.rebind(RegistryContext.java:134)

at com.sun.jndi.rmi.registry.RegistryContext.rebind(RegistryContext.java:141)

at javax.naming.InitialContext.rebind(InitialContext.java:366)

at testjndi.I1Impl.main(I1Impl.java:52)"

I have VM parameters given in "Project Properties" just as I give under DOS prompt.

Can anyone give me kind help?
I'm sorry this message is long.

James


Lee

Posts: 1
Nickname: uklee
Registered: Mar, 2002

Re: ClassNotFoundException: xx_Stub with JBuilder5 IDE but fine in DOS prompt Posted: Mar 5, 2002 9:26 AM
Reply to this message Reply
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.

Flat View: This topic has 1 reply on 1 page
Topic: Convert String to Color Previous Topic   Next Topic Topic: how to display a frame from a thread

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use