You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Jörg Henne (JIRA)" <ji...@apache.org> on 2006/08/07 20:03:13 UTC

[jira] Created: (DIRSERVER-699) Known Controls except PSearchControl cause NPE

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

       

Re: [jira] Created: (DIRSERVER-699) Known Controls except PSearchControl cause NPE

Posted by Jörg Henne <j....@levigo.de>.
Alex Karasulu wrote:
>
> Hmmmm don't know how ACI relates to this search control issue.  Could 
> you clarify?
>
well, as just stated in DIRSERVER-699: I failed th mention the control I 
tried to use. The SubentriesControl. Without it, subentries are not 
returned in searches and must be fetched by explicit DN.

Joerg Henne


Re: [jira] Created: (DIRSERVER-699) Known Controls except PSearchControl cause NPE

Posted by Alex Karasulu <ao...@bellsouth.net>.
Jörg Henne wrote:
> Jörg Henne (JIRA) wrote:
>> 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
> With respect to this issue: is there any work-around for this, i.e. a 
> way of knowing which ACI there are short of simply remembering the ones 
> that have been created?

Hmmmm don't know how ACI relates to this search control issue.  Could 
you clarify?

Thanks,
Alex


Re: [jira] Created: (DIRSERVER-699) Known Controls except PSearchControl cause NPE

Posted by Jörg Henne <j....@levigo.de>.
Jörg Henne (JIRA) wrote:
> 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
With respect to this issue: is there any work-around for this, i.e. a 
way of knowing which ACI there are short of simply remembering the ones 
that have been created?

Joerg Henne

[jira] Commented: (DIRSERVER-699) Known Controls except PSearchControl cause NPE

Posted by "Jörg Henne (JIRA)" <ji...@apache.org>.
    [ 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

       

[jira] Assigned: (DIRSERVER-699) Known Controls except PSearchControl cause NPE

Posted by "Alex Karasulu (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DIRSERVER-699?page=all ]

Alex Karasulu reassigned DIRSERVER-699:
---------------------------------------

    Assignee: Alex Karasulu

> 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
>         Assigned To: Alex Karasulu
>
> 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

       

[jira] Closed: (DIRSERVER-699) Known Controls except PSearchControl cause NPE

Posted by "Alex Karasulu (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DIRSERVER-699?page=all ]

Alex Karasulu closed DIRSERVER-699.
-----------------------------------

    Fix Version/s: 1.1.0
                   1.0-RC4
       Resolution: Fixed

Fixed this in both 1.0 and in trunks.

> 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
>         Assigned To: Alex Karasulu
>             Fix For: 1.1.0, 1.0-RC4
>
>
> 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

       

[jira] Commented: (DIRSERVER-699) Known Controls except PSearchControl cause NPE

Posted by "Alex Karasulu (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRSERVER-699?page=comments#action_12426388 ] 
            
Alex Karasulu commented on DIRSERVER-699:
-----------------------------------------

Hmmm you got a stack trace I can look at.  This is a really odd problem.  

> 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