Ok, Felix is not the culrpit, definitively...

I don't know why, but I got some illumination. If the following code :

       int remaining = stream.remaining();
       System.out.println( "----- 0" );
       container.incrementDecodeBytes( remaining );

       System.out.println( "----- 1" );

does not print the "----- 1" message, it's either because we are blocked into 
the container.incrementDecodeBytes() method. That was my first assumption, but after 
having add some print in this method, I saw that we don't enter into it.

I tried a few other modifications, wasted 2 hours around this, and then, flash 
in my brain, what if 'container' is null ? You'd expect a NPE to be reported, 
yes? Yes. And we *have* a NPE, but it's silently swallowed by the clien 
LdapNetworkConnection.execptionCaught() method :

    public void exceptionCaught( IoSession session, Throwable cause ) throws 
Exception
    {
        LOG.warn( cause.getMessage(), cause );

        if ( cause instanceof ProtocolEncoderException )
        {
            Throwable realCause = ( ( ProtocolEncoderException ) cause 
).getCause();

            if ( realCause instanceof MessageEncoderException )
            {
                int messageId = ( ( MessageEncoderException ) realCause 
).getMessageId();

                ResponseFuture<?>  response = futureMap.get( messageId );
                response.cancel( true );
                response.setCause( realCause );
            }
        }
    }

So now, it's totally rational, it's not a Felix bug, it's not even a JVM bug, 
it's a bad bug in *our* code.

Next step : why is this container null ???

/me digging...



--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com

Reply via email to