Archived
This forum has been archived. Please start a new discussion on GitHub.
Bug about Module
in Bug Reports
I have follow Ice-1.5.1.pdf , and try the hello app written in java ,from page 58 . The example is running well. When I change Printer.ice to :
module M1 {
interface Printer
{
string printString(string s) ;
};
} ;
then try java -cp ./classes:$ICEJ_HOME/lib/Ice.jar M1.Client , I get :
Exception in thread "main" java.lang.Error: Feb Invalid proxy
at M1.Client.main(Client.java:18)
, (comment " Feb Invalid proxy " is changed by me)
then I follow the program by System.out.println("**")
at last find in PrinterPrxHelper.java:
public final class PrinterPrxHelper extends Ice.ObjectPrxHelperBase implements PrinterPrx
{
...
if(b.ice_isA("::M1::Printer")) --> if(b.ice_isA("::Printer"))
}
"::M1::Printer" must be "::Printer" ,
then
java -cp ./classes:$ICEJ_HOME/lib/Ice.jar M1.Client
run ok .
Do you think it is a bug or I use module incorrectly ?
module M1 {
interface Printer
{
string printString(string s) ;
};
} ;
then try java -cp ./classes:$ICEJ_HOME/lib/Ice.jar M1.Client , I get :
Exception in thread "main" java.lang.Error: Feb Invalid proxy
at M1.Client.main(Client.java:18)
, (comment " Feb Invalid proxy " is changed by me)
then I follow the program by System.out.println("**")
at last find in PrinterPrxHelper.java:
public final class PrinterPrxHelper extends Ice.ObjectPrxHelperBase implements PrinterPrx
{
...
if(b.ice_isA("::M1::Printer")) --> if(b.ice_isA("::Printer"))
}
"::M1::Printer" must be "::Printer" ,
then
java -cp ./classes:$ICEJ_HOME/lib/Ice.jar M1.Client
run ok .
Do you think it is a bug or I use module incorrectly ?
0
Comments
-
::M1::Printer is correct, not ::Printer. Does your server use the same Slice definitions as the client, i.e., does it implement ::M1::Printer or simply ::Printer? If the latter, then this is the reason for the failure. Both the client and the server mus use the same Slice code.0
-
Yes I find the problem is my mistick .
I used the client written by java implement module M1 , to call server written by c++ without module M1.
So concluded the principle , the client / server must use the same .ice defination .
Thanks a lot , and be guilt to bother you.0