Problme with passing object in RMI remote method, java.lang.IllegalArgumentException: Cannot convert DataVar to DataVar
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   mark_yao
Posted On:   Wednesday, November 27, 2002 05:34 AM

Dear jGuru, when I try to passing my own defined class object (DataVar, in this case) to RMI remote method, I got flowing error java.lang.IllegalArgumentException: Cannot convert DataVar to DataVar Please note that DataVar is a java.io.Serializable object. DataVar dv=new DataVar("data_1", new Float(3456.22)); remoteDataProc.processDataVar(dv); The remoteDataProc is RMI remote implementation. If I call other remoteDataProc's methods that passes only java native types, everything is fine. Any suggestion and help are greatly appreciated. Thanks.    More>>

Dear jGuru,

when I try to passing my own defined class object (DataVar, in this case) to RMI remote method, I got flowing error

			
java.lang.IllegalArgumentException: Cannot convert DataVar to DataVar



Please note that DataVar is a java.io.Serializable object.

			
DataVar dv=new DataVar("data_1", new Float(3456.22));
remoteDataProc.processDataVar(dv);



The remoteDataProc is RMI remote implementation.

If I call other remoteDataProc's methods that passes only java native types, everything is fine.


Any suggestion and help are greatly appreciated.

Thanks.    <<Less

Re: Problme with passing object in RMI remote method, java.lang.IllegalArgumentException: Cannot convert DataVar to DataVar

Posted By:   Gautam_Marwaha  
Posted On:   Thursday, November 28, 2002 03:15 AM

1. make sure your class definition contains "implements java.io.Serializable"

2. versions of this class is the same on client and server - same package as well
About | Sitemap | Contact