Archived
This forum has been archived. Please start a new discussion on GitHub.
Can't figure out why the Printer autogenerated files are not compiling
Hello, I'm just starting with ice, but I have an issue compiling the sample Printer.ice file after I use slice2java which works fine.
I'm doing the following:
where Printer.ice is:
after that I compile using the following line:
And I get the following 9 errors:
Weirdly, i had no problem compiling the C++ example.
Any ideas? if you need any more information please reply. Thanks
I'm doing the following:
$ slice2java Printer.ice --output-dir=generated
where Printer.ice is:
module Demo { interface Printer { void printString(string s); }; };
after that I compile using the following line:
javac -d classes -classpath classes:/usr/share/java/Ice.jar -source 1.4 generated/Demo/*.javaSo i'm just compiling the autogenerated files (no files made by me)
And I get the following 9 errors:
generated/Demo/_PrinterDelD.java:18: cannot resolve symbol symbol : class LocalExceptionWrapper location: package IceInternal throws IceInternal.LocalExceptionWrapper ^ generated/Demo/_PrinterDel.java:17: cannot resolve symbol symbol : class LocalExceptionWrapper location: package IceInternal throws IceInternal.LocalExceptionWrapper; ^ generated/Demo/_PrinterDelM.java:18: cannot resolve symbol symbol : class LocalExceptionWrapper location: package IceInternal throws IceInternal.LocalExceptionWrapper ^ generated/Demo/_PrinterDelD.java:47: cannot resolve symbol symbol : class LocalExceptionWrapper location: package IceInternal throw new IceInternal.LocalExceptionWrapper(__ex, false); ^ generated/Demo/_PrinterDelM.java:50: cannot resolve symbol symbol : class LocalExceptionWrapper location: package IceInternal throw new IceInternal.LocalExceptionWrapper(__ex, false); ^ generated/Demo/PrinterPrxHelper.java:35: cannot resolve symbol symbol : class LocalExceptionWrapper location: package IceInternal catch(IceInternal.LocalExceptionWrapper __ex) ^ generated/Demo/PrinterPrxHelper.java:98: cannot resolve symbol symbol : method ice_facet (java.lang.String) location: interface Ice.ObjectPrx Ice.ObjectPrx __bb = __obj.ice_facet(__facet); ^ generated/Demo/PrinterPrxHelper.java:121: cannot resolve symbol symbol : method ice_facet (java.lang.String) location: interface Ice.ObjectPrx Ice.ObjectPrx __bb = __obj.ice_facet(__facet); ^ generated/Demo/PrinterPrxHelper.java:157: cannot resolve symbol symbol : method ice_facet (java.lang.String) location: interface Ice.ObjectPrx Ice.ObjectPrx __bb = __obj.ice_facet(__facet); ^ 9 errors
Weirdly, i had no problem compiling the C++ example.
Any ideas? if you need any more information please reply. Thanks
0
Comments
-
Hi Carlos,
Welcome to the forum!
I tried to reproduce your errors on Linux with Ice 3.2.0 and Java5, but everything worked fine. You have verified that /usr/share/java/Ice.jar actually exists and has the necessary permission settings?
If you're still having trouble, please provide a detailed description of your environment (OS version, Ice version, Java version, etc.).
Take care,
- Mark0 -
i'm using java 1.4
javac : /usr/lib/j2se/1.4/bin/javac
(java -version)
java version "1.4.2-02"
Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.4.2-02)
Java HotSpot(TM) Client VM (build Blackdown-1.4.2-02, mixed mode)
Ice.jar exists. I've chmoded it to 777 and it still happens
If i don't use Ice.jar as a classpath, I get about 71 errors (cause it doesn't find Ice objects)
ice:3.1.0
ubuntu edgy (i know 3.2 is not supported, so i donwloaded the latest supported version from ubuntu's repositories using apt-get)
Really hope you can help me, cause i'm stuck.
Thanks!0 -
Hi,
I suspect that the Ice.jar file you are using is from an older (pre-3.1.0) version of Ice, since the LocalExceptionWrapper and ice_facet symbols were added in Ice 3.1.0. You can verify the Ice version of a translator by running
$ slice2java -v
To verify the version of Ice.jar, compile and run the following program:public class IceVersion { public static void main(String[] args) { System.out.println(IceUtil.Version.ICE_STRING_VERSION); } }
Hope that helps,
- Mark0 -
One step to go
You were right. The Ice.jar version is 3.0.1
Could you help me with where I could download a 3.1.0 version of Ice.jar?
I appreciate it a lot.
Thanks0 -
0
-
Could you help me with where I could download a 3.1.0 version of Ice.jar?
IceJ-3.1.0-java2.tar.gz
Take care,
- Mark0 -
Thank you very much
I really appreciate your help
Now i can go on and do some work on some Ice thingies
bye!0