Results 1 to 8 of 8

Thread: Can't figure out why the Printer autogenerated files are not compiling

  1. #1
    caos1234 is offline Registered User
    Name: Carlos Hurtado
    Organization: U de Chile
    Project: Sixbell
    Join Date
    May 2007
    Posts
    6

    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:

    Code:
    $ slice2java Printer.ice --output-dir=generated
    where Printer.ice is:

    Code:
    module Demo {
        interface Printer {
            void printString(string s);
        };
    };
    after that I compile using the following line:

    Code:
    javac -d classes -classpath classes:/usr/share/java/Ice.jar -source 1.4 generated/Demo/*.java
    So i'm just compiling the autogenerated files (no files made by me)
    And I get the following 9 errors:
    Code:
    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

  2. #2
    mes's Avatar
    mes
    mes is online now ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,443
    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,
    - Mark

  3. #3
    caos1234 is offline Registered User
    Name: Carlos Hurtado
    Organization: U de Chile
    Project: Sixbell
    Join Date
    May 2007
    Posts
    6
    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!

  4. #4
    mes's Avatar
    mes
    mes is online now ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,443
    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:
    Code:
    public class IceVersion
    {
        public static void main(String[] args)
        {
            System.out.println(IceUtil.Version.ICE_STRING_VERSION);
        }
    }
    Hope that helps,
    - Mark

  5. #5
    caos1234 is offline Registered User
    Name: Carlos Hurtado
    Organization: U de Chile
    Project: Sixbell
    Join Date
    May 2007
    Posts
    6

    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.
    Thanks

  6. #6
    xdm's Avatar
    xdm
    xdm is offline ZeroC Staff
    Name: Jose Gutierrez de la Concha
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Sep 2003
    Location
    La Coruņa, Spain
    Posts
    588

    Ice downloads


  7. #7
    mes's Avatar
    mes
    mes is online now ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,443
    Quote Originally Posted by caos1234 View Post
    Could you help me with where I could download a 3.1.0 version of Ice.jar?
    I'm not sure how things are structured in the Ice packages for Ubuntu, but on Fedora and RHEL you would need to install the ice-java and ice-java-devel RPMs. If you can't find the correct package, you can download this file:

    IceJ-3.1.0-java2.tar.gz

    Take care,
    - Mark

  8. #8
    caos1234 is offline Registered User
    Name: Carlos Hurtado
    Organization: U de Chile
    Project: Sixbell
    Join Date
    May 2007
    Posts
    6

    Thank you very much

    I really appreciate your help
    Now i can go on and do some work on some Ice thingies

    bye!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Eclipse plugin autogenerated code not working
    By raulgd in forum Bug Reports
    Replies: 1
    Last Post: 04-11-2011, 08:46 AM
  2. Problem including files in ice files
    By teoMalo in forum Help Center
    Replies: 4
    Last Post: 09-21-2009, 11:33 AM
  3. Printer example
    By akus85 in forum Help Center
    Replies: 2
    Last Post: 09-18-2009, 06:52 AM
  4. Replies: 13
    Last Post: 06-14-2007, 07:40 AM
  5. slice2cpp Printer.ice error?
    By ificanfly in forum Help Center
    Replies: 1
    Last Post: 07-31-2006, 08:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •