RMI - problem with method which returns my own object (Plik)
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Mi_Kar
Posted On:   Friday, January 9, 2009 07:30 AM

Hi,
I wrote RMI server, interface. Copied interface and a stub file to a client. Now i want to run method which returns my own Object (its called Plik). I get this error:

java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.lang.ClassNotFoundException: pl.ka.mi.klasy.Plik

dont know what to do with it. Methods which return String or sth like that work fine.

should i set codebase? or sth more? If so - how to do it properly?

Thank you for all advices.

Re: RMI - problem with method which returns my own object (Plik)

Posted By:   Mi_Kar  
Posted On:   Friday, January 9, 2009 10:08 AM

ok so how to set this codebase properly...i have read some tutorials and understand nothing. If u could give some advice how to do that for pl.mi.kar.serwer.Plik package i would really appreciate that.
Do i have to run web server for it? (i have sun java web server because of load balancing +glassfish)

Re: RMI - problem with method which returns my own object (Plik)

Posted By:   Edward_Harned  
Posted On:   Friday, January 9, 2009 09:53 AM

Its probably a classpath/codebase problem.


RMI has to find the class to give it to the client.

About | Sitemap | Contact