This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: RMI problem
- From: "Amir Bukhari" <ufz6 at rz dot uni-karlsruhe dot de>
- To: <java at gcc dot gnu dot org>
- Date: Thu, 26 May 2005 17:49:42 +0200
- Subject: RE: RMI problem
Please fogot the last message it is wrong one:
When I try to create the stub I got the following:
grmic -v1.2 com.khsitecafe.rmi.khRMIServer
java.lang.ClassNotFoundException: java.rmi.server.UnicastRemoteObject not
found in gnu.gcj.runtime.SystemClassLoader{urls=[file:.\],
parent=gnu.gcj.runtime.VMClassLoader{urls=[core:/], parent=null}}
at 0x0041629e (Unknown Source)
at 0x00415c32 (Unknown Source)
at 0x00415c85 (Unknown Source)
Here is the interface methde:
public CodeListRMI getCodeList() throws RemoteException;
CodeListRMI class:
package com.khsitecafe.common.data;
import java.io.Serializable;
public class CodeListRMI implements Serializable {
private CodeListElement[] elements = null;
/**
* @return Returns the elements.
*/
public CodeListElement[] getElements() {
return elements;
}
/**
* @param elements The elements to set.
*/
public void setElements(CodeListElement[] elements) {
this.elements = elements;
}
}
-------------------
CodeListElement class:
package com.khsitecafe.common.data;
import java.io.Serializable;
public class CodeListElement implements Serializable {
private long id;
private String name;
private String date;
private int count;
private int duration;
private int usedCount;
/**
* @return Returns the date.
*/
public String getDate() {
return date;
}
/**
* @param date The date to set.
*/
public void setDate(String date) {
this.date = date;
}
/**
* @return Returns the duration.
*/
public int getDuration() {
return duration;
}
/**
* @param duration The duration to set.
*/
public void setDuration(int duration) {
this.duration = duration;
}
/**
* @return Returns the id.
*/
public long getId() {
return id;
}
/**
* @param id The id to set.
*/
public void setId(long id) {
this.id = id;
}
/**
* @return Returns the name.
*/
public String getName() {
return name;
}
/**
* @param name The name to set.
*/
public void setName(String name) {
this.name = name;
}
/**
* @return Returns the count.
*/
public int getCount() {
return count;
}
/**
* @param count The count to set.
*/
public void setCount(int count) {
this.count = count;
}
/**
* @return Returns the restCount.
*/
public int getUsedCount() {
return usedCount;
}
/**
* @param restCount The restCount to set.
*/
public void setUsedCount(int restCount) {
this.usedCount = restCount;
}
}
> -----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.