directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel L├ęcharny <elecha...@apache.org>
Subject Re: Problem when running server-integ tests
Date Mon, 21 Feb 2011 13:30:17 GMT
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


Mime
View raw message