This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

error unmarshalling return

 
vinodh Patel
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting the following error when trying to run client:
error unmarshalling return; nested exception is:
java.lang.ClassNotFoundException : suncertify.server.FBNConnectionFactoryImpl_Stub(no security manager:RMI class loader disabled)
---> I copied the stubs into client.jar but still getting the error.
This error goes away if I include server.jar in the class-path of client manifest file.
Is it OK to have the class-path of client manifest to have server.jar?
Any help appreciated?
Thanks.
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What classes that are in the server.jar is needed by the client.jar.
You can include those classes in the client.jar.
Mark
 
vinodh Patel
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the response Mark!
But this is my situation...
I am not using any server classes other than the FBNConnectionFactory interface in client. I put it in common.jar which is in the Class-Path of both server.jar an client.jar.
RMIC'd 2 classes in server and copied the stubs to client and then jarred client and server.
If I include server.jar in the class-path of manifest then its getting the stubs from suncertify\server directory and there is no problem.(In this case i am not copying the stubs into client directory)
I am wondering since the package declaration in stubs is "suncertify.server", and since they are in the client.jar its giving this problem.
How should I take care of this problem? I am not accessing any files other than the above interface in the client and the client accesses that interface thru common.jar in the class-path.
Thanks Mark!!
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But doesn't that interface use the Data class or DataInfo, etc?
I had to have all of those in my client.jar file in order for it to work.
Mark
 
vinodh Patel
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had all those in db.jar, which is in the class-path of the manifest of both client.jar and server.jar!
Vinodh
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm, it still seems to need a class that is in the server.jar that is not in any of your other jars.
Not much else that I can think of to offer as suggestions.
Myself, I only had two jars server.jar and client.jar and that worked fine.
Mark
 
vinodh Patel
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I double checked it and I don't have any import in client classes that access server classes and even then shouldn't it give a compile error?...why is it giving me the above error when running....This is frustrating me!!
why is it saying stub class not found...when I copied the stub into client directory?
I looked into the client.jar and its there.
Mark...Do you think its unacceptable to include server.jar in class-path of manifest of client.
Thanks.
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Mark...Do you think its unacceptable to include server.jar in class-path of manifest of client."
The only reason why I would say yes is because in local mode there is no server. I couldn't really say how the assessors would react to it being in the manifest, or if they will even check the manifest.
I understand how frustrating it can be.
One last idea. when your client does a lookup, is it casting the return to the interface?
Mark
 
vinodh Patel
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark..yes its casting to the interface.
I put the stubs in stubs.jar and had them in the manifest class-path of client and its working now.
The problem was that the directory structure didn't reflect the package declaration in stubs.
I was so stupid I missed it and wasted a lot of time.
Thanks Mark.
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It happens all the time to me. This simple bugs are always the ones that seem to last for days. Especially those single character errors like missing a semi-colon.
Now in Java luckily the compiler tells you this one quickly. But in the old days, compilers like the one for pascal wouldn't show you the bug, and you could literally spend days and not see that you missed a semi-colon.
Mark
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic