File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes error unmarshalling return Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "error unmarshalling return" Watch "error unmarshalling return" New topic
Author

error unmarshalling return

vinodh Patel
Greenhorn

Joined: Apr 01, 2003
Posts: 5
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

Joined: Feb 05, 2001
Posts: 17249
    
    6

What classes that are in the server.jar is needed by the client.jar.
You can include those classes in the client.jar.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
vinodh Patel
Greenhorn

Joined: Apr 01, 2003
Posts: 5
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

Joined: Feb 05, 2001
Posts: 17249
    
    6

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

Joined: Apr 01, 2003
Posts: 5
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

Joined: Feb 05, 2001
Posts: 17249
    
    6

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

Joined: Apr 01, 2003
Posts: 5
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

Joined: Feb 05, 2001
Posts: 17249
    
    6

"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

Joined: Apr 01, 2003
Posts: 5
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

Joined: Feb 05, 2001
Posts: 17249
    
    6

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: error unmarshalling return
 
Similar Threads
executable server.jar problem
problem while running applicaiton through jar commands........
exception on client side in remote mode
RMI codebase
error in running server- problem with jar file