Sorry guys i have tried to search for a solution for the past 3 hours without no luck I know its not a specific Developer Certification question but i thought some one may be able to help . I am just doing the RMI section of the project and need to do some tests. If I create a Server and start it from the command line after calling the rmiregistry its seem to load up fine but if I try and run the same class from with in eclipse i get the following error
Remote exception: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
for some random reason it cant seem to find the file/ i was getting a policy error which i was able to fix by creating my own and adding it to the run configuration under VM arguments -Djava.security.policy=G:\newpolicy.policy
It seems that the SampleServer class is missing from the classpath of the thing you're trying to run. I don't know what you're trying to run, and how. Is it a Java application run configuration? Is it a JUnittest?
I required the following additional property to get this working correctly. I did not realise this property needed to be included.
If I use this property from my limited understanding means the class that are required are being dynamically be downloaded. in the certification it specifies
1. You must not require the use of an HTTP server.
2. You must not require the installation of a security manager.
3. You must provide all classes pre-installed so that no dynamic class downloading occurs.
4. You must use RMI over JRMP (do not use IIOP)
Just to clarify am I breaking the rules 2 and 3 by adding policy file and the -Djava.rmi.server.codebase, which is used to dynamically load classes
once again, thanks for all your help guys
Joined: Jun 25, 2007
Hi guys, just for reference, if you dont want to use the -Djava.rmi.server.codebase and -Djava.security.policy options you can use the following piece of code to do it programmatically
If i had know this before i would not have installed the RMi plug in for eclipse and played with all the setting, pretty good learning experience though, thanks for the link Roberto