Results 1 to 3 of 3

Thread: What can cause IceEncapsulationException?

  1. #1
    myrosia is offline Registered User
    Name: Myroslava Dzikovska
    Organization: University of Edinburgh
    Project: tutorial dialogue system
    Join Date
    Oct 2009
    Posts
    29

    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
    facet:
    operation: getInput
    Ice.EncapsulationException
    reason = (null)
    at IceInternal.BasicStream.skipEmptyEncaps(BasicStrea m.java:348)
    at beetleBeegle._BeegleDisp.___getInput(_BeegleDisp.j ava:319)
    at beetleBeegle._BeegleDisp.__dispatch(_BeegleDisp.ja va: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(Thre adPool.java:644)
    at java.lang.Thread.run(Thread.java:636)


    Myrosia

  2. #2
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    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,
    Bernard
    Bernard Normier
    ZeroC, Inc.

  3. #3
    myrosia is offline Registered User
    Name: Myroslava Dzikovska
    Organization: University of Edinburgh
    Project: tutorial dialogue system
    Join Date
    Oct 2009
    Posts
    29
    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.

Thread Information

Users Browsing this Thread

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •