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

What can cause IceEncapsulationException?

We are writing an ICE interface for Java, and it is throwing IceEncapsulationException. The only reference I can find in documentation says "This exception indicates a malformed data encapsulation.". The exception is thrown deep in ICE code, with no line name from user code. Moreover, we are not doing anything at all with data encapsulation - the method being called is a simple function with no input parameters, and a single output parameter of type string, implemented in a straightforward way. So I am completely at a loss as to why this could happen. Has it happened to anyone before, and what could be a possible cause?

The exception I am seeing is:
-! 8/2/10 20:02:35:268 warning: Ice.ThreadPool.Server-0: dispatch exception:
identity: beetleBeegle
operation: getInput
reason = (null)
at IceInternal.BasicStream.skipEmptyEncaps(
at beetleBeegle._BeegleDisp.___getInput(
at beetleBeegle._BeegleDisp.__dispatch(
at IceInternal.Incoming.invoke(
at Ice.ConnectionI.invokeAll(
at Ice.ConnectionI.dispatch(
at Ice.ConnectionI.message(
at IceInternal.ThreadPool.access$300(
at IceInternal.ThreadPool$



  • bernard
    bernard Jupiter, FL
    Hi Myrosia,

    Could you provide some additional information, in particular:
    - the Slice definition of getInput
    - the parameters you pass to getInput
    - the Ice version you're using

    Do you get this exception every time you call getInput?

    Best regards,
  • Hi Bernard, thanks for getting back to me. I saw this message just as I was about to post "never mind" of my own. I figured out what the problem was. The caller of getInput was using dynamic ice (so the number of arguments wasn't being checked), and it was passing in a parameter where there should have been none.

    So it is now solved. It would be good to have this information in the documentation, though. It does not define what happens if wrong parameters are passed over dynamic ICE, and this is something that would be very helpful in general.