directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny (Jira) <j...@apache.org>
Subject [jira] [Commented] (DIRAPI-364) Internal Error in response when using authRequest
Date Mon, 07 Sep 2020 14:22:00 GMT

    [ https://issues.apache.org/jira/browse/DIRAPI-364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17191729#comment-17191729
] 

Emmanuel Lécharny commented on DIRAPI-364:
------------------------------------------

Forgot that this snippet must be added on top of the class:

{code:java}
public class BindResponseDsml extends AbstractResultResponseDsml<BindResponse> implements
BindResponse
{
    private static final String AUTH_RESPONSE_TAG = "authResponse";
...
{code}

> Internal Error in response when using authRequest 
> --------------------------------------------------
>
>                 Key: DIRAPI-364
>                 URL: https://issues.apache.org/jira/browse/DIRAPI-364
>             Project: Directory Client API
>          Issue Type: Bug
>    Affects Versions: 1.0.0, 2.0.1
>            Reporter: Wylem Bars
>            Priority: Major
>
> I am using the apacheDS API (org.apache.directory.api:api-all:1.0.0) to forward the DSML
messages I received in my app to my local LDAP directory (apacheDS).
> {color:#0000ff}{color:#172b4d}When I forward such a message :{color} 
> {color}
>  
> {color:#0000ff}<{color}{color:#800000}batchRequest{color} {color:#ff0000}xmlns{color}{color:#000000}={color}{color:#0000ff}"urn:oasis:names:tc:DSML:2:0:core">{color}
>   {color:#0000ff}<{color}{color:#800000}authRequest{color} {color:#ff0000}principal{color}{color:#000000}={color}{color:#0000ff}"a8717135-81e3-4fc2-bcbe-5180d8a274fb@1.1.1.2.2"{color}
{color:#ff0000}requestID{color}{color:#000000}={color}{color:#0000ff}"4948"{color}{color:#800000}/{color}{color:#0000ff}>{color}
> ...
> {color:#0000ff}</{color}{color:#800000}batchRequest{color}{color:#0000ff}>{color}
>  
> The Dsmlv2Engine.process(OutputStream, OutputStream) method logs
>  
> 2020-09-07 14:08:41,201 WARN () [org.apache.directory.api.dsmlv2.engine.Dsmlv2Engine]
(http-/0.0.0.0:8080-1 ) Failed to process request: java.lang.NullPointerException
>  at org.apache.directory.api.dsmlv2.response.BindResponseDsml.toDsml(BindResponseDsml.java:64)
[api-all-1.0.0.jar:1.0.0]
>  at org.apache.directory.api.dsmlv2.engine.Dsmlv2Engine.writeResponse(Dsmlv2Engine.java:526)
[api-all-1.0.0.jar:1.0.0]
>  at org.apache.directory.api.dsmlv2.engine.Dsmlv2Engine.processRequest(Dsmlv2Engine.java:598)
[api-all-1.0.0.jar:1.0.0]
>  at org.apache.directory.api.dsmlv2.engine.Dsmlv2Engine.processDSML(Dsmlv2Engine.java:448)
[api-all-1.0.0.jar:1.0.0]
>  at org.apache.directory.api.dsmlv2.engine.Dsmlv2Engine.processDSML(Dsmlv2Engine.java:247)
[api-all-1.0.0.jar:1.0.0]
>  at org.apache.directory.api.dsmlv2.engine.Dsmlv2Engine.processDSML(Dsmlv2Engine.java:230)
[api-all-1.0.0.jar:1.0.0]
>  
> and the received response is :
> {color:#0000ff}<{color}{color:#800000}batchResponse{color} {color:#ff0000}xmlns{color}{color:#000000}={color}{color:#0000ff}"urn:oasis:names:tc:DSML:2:0:core"{color}
{color:#ff0000}requestID{color}{color:#000000}={color}{color:#0000ff}"0">{color}
> {color:#0000ff} <{color}{color:#800000}errorResponse{color} {color:#ff0000}requestID{color}{color:#000000}={color}{color:#0000ff}"2"{color}
{color:#ff0000}type{color}{color:#000000}={color}{color:#0000ff}"gatewayInternalError">{color}
> {color:#0000ff} <{color}{color:#800000}message{color}{color:#0000ff}>{color}{color:#000000}ERR_03003
Internal Error: null{color}{color:#0000ff}</{color}{color:#800000}message{color}{color:#0000ff}>{color}
> {color:#0000ff} </{color}{color:#800000}errorResponse{color}{color:#0000ff}>{color}
> {color:#0000ff}</{color}{color:#800000}batchResponse{color}{color:#0000ff}>{color}
>  
> {color:#0000ff}{color:#172b4d}This seems to happen because the writeResponse method in
class Dsmlv2Engine uses{color} {color}
> {code:java}
>  respDsml.toDsml( null );{code}
> {color:#cc7832}{color:#172b4d}which throw NullPointerException when trying to do{color}
{color}
> {code:java}
> Element element = root.addElement( "authResponse" );{code}
> {color:#172b4d}which seems to be inevitable as we input null.{color}
>  
> {color:#172b4d}This happens in version 1.0.0 but also with the 2.0.1 after update of
the dependency.{color}
> {color:#172b4d}Thanks in advance for your insights.{color}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@directory.apache.org
For additional commands, e-mail: dev-help@directory.apache.org


Mime
View raw message