Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » RMi run configuration
RMi run configuration [message #244620] Thu, 03 January 2008 20:09 Go to next message
Eclipse UserFriend
Originally posted by: mvanwezel.few.eur.nl

Hi all,

I'm trying to get sun's RMI hello world
( http://java.sun.com/javase/6/docs/technotes/guides/rmi/hello /hello-world.html)
to work under eclipse.

This works without problems, but only if i start the rmiregistry from the
root of the class tree. (I use a command shell (linux) to start
rmiregistry outside of eclipse.) In this case, i don't need to specify a
value for the codebase property when starting the server. I don't like
this solution because of its ad-hoc-ness, and i would rather set the
codebase property instead and start the rmiregistry from anywhere.

In my run configuration i use the VM argument

-Djava.rmi.server.codebase=file:${workspace_loc:/HelloRMISer ver/}

but that doesn't work, i get an exception when starting the server:

Server exception: java.rmi.ServerException: RemoteException occurred in
server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested
exception is:
java.lang.ClassNotFoundException: example.hello.Hello
(etcetera...)


What am i doing wrong? What is the correct run-configuration to run an RMI
server in eclipse?

Thanks in advance. Michiel.
Re: RMi run configuration [message #244623 is a reply to message #244620] Thu, 03 January 2008 20:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Michiel,

Are your .class files in the bin folder of the project? Should it maybe
be like this instead:
-Djava.rmi.server.codebase=file:${workspace_loc}/HelloRMISer ver/ Should
it maybe be file:./? Are you sure it's supposed to be a URI?


Michiel wrote:
> Hi all,
>
> I'm trying to get sun's RMI hello world
> ( http://java.sun.com/javase/6/docs/technotes/guides/rmi/hello /hello-world.html)
> to work under eclipse.
>
> This works without problems, but only if i start the rmiregistry from
> the root of the class tree. (I use a command shell (linux) to start
> rmiregistry outside of eclipse.) In this case, i don't need to specify
> a value for the codebase property when starting the server. I don't
> like this solution because of its ad-hoc-ness, and i would rather set
> the codebase property instead and start the rmiregistry from anywhere.
>
> In my run configuration i use the VM argument
>
> -Djava.rmi.server.codebase=file:${workspace_loc:/HelloRMISer ver/}
>
> but that doesn't work, i get an exception when starting the server:
>
> Server exception: java.rmi.ServerException: RemoteException occurred
> in server thread; nested exception is:
> java.rmi.UnmarshalException: error unmarshalling arguments; nested
> exception is: java.lang.ClassNotFoundException: example.hello.Hello
> (etcetera...)
>
>
> What am i doing wrong? What is the correct run-configuration to run an
> RMI server in eclipse?
>
> Thanks in advance. Michiel.
>
a
Re: RMi run configuration [message #244630 is a reply to message #244623] Thu, 03 January 2008 20:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mvanwezel.few.eur.nl

Hi Ed,
Thanks for your input.

> Are your .class files in the bin folder of the project? Should it maybe

the class files are alongside the source files in the same directories
(standard eclipse behavior)

> be like this instead:
> -Djava.rmi.server.codebase=file:${workspace_loc}/HelloRMISer ver/ Should

i tried that, it didn't work

> it maybe be file:./? Are you sure it's supposed to be a URI?

that would be illogical: ${workspace_loc} returns the absolute file system
path of the workspace root. Nevertheless i tried that but it didn't work.

regards, Michiel
Re: RMi run configuration [message #244635 is a reply to message #244630] Thu, 03 January 2008 21:09 Go to previous message
Eclipse UserFriend
Originally posted by: mvanwezel.few.eur.nl

Problem solved: setting the VM args to

-Djava.rmi.server.codebase=file:${workspace_loc}/HelloRMISer ver/

(as you suggested, ed) was the solution...
Thanks for your input!
Previous Topic:General: What abstraction-level should plugins have?
Next Topic:Lost prefered layout
Goto Forum:
  


Current Time: Fri Jul 19 21:24:31 GMT 2024

Powered by FUDForum. Page generated in 0.08527 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top