Archived

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

Why does idempotent cause marshalexception

hello, in the beginning I used java as client and C++ as server and they worked well. But when I made an operation idempotent in the ice file, the problem arised. Whenever the client calls the idempotent operation of the server, the server will throw exception as follows:
...warning: dispatch exception: Object.cpp:292: Ice::MarshalException:
protocol error: error during marshaling or unmarshaling:
unexpected operation mode. expected = ::Ice::Idempotent received = ::Ice::Normal
...
If I remove the keyword idempotent in the ice file and re-slice2cpp, the server works well again. What's the problem?
Thanks a lot!

Comments

  • benoit
    benoit Rennes, France
    Hi,

    Which Ice version do you use? This exception indicates that the Java client still sends the operation with the "normal" operation mode (instead of the expected "idempotent"). Did you recompile the Slice file with slice2java and Java client?

    Cheers,
    Benoit.
  • Thanks Benoit!
    The problem has been solved! I did recompile the Slice file with slice2java and Java client, but maybe I didn't refresh the developing environment!