UnmarshalException?? Please help
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
I created my server code ( Interface, remote object, stub)but I am getting this exception when I tried to run it?
here is the exception message :
RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: Server.DataFactory_Stub
any comment would be really appreciated,
Sam
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Did you remember to run rmic on your exportable classes? That's what it looks like.
Hope this helps,
Michael Morris
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Sam
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
I had the same problems before. I solved it by deleting the old stub copy file in the client side then put the new copy one in the client side.
As i understand it will happen when the stub file is not the same as the one in server side.
YING REN
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Check how do you set java.rmi.server.codebase property -
java -Djava.rmi.server.codebase=file:///d:/projects/assignment/server.jar -jar server.jar
Pavel
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Make sure you have an import statement that imports the package where the stubs are located.
Michael Morris
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
well now I've got a new Problem , I tried to run rmic to generate new stubs for my exportable classes but I've got this error
C:\JServer\server>rmic -v1.2 DataFactory
error: File .\DataFactory.class does not contain type DataFactory as expected, but type server.DataFactory. Please remove the file, or make sure it appears in the correct subdirectory of the class path.
error: Class DataFactory not found.
2 errors
any comment on this, ?? I am totally confused!!!
Thanks again for your comment
Sam
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
So from a classes directory you should see the directory suncertify and then type...
rmic -v1.2 suncertify.server.DataFactory
Let me know if that helps...
scwcd, scjd, scjp<br /><a href="http://natejohnson.us" target="_blank" rel="nofollow">http://natejohnson.us</a><br /><a href="http://rice.kuali.org" target="_blank" rel="nofollow">http://rice.kuali.org</a>
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Nate's right. But don't feel bad, I'm sure we all grappled with this the first time or two.
Michael Morris
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
-
-
Number of slices to send:Optional 'thank-you' note:
-
-

scwcd, scjd, scjp<br /><a href="http://natejohnson.us" target="_blank" rel="nofollow">http://natejohnson.us</a><br /><a href="http://rice.kuali.org" target="_blank" rel="nofollow">http://rice.kuali.org</a>
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
let me clear my thought about your comment,
if I have my exportable class in c:\suncertify\server\DataFactory.class then I have to run rmic -v1.2 suncertify.server.DataFactory ?
am I right?
Sam
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
scwcd, scjd, scjp<br /><a href="http://natejohnson.us" target="_blank" rel="nofollow">http://natejohnson.us</a><br /><a href="http://rice.kuali.org" target="_blank" rel="nofollow">http://rice.kuali.org</a>
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
I made that stub for my DataServer and DataFactory classes, but I still get that error
"
RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: Server.DataFactory_Stub
"
I copied them to server package(didn't work) suncertiy pacakge(also didn't work) , I have no idea why I get this exception ,I am totally lost in RMI island ! Please help!
Sam
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
java.lang.ClassNotFoundException: Server.DataFactory_Stub
Package names are case-sensitive. Could that be the problem?
Hope this helps,
Michael Morris
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Thanks anyway,I really appreciate it
Sam
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Man, don't you just hate this kind of stuff! I do think that it has to do with package declarations and/or importing of packages. The package directory structure has to be as indicated relative to the user (execution) directory. So if you have a package suncertify.server and a package suncertify.client then you have to have directories ./suncertify/server/ and ./suncertify/client/ which contain the appropriate class files. If a class in the suncertify.client package needs to know about a class in the suncertify.server package, then it has to import that package. I'm sure that you're aware of all this, but I know that I have oft times overlooked the obvious for a more obscure solution to a problem. One other problem that I frequently ran across after I jarred both client and server was that I would forget to put the new server files after a build into the client jar which would cause a similar exception.
Keep thinking about it and I will too and at some point we'll figure it out.
Hope this helps,
Michael Morris
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Let me explain my directory and package structue, may be I am doing something wrong that I am not aware of,(just server)
Directory structure,
C:\suncertify
C:\suncertify\db
C:\suncertify\server
Package structure :
suncertify // have a class implemented main method
suncertify.server // all classes related to server (includes DataSever and DataFactory, two exportable classes)
suncertify.db // classes and Interfaces (remote interfaces , one for DataFactory and one for DataServer)
and here is the code I got that exception
I created stub for DataFactory and DataServer and they are in suncertify.server package
That's all,
Thanks again for your help and comment
Sam
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
The problem is not with the RMI server. It is with the RMI Registry. Assuming that you are staring RMI Registry from a different console window and not from the code, try to issue the command below and start the RMI Registry using rmiregistry command. Assuming that your root directory starts from C:\working,
set CLASSPATH=C:\working <Enter>
rmiregistry<Enter>
[ August 13, 2002: Message edited by: Sai Prasad ]
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
You solved my problem
Sam
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
I'm glad someone figured this out. I wasn't thinking about the registry because I started the registy inside my server so the registry's CLASSPATH was never an issue. So now you can move on to more productive matters!
Michael Morris
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Thanks again for your comments, It's great to have people like you around here,
Good Luck
Sam
| What I don't understand is how they changed the earth's orbit to fit the metric calendar. Tiny ad: The new gardening playing cards kickstarter is now live! https://www.kickstarter.com/projects/paulwheaton/garden-cards |






