Win a copy of Kubernetes in Action this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

RMI ClassNotFoundException ===Help  RSS feed

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I try few days , but still get error
my FBNClient.jar contains
1. all of FBNClient classes
2. suncertify\server\RemoteDataServer_stub.class
3. suncertify\server\IPublicDataServer.class
4. suncertify\server\IRemoteDataServer.class
5. suncertify\db\DataInfo.class
5. suncertify\db\FieldInfo.class
Do i miss something ???
D:\chiu>d:\jdk1.4\bin\java -jar -Djava.security.policy=d:\chiu\policy\java.polic
y FBNClient.jar 10.4.98.205 1099
initial url rmi://10.4.98.205:1099/ServerManager
FBNDataModeller : java.rmi.UnmarshalException: error unmarshalling return; neste
d exception is:
java.lang.ClassNotFoundException: suncertify.server.RemoteDataServer_Stu
b (no security manager: RMI class loader disabled)
 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
did you install security manager both on client and server side along with the policy file,i think i had this problem , i found out that you have to install your security manager both on the server and client side.
hope this solve the problem
harcharan
 
Chien-Hua Chiu
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
many thanks , but i tried it , still got same error, i added as below
if (System.getSecurityManager() == null)
{
System.setSecurityManager(new RMISecurityManager());
}
but i use :
d:\jdk1.4\bin\java suncertify.client.FBNClient 127.0.0.1 1099
it works, why? classpath setting? or ...
 
ranger
Sheriff
Posts: 17314
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Chchiu"-
Welcome to the JavaRanch! Please adjust your displayed name to meet the
JavaRanch Naming Policy.
You can change it
here.
Thanks! and welcome to the JavaRanch!
Mark
 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
first do a clean build .. what i mean is ..
1.delete all your classes ..
2. check and make sure that all your classes have apropriate package defnitions at the top ..
then do a build .. and build your stubs ..
some times we change a class from one package and forget to change the package declarations .. this might cause some silly but hard to debug problems..
hope this helps,
cheers,
parthi.
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have same problem as you, could you find any way to resolve it??
 
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I also faced the same problem. Above the most funniest thing is when I executed my FBNClient.jar by supplying IP of my machine (on Internet) then it connected very well with my machine in remote mode. But when I connected using the IP of my friends machine thn it used to throw me an exception.
thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!