Eclipse 3.0 problems

Report bugs in the RMI plugin here

Eclipse 3.0 problems

Postby olale » Fri Jul 02, 2004 8:11 am

Hi!

I'm having some problems getting the RMI plugin to work with Eclipse 3.0.0 (build 200406251208), platform OS X. Version 1.6 of the plugin crashes with a NullPointerException and version 1.5.5 seems to not create any stubs at all when I choose "re-generate RMI stubs" from the menu.

Any ideas?
olale
 

Postby genady » Fri Jul 02, 2004 10:15 am

Please email me with a little more detailed description:
The .project, .classpath files from the project
and the .log file from the .metadata directory.

Genady
genady
Site Admin
 
Posts: 397
Joined: Sat Aug 16, 2003 5:15 pm

Postby olale » Fri Jul 02, 2004 12:55 pm

Ok, see below. By the way, the problem with generating stubs seems to exist also with RMI plugin 1.5.5, Eclipse 3.0.0 on Linux.

.project:
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>DKExpert</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>net.genady.rmi.RMIBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.jem.beaninfo.BeanInfoNature</nature>
<nature>net.genady.rmi.RMINature</nature>
</natures>
</projectDescription>

.classpath:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path=""/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path=""/>
</classpath>

.log:

Empty..

Console output:

java.rmi.StubNotFoundException: Stub class not found: java.rmi.server.RemoteObject_Stub; nested exception is:
java.lang.ClassNotFoundException: java/rmi/server/RemoteObject_Stub
at sun.rmi.server.RemoteProxy.getStub(RemoteProxy.java:98)
at sun.rmi.server.RemoteProxy.getStub(RemoteProxy.java:55)
at sun.rmi.server.UnicastServerRef.setSkeleton(UnicastServerRef.java:179)
at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:142)
at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:129)
at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:275)
at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:178)
at java.rmi.server.UnicastRemoteObject.<init>(UnicastRemoteObject.java:75)
at java.rmi.server.UnicastRemoteObject.<init>(UnicastRemoteObject.java:61)
at Foo.<init>(Foo.java:24)
at Foo.main(Foo.java:51)
Caused by: java.lang.ClassNotFoundException: java/rmi/server/RemoteObject_Stub
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at sun.rmi.server.RemoteProxy.loadClassFromClass(RemoteProxy.java:193)
at sun.rmi.server.RemoteProxy.getStub(RemoteProxy.java:93)
... 10 more
olale
 
Posts: 7
Joined: Fri Jul 02, 2004 8:13 am

Postby olale » Fri Jul 02, 2004 1:03 pm

This was the output using the 1.5.5 plugin

We discovered that the contents of the corresponding files on the Linux machine were identical by the way.

The NullPointerException could not be reproduced using plugin version 1.6.0 for some reason, but the exact same error appeared as with version 1.5.5:

java.rmi.StubNotFoundException: Stub class not found: java.rmi.server.RemoteObject_Stub; nested exception is:
java.lang.ClassNotFoundException: java/rmi/server/RemoteObject_Stub
olale
 
Posts: 7
Joined: Fri Jul 02, 2004 8:13 am

Postby genady » Fri Jul 02, 2004 1:08 pm

Does this error message appear when you generate the stubs or when you run the program?

Genady
genady
Site Admin
 
Posts: 397
Joined: Sat Aug 16, 2003 5:15 pm

Postby olale » Fri Jul 02, 2004 1:13 pm

When I run the program, no message (in the error log) appears as a result of compilation
olale
 
Posts: 7
Joined: Fri Jul 02, 2004 8:13 am

Postby olale » Fri Jul 02, 2004 2:14 pm

Now I could reproduce the NullPointerException bug when compiling the source class. Maybe it has something to do with the problem of generating stubs?

.log:


!ENTRY org.eclipse.ui 4 4 jul 02, 2004 16:10:44.494
!MESSAGE Unhandled event loop exception

!ENTRY org.eclipse.ui 4 0 jul 02, 2004 16:10:44.497
!MESSAGE java.lang.NullPointerException
!STACK 0
java.lang.NullPointerException
at net.genady.rmi.actions.AddNatureAction.run(AddNatureAction.java:33)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:276)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:915)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:866)
at org.eclipse.jface.action.ActionContributionItem$7.handleEvent(ActionContributionItem.java:785)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1196)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1220)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1205)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2865)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2535)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:254)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.eclipse.core.launcher.Main.basicRun(Main.java:183)
at org.eclipse.core.launcher.Main.run(Main.java:644)
at org.eclipse.core.launcher.Main.main(Main.java:628)
olale
 
Posts: 7
Joined: Fri Jul 02, 2004 8:13 am

Postby genady » Fri Jul 02, 2004 3:26 pm

What version of the plugin this exception refers to ?

Genady
genady
Site Admin
 
Posts: 397
Joined: Sat Aug 16, 2003 5:15 pm

Postby olale » Fri Jul 02, 2004 5:37 pm

1.6.0
olale
 
Posts: 7
Joined: Fri Jul 02, 2004 8:13 am

Postby genady » Fri Jul 02, 2004 7:09 pm

Hi,

Can you create a small test case / send me the code so that I can reproduce?
The exception seems totally unrelated, because it occurs in the code that adds RMI support to a Java project (I can hardly imagine how this could happen ... are you using any third party plugins ?) and you already have the correct .project file.

The runtime exception seems to be due to an incorrect codebase property setting. Are you sure you have set up the java.rmi.server.codebase property ?

Genady
genady
Site Admin
 
Posts: 397
Joined: Sat Aug 16, 2003 5:15 pm

Postby olale » Mon Jul 05, 2004 8:07 pm

Well, now I seem to have isolated the problem. It did not have to do with faulty codebase/policy settings, but I saw that explicitly implementing the Remote interface instead of just extending the baseclass UnicastRemoteObject seemed to solve the problem for me. Has it always been like that, that the RMI classes have had to implement the Remote interface directly (or via interfaces extending Remote) in order to work with the plugin?
olale
 
Posts: 7
Joined: Fri Jul 02, 2004 8:13 am

Postby genady » Thu Jul 08, 2004 10:12 am

It has nothing to do with the plugin, it's how RMI works.
Just try to run "rmic" from the command line and you will get the same results.

Genady
genady
Site Admin
 
Posts: 397
Joined: Sat Aug 16, 2003 5:15 pm

Postby olale » Thu Jul 08, 2004 10:24 am

I've figured as much when I did some playing around outside Eclipse.. Sorry for bothering you, I seem to need some refreshing on the overall subject :/
olale
 
Posts: 7
Joined: Fri Jul 02, 2004 8:13 am

Postby genady » Fri Jul 09, 2004 12:40 am

There are links on the website to many useful RMI resources.
Just click "General RMI Information" in the left frame of the website.

Best Regards,
Genady
genady
Site Admin
 
Posts: 397
Joined: Sat Aug 16, 2003 5:15 pm


Return to Bug reports

Who is online

Users browsing this forum: No registered users and 1 guest

cron