RMI problem

Amir Bukhari ufz6@rz.uni-karlsruhe.de
Thu May 26 15:32:00 GMT 2005


I am using GCJ 4.0 build for MinGW for Windows. I have build the the package
with GCJ, except create Stub class. Grmic doesn't work for me, thus I create
it with Sun RMIC "rmic -v1.2 myclass" and then link it with GCJ.

I use GCJ plugin for eclipse to produce a makefile, which help me to build
the package.

What I don't understand my crash on calling a remote methode, but I got a
valid remote object, which bind client to RMI Server. The program crash with
ClassNotFoundException on CodeListElement class CodeListElement. In my
program this class got referenced and I didn't got any
ClassNotFoundException only when calling remote methode.

Here is the complete exception:

java.rmi.UnexpectedException: undeclared checked exception; nested exception
is:
        java.lang.ClassNotFoundException: Could not find class
([Lcom.khsitecafe    .common.data.CodeListElement;) at codebase ()
   at .__ZN3com10khsitecafe3rmi16khRMIServer_Stub11getCodeListEv
(e:\programmig\
interCafe\swtExample\com\khsitecafe\rmi\khRMIServer_Stub.java:58)
   at .__ZN3com10khsitecafe3gui19PincodeListenViewer9initTableEv
(e:\programmig\
interCafe\swtExample\com\khsitecafe\gui\PincodeListenViewer.java:120)
   at .__ZN3com10khsitecafe3gui19PincodeListenViewer11createTableEv
(e:\programm
ig\interCafe\swtExample\com\khsitecafe\gui\PincodeListenViewer.java:111)
   at .__ZN3com10khsitecafe3gui19PincodeListenViewer11createGroupEv
(e:\programm
ig\interCafe\swtExample\com\khsitecafe\gui\PincodeListenViewer.java:70)
   at .__ZN3com10khsitecafe3gui19PincodeListenViewer10initializeEv
(e:\programmi
g\interCafe\swtExample\com\khsitecafe\gui\PincodeListenViewer.java:50)
   at
.__ZN3com10khsitecafe3gui19PincodeListenViewerC1EPN3org7eclipse3swt7widget
s9CompositeEi
(e:\programmig\interCafe\swtExample\com\khsitecafe\gui\PincodeList
enViewer.java:38)
   at
.__ZN3com10khsitecafe3gui14ManageMainTree14widgetSelectedEPN3org7eclipse3s
wt6events14SelectionEventE
(e:\programmig\interCafe\swtExample\com\khsitecafe\gu
i\ManageMainTree.java:103)
   at .__ZN3com10khsitecafe3gui5MySWT4mainEP6JArrayIPN4java4lang6StringEE
(e:\pr    ogrammig\interCafe\swtExample\com\khsitecafe\gui\MySWT.java:130)
   at ._main (C:\DOKUME~1\bukhari\LOKALE~1\Temp\ccgNaaaa.i:11)
Caused by: java.lang.ClassNotFoundException: Could not find class
([Lcom.khsitec    afe.common.data.CodeListElement;) at codebase ()
   at .__ZN3com10khsitecafe3rmi16khRMIServer_Stub11getCodeListEv
(e:\programmig\
interCafe\swtExample\com\khsitecafe\rmi\khRMIServer_Stub.java:60)

> -----Original Message-----
> From: Andrew Haley [mailto:aph@redhat.com]
> Sent: Thursday, May 26, 2005 12:06 PM
> To: Amir Bukhari
> Cc: java@gcc.gnu.org
> Subject: Re: RMI problem
> 
> Amir Bukhari writes:
>  >
>  > My App use RMI. In JVM it work fine, but when I compile it and run I
> got
>  > this error:
>  > gnu.java.rmi.server.UnicastRef@f13e70
>  > java.rmi.UnexpectedException: undeclared checked exception; nested
> exception
>  > is:
>  >         java.lang.ClassNotFoundException: Could not find class
>  > ([Lcom.khsitecafe.common.data.CodeListElement;) at codebase ()
>  >
>  >
>  > I could make connect to RMI Server and CodeListElement class is part of
> my
>  > code. It is not a library.
>  >
>  > Is RMI not fully supported with GCJ?
> 
> Please give us more information.  In particular we need to know
> exactly what version of gcj you used, what platform, how you built
> your packages, etc, etc.
> 
> Andrew.



More information about the Java mailing list