Home Help Center

What can cause IceEncapsulationException?

myrosiamyrosia Member Myroslava DzikovskaOrganization: University of EdinburghProject: tutorial dialogue system ✭✭
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(BasicStream.java:348)
at beetleBeegle._BeegleDisp.___getInput(_BeegleDisp.java:319)
at beetleBeegle._BeegleDisp.__dispatch(_BeegleDisp.java:389)
at IceInternal.Incoming.invoke(Incoming.java:159)
at Ice.ConnectionI.invokeAll(ConnectionI.java:2312)
at Ice.ConnectionI.dispatch(ConnectionI.java:1199)
at Ice.ConnectionI.message(ConnectionI.java:1154)
at IceInternal.ThreadPool.run(ThreadPool.java:302)
at IceInternal.ThreadPool.access$300(ThreadPool.java:12)
at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:644)
at java.lang.Thread.run(Thread.java:636)



  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    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,
  • myrosiamyrosia Member Myroslava DzikovskaOrganization: University of EdinburghProject: tutorial dialogue system ✭✭
    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.
Sign In or Register to comment.