Results 1 to 6 of 6

Thread: errors with "Greeting" classes while compiling the demo sources

  1. #1
    yohann is offline Registered User
    Name: Yohann Granet
    Organization: Astrophysic Laboratory of Marseille (LAM)
    Project: http://hal.archives-ouvertes.fr/hal-00357855/fr/
    Join Date
    Jun 2009
    Posts
    3

    errors with "Greeting" classes while compiling the demo sources

    Hi

    I try to compile the Ice-3.3.1 "demos" release but errors occur during the ant job...

    here are the error messages:


    Code:
    [javac] Compiling 3 source files to /home/yohann/Bureau/tmp/Ice-3.3.1/java/demo/Ice/serialize/classes
        [javac] /home/yohann/Bureau/tmp/Ice-3.3.1/java/demo/Ice/serialize/Client.java:91: cannot find symbol
        [javac] symbol  : method sendGreeting(Demo.MyGreeting)
        [javac] location: interface Demo.GreetPrx
        [javac]             greet.sendGreeting(nullGreeting);
        [javac]                  ^
        [javac] /home/yohann/Bureau/tmp/Ice-3.3.1/java/demo/Ice/serialize/Client.java:95: cannot find symbol
        [javac] symbol  : method sendGreeting(Demo.MyGreeting)
        [javac] location: interface Demo.GreetPrx
        [javac]                 greet.sendGreeting(greeting);
        [javac]                      ^
        [javac] /home/yohann/Bureau/tmp/Ice-3.3.1/java/demo/Ice/serialize/GreetI.java:12: GreetI is not abstract and does not override abstract method sendGreeting(byte[],Ice.Current) in Demo._GreetOperations
        [javac] public class GreetI extends _GreetDisp
        [javac]        ^
        [javac] 3 errors

    cause of the 2 first errors:
    the "sendGreeting" method expects a "Greeting" object as argument.
    But the "nullGreeting" argument (first error message) and the "greeting" argument (second error message) are both "MyGreeting" objects...
    and the "MyGreeting" class doesn't extend the "Greeting" class!


    cause of the third error:
    the "GreetI" class implements the "_GreetOperations.sendGreeting" method but while the interface defines a "byte[]" as first argument, the "GreetI.sendGreeting" method is declared with a "MyGreeting" object as first argument (besides, why a "MyGreeting" and not a "Greeting" object for this method?... )


    could you send me a message please when a corrected release will be available?

    thank you


    Yohann

  2. #2
    dwayne's Avatar
    dwayne is offline ZeroC Staff
    Name: Dwayne Boone
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Jan 2005
    Location
    St. John's, Newfoundland
    Posts
    397
    Are you sure you are using the 3.3.1 version of slice2java? The errors you are seeing would indicate that you are not.

  3. #3
    yohann is offline Registered User
    Name: Yohann Granet
    Organization: Astrophysic Laboratory of Marseille (LAM)
    Project: http://hal.archives-ouvertes.fr/hal-00357855/fr/
    Join Date
    Jun 2009
    Posts
    3
    Hi,

    thank you for your quick reply.

    But I don't understand why the problems could be caused by a bad version of slice2java...

    let's take a look at the Ice-3.3.1-demos.tar.gz from the "download" page (without having run "ant" nor directly used "slice2java").

    In the directory "Ice-3.3.1-demos/demoj/Ice/serialize" there is a "Client.java" file.
    In this file, line 91 and line 95, the "sendGreeting" method of a "GreetPrx" object is invoked with a "MyGreeting" object as argument (defined in there Ice-3.3.1-demos/demoj/Ice/serialize/Demo/MyGreeting.java).
    But in the "Ice-3.3.1-demos/demoj/Ice/serialize/Greet.ice" file the "sendGreeting" method is defined with a "sequence<byte>" as argument...
    So how the "sendGreeting" method in "Client.java" could accept a "MyGreeting" object instead of a java equivalent of ICE "sequence<byte>"?

    that was the first and second errors...
    for the third one the problem is the same:

    The "GreetI.java" you give (in "Ice-3.3.1-demos/demoj/Ice/serialize") extends well the "_GreetDisp" class and so should implements the "sendGreeting" method (still defined in the "Ice-3.3.1-demos/demoj/Ice/serialize/Greet.ice" file).
    But in the code of the "GreetI.java" class the "sendGreeting" method is defined with a "MyGreeting" argument, instead of a java equivalent of ICE "sequence<byte>".

    How that could work?

  4. #4
    dwayne's Avatar
    dwayne is offline ZeroC Staff
    Name: Dwayne Boone
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Jan 2005
    Location
    St. John's, Newfoundland
    Posts
    397
    The demo show how to transmit serializable java classes with Ice. This feature was only added in Ice 3.3.1, thus older versions of slice2java will not work. Please read the README in the demo directory or check the manual for more information on this feature.
    Last edited by dwayne; 06-22-2009 at 02:14 PM.

  5. #5
    yohann is offline Registered User
    Name: Yohann Granet
    Organization: Astrophysic Laboratory of Marseille (LAM)
    Project: http://hal.archives-ouvertes.fr/hal-00357855/fr/
    Join Date
    Jun 2009
    Posts
    3
    ... well, nice...
    and about my question?

  6. #6
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    I'm sorry, but I don't understand. What question do you think Dwayne didn't answer?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 03-14-2011, 05:08 PM
  2. Replies: 4
    Last Post: 10-08-2009, 10:09 AM
  3. Replies: 1
    Last Post: 05-07-2008, 05:56 PM
  4. "Explicit specialization" compiling problem
    By Zunino in forum Help Center
    Replies: 1
    Last Post: 11-11-2004, 08:52 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
  •