directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Henne (JIRA) <j...@apache.org>
Subject [jira] Commented: (DIRSERVER-699) Known Controls except PSearchControl cause NPE
Date Tue, 08 Aug 2006 07:25:16 GMT
    [ http://issues.apache.org/jira/browse/DIRSERVER-699?page=comments#action_12426486 ] 
            
Jörg Henne commented on DIRSERVER-699:
--------------------------------------

Sure. Here we go:

[09:22:19] WARN [org.apache.directory.server.ldap.LdapProtocolProvider$LdapProtocolHandler]
- [/127.0.0.1:4281] Unexpected exception forcing session to close: sending disconnect notice
to client.
org.apache.mina.filter.codec.ProtocolDecoderException: java.lang.NullPointerException (Hexdump:
empty)
	at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:168)
	at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:501)
	at org.apache.mina.common.support.AbstractIoFilterChain.access$5(AbstractIoFilterChain.java:495)
	at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:787)
	at org.apache.mina.filter.ThreadPoolFilter.processEvent(ThreadPoolFilter.java:718)
	at org.apache.mina.filter.ThreadPoolFilter$Worker.processEvents(ThreadPoolFilter.java:475)
	at org.apache.mina.filter.ThreadPoolFilter$Worker.run(ThreadPoolFilter.java:429)
Caused by: java.lang.NullPointerException
	at org.apache.directory.shared.ldap.message.AbstractMessage.add(AbstractMessage.java:100)
	at org.apache.directory.shared.ldap.codec.TwixTransformer.transform(TwixTransformer.java:783)
	at org.apache.directory.shared.ldap.message.MessageDecoder$1.decodeOccurred(MessageDecoder.java:148)
	at org.apache.directory.shared.ldap.codec.TwixDecoder.decode(TwixDecoder.java:135)
	at org.apache.directory.shared.ldap.message.MessageDecoder.decode(MessageDecoder.java:206)
	at org.apache.mina.filter.codec.asn1.Asn1CodecDecoder.decode(Asn1CodecDecoder.java:52)
	at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:157)
	... 6 more

What I failed to mention is that the control I tries to use was the SubentriesControl.
The exception is not that odd actually, if you look at the code:

- TwixTransformer:742 initializes the ControlImpl to null
- in :746 PSearchControls are handled
- in :757 the generic ones with just a byte array
- both conditions above don't catch,
- therefore we fall out at the bottom and try to add a null ControlImpl in :783.


> Known Controls except PSearchControl cause NPE
> ----------------------------------------------
>
>                 Key: DIRSERVER-699
>                 URL: http://issues.apache.org/jira/browse/DIRSERVER-699
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: ldap
>    Affects Versions: 1.0-RC4
>            Reporter: Jörg Henne
>
> Known controls, i.e. those which are decoded to a class instance instead of a byte array,
cause a NPE as the TwixTransformer:783 tries to set a null value to the snickersMessage.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message