Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Re: RMI Error Under Eclipse, Not Command Line

Reply
Thread Tools

Re: RMI Error Under Eclipse, Not Command Line

 
 
jayshao
Guest
Posts: n/a
 
      07-07-2004
Dale,

Since Eclipse compiles the code itself, RMI support seems to be a bit
dodgy (classpath issues, etc.) There is probably some project
properties you need to adjust.

I've had great success using the RMI Plugin: http://www.genady.net/rmi/
to help me with the configuration and rmic stage of compilation, though
I admittedly only used it for a couple of school projects.

Jason


Dale wrote:
> I should probably think more about this before posting, but I need to
> leave this task now.... maybe someone has hit this one before and
> can assist?
>
> I've got an RMI client class that works perfectly well from the
> command line:
>
> cd workspace\rmiproj
> set classpath=.
> java rmiproggy.java
>
> (at this point the application comes up, and calls another machine
> using that SQLOrdersImpl_Stub object).
>
> But when I run this same thing from within Eclipse, I get this:
>
> java.rmi.UnmarshalException: error unmarshalling return; nested
> exception is:
> java.lang.ClassNotFoundException: SQLOrdersImpl_Stub (no security
> manager: RMI class loader disabled)
> at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
> at java.rmi.Naming.lookup(Unknown Source)
> at OrderThread.run(OrderThread.java:32)
> Caused by: java.lang.ClassNotFoundException: SQLOrdersImpl_Stub (no
> security manager: RMI class loader disabled)
> at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
> at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
> at java.rmi.server.RMIClassLoader$2.loadClass(Unknown Source)
> at java.rmi.server.RMIClassLoader.loadClass(Unknown Source)
> at sun.rmi.server.MarshalInputStream.resolveClass(Unk nown Source)
> at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
> at java.io.ObjectInputStream.readClassDesc(Unknown Source)
> at java.io.ObjectInputStream.readOrdinaryObject(Unkno wn Source)
> at java.io.ObjectInputStream.readObject0(Unknown Source)
> at java.io.ObjectInputStream.readObject(Unknown Source)
> ... 3 more
>
> It's failing on the following line:
> orders = (SQLOrders) Naming.lookup(serviceName);
>
> Again, same exact code running from the command line works perfectly.
> WTH??
>
> --Dale--


 
Reply With Quote
 
 
 
 
Dale
Guest
Posts: n/a
 
      07-08-2004
Thanks - I found the 'free' version of said program on sourceforge and
it worked like a charm.

I think the issue was something very simple... My original project
had source and binaries in the same directory. So I ran rmic in the
one directory and the stub and skel where available when I ran from
the source directory. But Eclipse runs out of the bin directory, and
there were no stub and skel there! I thought it was something more
difficult than that.

With respect to the other poster, I've tried to get into ant, but just
never quite got there. Some day maybe. Thanks for the example.

--Dale--

"jayshao" <(E-Mail Removed)> wrote in message news:<cchodn$(E-Mail Removed)>...
> Dale,
>
> Since Eclipse compiles the code itself, RMI support seems to be a bit
> dodgy (classpath issues, etc.) There is probably some project
> properties you need to adjust.
>
> I've had great success using the RMI Plugin: http://www.genady.net/rmi/
> to help me with the configuration and rmic stage of compilation, though
> I admittedly only used it for a couple of school projects.
>
> Jason
>
>
> Dale wrote:
> > I should probably think more about this before posting, but I need to
> > leave this task now.... maybe someone has hit this one before and
> > can assist?
> >
> > I've got an RMI client class that works perfectly well from the
> > command line:
> >
> > cd workspace\rmiproj
> > set classpath=.
> > java rmiproggy.java
> >
> > (at this point the application comes up, and calls another machine
> > using that SQLOrdersImpl_Stub object).
> >
> > But when I run this same thing from within Eclipse, I get this:
> >
> > java.rmi.UnmarshalException: error unmarshalling return; nested
> > exception is:
> > java.lang.ClassNotFoundException: SQLOrdersImpl_Stub (no security
> > manager: RMI class loader disabled)

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Command line option syntax error. Type Command /? for Help chuckcar Computer Support 11 04-21-2009 09:59 PM
Why does java.rmi.Naming not implement interface java.rmi.Registry? Jan Schulze Java 1 03-26-2005 07:45 AM
RMI Vs RMI over IIOP JScoobyCed Java 1 01-28-2005 09:54 AM
RMI, JINI or RMI/IIOP Buu Nguyen Java 1 08-25-2004 11:28 AM
RMI Error Under Eclipse, Not Command Line Dale Java 1 07-08-2004 01:25 PM



Advertisments