Archived

This forum has been archived. Please start a new discussion on GitHub.

Slice2Java plugin doesn't work with Ice 3.3.0

I have both ICE 3.2.1 and ICE 3.3.0 directories on my system and have the Slice2Java plugin installed on MyEclipse 7.0 (Eclipse 3.4).

When I set the Slice2Java Preferences to point to the ICE 3.2.1 directory and compile the Client demo program, everything works. If I change the Slice2Java Preferences to point to the ICE 3.3.0 directory, I get lots of compile errors. Should the plugin work with 3.3.0?

My Path environment variable contains the bin directory in the 3.3.0 directory.

Below is what I have for the ICE file, the Client source, and the errors I get with 3.3.0.

*******************************The ICE file module Demo {
interface Printer {
void printString(string s);
};
};

*******************************The source file package Demo;

public class Client {
public static void
main(String[] args) {
int status = 0;
Ice.Communicator ic = null;
try {
ic = Ice.Util.initialize(args);
Ice.ObjectPrx base = ic.stringToProxy("SimplePrinter:default -p 10000");
Demo.PrinterPrx printer = Demo.PrinterPrxHelper.checkedCast(base);
if (printer == null)
throw new Error("Invalid proxy");
printer.printString("Hello World!");
}
catch (Ice.LocalException e) {
e.printStackTrace();
status = 1;
}
catch (Exception e) {
System.err.println(e.getMessage());
status = 1;
}
if (ic != null) {
// Clean up
//
try {
ic.destroy();
}
catch (Exception e) {
System.err.println(e.getMessage());
status = 1;
}
}
System.exit(status);
}
}

*******************************The errors using ICE-3.3.0 Description Resource Path Location Type
warning: End of input with no newline, supplemented newline
}; Printer.ice ICEserver/slice line 5 Problem
__handler cannot be resolved _PrinterDelM.java ICEclient/generated/Demo line 20 Java Problem
__handler cannot be resolved _PrinterDelM.java ICEclient/generated/Demo line 58 Java Problem
__handler cannot be resolved _PrinterDelM.java ICEserver/generated/Demo line 20 Java Problem
__handler cannot be resolved _PrinterDelM.java ICEserver/generated/Demo line 58 Java Problem
An anonymous class cannot subclass the final class Direct _PrinterDelD.java ICEclient/generated/Demo line 25 Java Problem
An anonymous class cannot subclass the final class Direct _PrinterDelD.java ICEserver/generated/Demo line 25 Java Problem
Ice.DispatchStatus cannot be resolved _PrinterDelD.java ICEclient/generated/Demo line 39 Java Problem
Ice.DispatchStatus cannot be resolved _PrinterDelD.java ICEclient/generated/Demo line 45 Java Problem
Ice.DispatchStatus cannot be resolved _PrinterDelD.java ICEclient/generated/Demo line 49 Java Problem
Ice.DispatchStatus cannot be resolved _PrinterDisp.java ICEclient/generated/Demo line 87 Java Problem
Ice.DispatchStatus cannot be resolved to a type _PrinterDelD.java ICEclient/generated/Demo line 27 Java Problem
Ice.DispatchStatus cannot be resolved to a type _PrinterDelD.java ICEclient/generated/Demo line 44 Java Problem
Ice.DispatchStatus cannot be resolved to a type _PrinterDisp.java ICEclient/generated/Demo line 77 Java Problem
Ice.DispatchStatus cannot be resolved to a type _PrinterDisp.java ICEclient/generated/Demo line 99 Java Problem
Ice.SystemException cannot be resolved to a type _PrinterDelD.java ICEclient/generated/Demo line 56 Java Problem
IceInternal.Ex cannot be resolved to a type PrinterHolder.java ICEclient/generated/Demo line 38 Java Problem
The method ___printString(Printer, Incoming, Current) from the type _PrinterDisp refers to the missing type DispatchStatus _PrinterDisp.java ICEclient/generated/Demo line 128 Java Problem
The method __collocDispatch(Direct) is undefined for the type Object _PrinterDelD.java ICEclient/generated/Demo line 44 Java Problem
The method __collocDispatch(Direct) is undefined for the type Object _PrinterDelD.java ICEserver/generated/Demo line 44 Java Problem
The method __getDelegate() in the type ObjectPrxHelperBase is not applicable for the arguments (boolean) PrinterPrxHelper.java ICEclient/generated/Demo line 42 Java Problem
The method __getDelegate() in the type ObjectPrxHelperBase is not applicable for the arguments (boolean) PrinterPrxHelper.java ICEserver/generated/Demo line 42 Java Problem
The method __handleException(_ObjectDel, LocalException, int) in the type ObjectPrxHelperBase is not applicable for the arguments (_ObjectDel, LocalException, null, int) PrinterPrxHelper.java ICEclient/generated/Demo line 53 Java Problem
The method __handleException(_ObjectDel, LocalException, int) in the type ObjectPrxHelperBase is not applicable for the arguments (_ObjectDel, LocalException, null, int) PrinterPrxHelper.java ICEserver/generated/Demo line 53 Java Problem
The method __handleExceptionWrapper(_ObjectDel, LocalExceptionWrapper) in the type ObjectPrxHelperBase is not applicable for the arguments (_ObjectDel, LocalExceptionWrapper, null) PrinterPrxHelper.java ICEclient/generated/Demo line 49 Java Problem
The method __handleExceptionWrapper(_ObjectDel, LocalExceptionWrapper) in the type ObjectPrxHelperBase is not applicable for the arguments (_ObjectDel, LocalExceptionWrapper, null) PrinterPrxHelper.java ICEserver/generated/Demo line 49 Java Problem
The method skipEmptyEncaps() is undefined for the type BasicStream _PrinterDelM.java ICEclient/generated/Demo line 48 Java Problem
The method skipEmptyEncaps() is undefined for the type BasicStream _PrinterDelM.java ICEserver/generated/Demo line 48 Java Problem
The method throwUserException() is undefined for the type Direct _PrinterDelD.java ICEclient/generated/Demo line 47 Java Problem
The method throwUserException() is undefined for the type Direct _PrinterDelD.java ICEserver/generated/Demo line 47 Java Problem
The method throwUserException() is undefined for the type Outgoing _PrinterDelM.java ICEclient/generated/Demo line 41 Java Problem
The method throwUserException() is undefined for the type Outgoing _PrinterDelM.java ICEserver/generated/Demo line 41 Java Problem
The method throwWrapper(Throwable) is undefined for the type LocalExceptionWrapper _PrinterDelD.java ICEclient/generated/Demo line 62 Java Problem
The method throwWrapper(Throwable) is undefined for the type LocalExceptionWrapper _PrinterDelD.java ICEserver/generated/Demo line 62 Java Problem
The return type is incompatible with ObjectImpl.__dispatch(Incoming, Current) _PrinterDisp.java ICEserver/generated/Demo line 99 Java Problem
Type mismatch: cannot convert from DispatchStatus to DispatchStatus _PrinterDisp.java ICEserver/generated/Demo line 112 Java Problem
Type mismatch: cannot convert from DispatchStatus to DispatchStatus _PrinterDisp.java ICEserver/generated/Demo line 116 Java Problem
Type mismatch: cannot convert from DispatchStatus to DispatchStatus _PrinterDisp.java ICEserver/generated/Demo line 120 Java Problem
Type mismatch: cannot convert from DispatchStatus to DispatchStatus _PrinterDisp.java ICEserver/generated/Demo line 124 Java Problem

Comments

  • matthew
    matthew NL, Canada
    It should work with Ice 3.3, in fact it was never tested with Ice 3.2.1 :) It sounds like somehow the environment got messed up. Did you check the CLASSPATH entries? Did you try a clean build?
  • Only "end of input with no newline" error remains

    Thanks. I had the wrong ICE.jar directory in Project>Preferences>Java Build Path. Changing it to the Ice 3.3.0 directory got rid of all of the errors except the one saying:

    "warning: End of input with no newline, supplemented newline
    }; Printer.ice ICEserver/slice line 5 Problem"

    Any idea what that means? I thought it meant that the ice file had to end with a newline, but I put a couple of newlines in and the Error is still there. The message is in the Error section, even though it says "warning". My assumption is that it is coming from Slice2Java.EXE.

    Since it says it's a warning and it apparently compiled the Java classes OK, I can probably ignore it, but I'm curious about what it means.
  • dwayne
    dwayne St. John's, Newfoundland
    This warning is generated by the mcpp preprocessor. As you say, the warning can be ignored as it does not affect the compiling of the slice files. In the next version of Ice we release this warning will be suppressed, so you will no longer see it when you compile your slice from either the command line or from within Eclipse.