You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-dev@ws.apache.org by "Martin (JIRA)" <ji...@apache.org> on 2010/03/17 00:15:27 UTC

[jira] Created: (AXIS2-4656) NPE from ServiceClient in method [public OperationClient createClient]

NPE from ServiceClient in method [public OperationClient createClient]
----------------------------------------------------------------------

                 Key: AXIS2-4656
                 URL: https://issues.apache.org/jira/browse/AXIS2-4656
             Project: Axis2
          Issue Type: Bug
          Components: client-api
    Affects Versions: 1.5.1
         Environment: Java 5, Windows
            Reporter: Martin
            Priority: Minor


Using a default Options instance with a ServiceClient causes a NullPointerException from ServiceClient.createClient(QName operationQName) throws AxisFault.

The line in question is: 648

         if (JavaUtils.isTrue(getOptions().getProperty(AUTO_OPERATION_CLEANUP), true) &&
                 !getOptions().isUseSeparateListener()) {
             cleanupTransport();
        }

In a default Options, properties are null, causing the NPE. This code should check for NPE's.

Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-4656) NPE from ServiceClient in method [public OperationClient createClient]

Posted by "Nuwan Bandara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12859688#action_12859688 ] 

Nuwan Bandara commented on AXIS2-4656:
--------------------------------------

Hi 

can you explain the scenario, which caused the NPE, more. It seems inside "JavaUtils.isTrue" method a null check is in place.

Regards,
/Nuwan

> NPE from ServiceClient in method [public OperationClient createClient]
> ----------------------------------------------------------------------
>
>                 Key: AXIS2-4656
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4656
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.5.1
>         Environment: Java 5, Windows
>            Reporter: Martin
>            Priority: Minor
>
> Using a default Options instance with a ServiceClient causes a NullPointerException from ServiceClient.createClient(QName operationQName) throws AxisFault.
> The line in question is: 648
>          if (JavaUtils.isTrue(getOptions().getProperty(AUTO_OPERATION_CLEANUP), true) &&
>                  !getOptions().isUseSeparateListener()) {
>              cleanupTransport();
>         }
> In a default Options, properties are null, causing the NPE. This code should check for NPE's.
> Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-4656) NPE from ServiceClient in method [public OperationClient createClient]

Posted by "Nuwan Bandara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12859892#action_12859892 ] 

Nuwan Bandara commented on AXIS2-4656:
--------------------------------------

Hi,

Okey, understood, will look in to it

Regards
/Nuwan

> NPE from ServiceClient in method [public OperationClient createClient]
> ----------------------------------------------------------------------
>
>                 Key: AXIS2-4656
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4656
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.5.1
>         Environment: Java 5, Windows
>            Reporter: Martin
>            Priority: Minor
>
> Using a default Options instance with a ServiceClient causes a NullPointerException from ServiceClient.createClient(QName operationQName) throws AxisFault.
> The line in question is: 648
>          if (JavaUtils.isTrue(getOptions().getProperty(AUTO_OPERATION_CLEANUP), true) &&
>                  !getOptions().isUseSeparateListener()) {
>              cleanupTransport();
>         }
> In a default Options, properties are null, causing the NPE. This code should check for NPE's.
> Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-4656) NPE from ServiceClient in method [public OperationClient createClient]

Posted by "Martin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12859886#action_12859886 ] 

Martin commented on AXIS2-4656:
-------------------------------

My apologies.

I did not word that correctly.

With a default ServiceClient, not having Options set, getOptions() returns null, causing an NPE within the isTrue() clause.

IMO, getOptions() should be checked for null and a more appropriate course of action taken.


Thanks for looking at this!

Martin

> NPE from ServiceClient in method [public OperationClient createClient]
> ----------------------------------------------------------------------
>
>                 Key: AXIS2-4656
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4656
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.5.1
>         Environment: Java 5, Windows
>            Reporter: Martin
>            Priority: Minor
>
> Using a default Options instance with a ServiceClient causes a NullPointerException from ServiceClient.createClient(QName operationQName) throws AxisFault.
> The line in question is: 648
>          if (JavaUtils.isTrue(getOptions().getProperty(AUTO_OPERATION_CLEANUP), true) &&
>                  !getOptions().isUseSeparateListener()) {
>              cleanupTransport();
>         }
> In a default Options, properties are null, causing the NPE. This code should check for NPE's.
> Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-4656) NPE from ServiceClient in method [public OperationClient createClient]

Posted by "Nuwan Bandara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12859892#action_12859892 ] 

Nuwan Bandara commented on AXIS2-4656:
--------------------------------------

Hi,

Okey, understood, will look in to it

Regards
/Nuwan

> NPE from ServiceClient in method [public OperationClient createClient]
> ----------------------------------------------------------------------
>
>                 Key: AXIS2-4656
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4656
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.5.1
>         Environment: Java 5, Windows
>            Reporter: Martin
>            Priority: Minor
>
> Using a default Options instance with a ServiceClient causes a NullPointerException from ServiceClient.createClient(QName operationQName) throws AxisFault.
> The line in question is: 648
>          if (JavaUtils.isTrue(getOptions().getProperty(AUTO_OPERATION_CLEANUP), true) &&
>                  !getOptions().isUseSeparateListener()) {
>              cleanupTransport();
>         }
> In a default Options, properties are null, causing the NPE. This code should check for NPE's.
> Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (AXIS2-4656) NPE from ServiceClient in method [public OperationClient createClient]

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4656.
------------------------------------

    Resolution: Invalid

Since the options attribute is initialized at construction time, the only way it could be null is after calling setOptions with a null argument. However, that is forbidden by the Javadoc of that method. Therefore the NPE can only be caused by an invalid usage of ServiceClient.

> NPE from ServiceClient in method [public OperationClient createClient]
> ----------------------------------------------------------------------
>
>                 Key: AXIS2-4656
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4656
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.5.1
>         Environment: Java 5, Windows
>            Reporter: Martin
>            Priority: Minor
>
> Using a default Options instance with a ServiceClient causes a NullPointerException from ServiceClient.createClient(QName operationQName) throws AxisFault.
> The line in question is: 648
>          if (JavaUtils.isTrue(getOptions().getProperty(AUTO_OPERATION_CLEANUP), true) &&
>                  !getOptions().isUseSeparateListener()) {
>              cleanupTransport();
>         }
> In a default Options, properties are null, causing the NPE. This code should check for NPE's.
> Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (AXIS2-4656) NPE from ServiceClient in method [public OperationClient createClient]

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4656.
------------------------------------

    Resolution: Invalid

Since the options attribute is initialized at construction time, the only way it could be null is after calling setOptions with a null argument. However, that is forbidden by the Javadoc of that method. Therefore the NPE can only be caused by an invalid usage of ServiceClient.

> NPE from ServiceClient in method [public OperationClient createClient]
> ----------------------------------------------------------------------
>
>                 Key: AXIS2-4656
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4656
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.5.1
>         Environment: Java 5, Windows
>            Reporter: Martin
>            Priority: Minor
>
> Using a default Options instance with a ServiceClient causes a NullPointerException from ServiceClient.createClient(QName operationQName) throws AxisFault.
> The line in question is: 648
>          if (JavaUtils.isTrue(getOptions().getProperty(AUTO_OPERATION_CLEANUP), true) &&
>                  !getOptions().isUseSeparateListener()) {
>              cleanupTransport();
>         }
> In a default Options, properties are null, causing the NPE. This code should check for NPE's.
> Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (AXIS2-4656) NPE from ServiceClient in method [public OperationClient createClient]

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4656.
------------------------------------

    Resolution: Invalid

Since the options attribute is initialized at construction time, the only way it could be null is after calling setOptions with a null argument. However, that is forbidden by the Javadoc of that method. Therefore the NPE can only be caused by an invalid usage of ServiceClient.

> NPE from ServiceClient in method [public OperationClient createClient]
> ----------------------------------------------------------------------
>
>                 Key: AXIS2-4656
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4656
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.5.1
>         Environment: Java 5, Windows
>            Reporter: Martin
>            Priority: Minor
>
> Using a default Options instance with a ServiceClient causes a NullPointerException from ServiceClient.createClient(QName operationQName) throws AxisFault.
> The line in question is: 648
>          if (JavaUtils.isTrue(getOptions().getProperty(AUTO_OPERATION_CLEANUP), true) &&
>                  !getOptions().isUseSeparateListener()) {
>              cleanupTransport();
>         }
> In a default Options, properties are null, causing the NPE. This code should check for NPE's.
> Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-4656) NPE from ServiceClient in method [public OperationClient createClient]

Posted by "Nuwan Bandara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12859892#action_12859892 ] 

Nuwan Bandara commented on AXIS2-4656:
--------------------------------------

Hi,

Okey, understood, will look in to it

Regards
/Nuwan

> NPE from ServiceClient in method [public OperationClient createClient]
> ----------------------------------------------------------------------
>
>                 Key: AXIS2-4656
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4656
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.5.1
>         Environment: Java 5, Windows
>            Reporter: Martin
>            Priority: Minor
>
> Using a default Options instance with a ServiceClient causes a NullPointerException from ServiceClient.createClient(QName operationQName) throws AxisFault.
> The line in question is: 648
>          if (JavaUtils.isTrue(getOptions().getProperty(AUTO_OPERATION_CLEANUP), true) &&
>                  !getOptions().isUseSeparateListener()) {
>              cleanupTransport();
>         }
> In a default Options, properties are null, causing the NPE. This code should check for NPE's.
> Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-4656) NPE from ServiceClient in method [public OperationClient createClient]

Posted by "Nuwan Bandara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12859920#action_12859920 ] 

Nuwan Bandara commented on AXIS2-4656:
--------------------------------------

Hi Martin,

If we take a RPCServiceClient (/modules/samples/pojo/src/sample/addressbook/rpcclient/AddressBookRPCClient.java)

You will see once the service client is created, it creates an Options object, (ServiceClient.java:116) so apparently getOptions() cannot be null, but its attributes can be (null check is done for the properties).

If you can point out how you have created the client it will be much helpful (Maybe I have misunderstood your point)

Regards
/Nuwan

> NPE from ServiceClient in method [public OperationClient createClient]
> ----------------------------------------------------------------------
>
>                 Key: AXIS2-4656
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4656
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.5.1
>         Environment: Java 5, Windows
>            Reporter: Martin
>            Priority: Minor
>
> Using a default Options instance with a ServiceClient causes a NullPointerException from ServiceClient.createClient(QName operationQName) throws AxisFault.
> The line in question is: 648
>          if (JavaUtils.isTrue(getOptions().getProperty(AUTO_OPERATION_CLEANUP), true) &&
>                  !getOptions().isUseSeparateListener()) {
>              cleanupTransport();
>         }
> In a default Options, properties are null, causing the NPE. This code should check for NPE's.
> Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-4656) NPE from ServiceClient in method [public OperationClient createClient]

Posted by "Nuwan Bandara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12859920#action_12859920 ] 

Nuwan Bandara commented on AXIS2-4656:
--------------------------------------

Hi Martin,

If we take a RPCServiceClient (/modules/samples/pojo/src/sample/addressbook/rpcclient/AddressBookRPCClient.java)

You will see once the service client is created, it creates an Options object, (ServiceClient.java:116) so apparently getOptions() cannot be null, but its attributes can be (null check is done for the properties).

If you can point out how you have created the client it will be much helpful (Maybe I have misunderstood your point)

Regards
/Nuwan

> NPE from ServiceClient in method [public OperationClient createClient]
> ----------------------------------------------------------------------
>
>                 Key: AXIS2-4656
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4656
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.5.1
>         Environment: Java 5, Windows
>            Reporter: Martin
>            Priority: Minor
>
> Using a default Options instance with a ServiceClient causes a NullPointerException from ServiceClient.createClient(QName operationQName) throws AxisFault.
> The line in question is: 648
>          if (JavaUtils.isTrue(getOptions().getProperty(AUTO_OPERATION_CLEANUP), true) &&
>                  !getOptions().isUseSeparateListener()) {
>              cleanupTransport();
>         }
> In a default Options, properties are null, causing the NPE. This code should check for NPE's.
> Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-4656) NPE from ServiceClient in method [public OperationClient createClient]

Posted by "Nuwan Bandara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12859688#action_12859688 ] 

Nuwan Bandara commented on AXIS2-4656:
--------------------------------------

Hi 

can you explain the scenario, which caused the NPE, more. It seems inside "JavaUtils.isTrue" method a null check is in place.

Regards,
/Nuwan

> NPE from ServiceClient in method [public OperationClient createClient]
> ----------------------------------------------------------------------
>
>                 Key: AXIS2-4656
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4656
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.5.1
>         Environment: Java 5, Windows
>            Reporter: Martin
>            Priority: Minor
>
> Using a default Options instance with a ServiceClient causes a NullPointerException from ServiceClient.createClient(QName operationQName) throws AxisFault.
> The line in question is: 648
>          if (JavaUtils.isTrue(getOptions().getProperty(AUTO_OPERATION_CLEANUP), true) &&
>                  !getOptions().isUseSeparateListener()) {
>              cleanupTransport();
>         }
> In a default Options, properties are null, causing the NPE. This code should check for NPE's.
> Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-4656) NPE from ServiceClient in method [public OperationClient createClient]

Posted by "Nuwan Bandara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12859920#action_12859920 ] 

Nuwan Bandara commented on AXIS2-4656:
--------------------------------------

Hi Martin,

If we take a RPCServiceClient (/modules/samples/pojo/src/sample/addressbook/rpcclient/AddressBookRPCClient.java)

You will see once the service client is created, it creates an Options object, (ServiceClient.java:116) so apparently getOptions() cannot be null, but its attributes can be (null check is done for the properties).

If you can point out how you have created the client it will be much helpful (Maybe I have misunderstood your point)

Regards
/Nuwan

> NPE from ServiceClient in method [public OperationClient createClient]
> ----------------------------------------------------------------------
>
>                 Key: AXIS2-4656
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4656
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.5.1
>         Environment: Java 5, Windows
>            Reporter: Martin
>            Priority: Minor
>
> Using a default Options instance with a ServiceClient causes a NullPointerException from ServiceClient.createClient(QName operationQName) throws AxisFault.
> The line in question is: 648
>          if (JavaUtils.isTrue(getOptions().getProperty(AUTO_OPERATION_CLEANUP), true) &&
>                  !getOptions().isUseSeparateListener()) {
>              cleanupTransport();
>         }
> In a default Options, properties are null, causing the NPE. This code should check for NPE's.
> Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-4656) NPE from ServiceClient in method [public OperationClient createClient]

Posted by "Martin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12859886#action_12859886 ] 

Martin commented on AXIS2-4656:
-------------------------------

My apologies.

I did not word that correctly.

With a default ServiceClient, not having Options set, getOptions() returns null, causing an NPE within the isTrue() clause.

IMO, getOptions() should be checked for null and a more appropriate course of action taken.


Thanks for looking at this!

Martin

> NPE from ServiceClient in method [public OperationClient createClient]
> ----------------------------------------------------------------------
>
>                 Key: AXIS2-4656
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4656
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.5.1
>         Environment: Java 5, Windows
>            Reporter: Martin
>            Priority: Minor
>
> Using a default Options instance with a ServiceClient causes a NullPointerException from ServiceClient.createClient(QName operationQName) throws AxisFault.
> The line in question is: 648
>          if (JavaUtils.isTrue(getOptions().getProperty(AUTO_OPERATION_CLEANUP), true) &&
>                  !getOptions().isUseSeparateListener()) {
>              cleanupTransport();
>         }
> In a default Options, properties are null, causing the NPE. This code should check for NPE's.
> Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-4656) NPE from ServiceClient in method [public OperationClient createClient]

Posted by "Martin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12859886#action_12859886 ] 

Martin commented on AXIS2-4656:
-------------------------------

My apologies.

I did not word that correctly.

With a default ServiceClient, not having Options set, getOptions() returns null, causing an NPE within the isTrue() clause.

IMO, getOptions() should be checked for null and a more appropriate course of action taken.


Thanks for looking at this!

Martin

> NPE from ServiceClient in method [public OperationClient createClient]
> ----------------------------------------------------------------------
>
>                 Key: AXIS2-4656
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4656
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.5.1
>         Environment: Java 5, Windows
>            Reporter: Martin
>            Priority: Minor
>
> Using a default Options instance with a ServiceClient causes a NullPointerException from ServiceClient.createClient(QName operationQName) throws AxisFault.
> The line in question is: 648
>          if (JavaUtils.isTrue(getOptions().getProperty(AUTO_OPERATION_CLEANUP), true) &&
>                  !getOptions().isUseSeparateListener()) {
>              cleanupTransport();
>         }
> In a default Options, properties are null, causing the NPE. This code should check for NPE's.
> Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (AXIS2-4656) NPE from ServiceClient in method [public OperationClient createClient]

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4656.
------------------------------------

    Resolution: Invalid

Since the options attribute is initialized at construction time, the only way it could be null is after calling setOptions with a null argument. However, that is forbidden by the Javadoc of that method. Therefore the NPE can only be caused by an invalid usage of ServiceClient.

> NPE from ServiceClient in method [public OperationClient createClient]
> ----------------------------------------------------------------------
>
>                 Key: AXIS2-4656
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4656
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.5.1
>         Environment: Java 5, Windows
>            Reporter: Martin
>            Priority: Minor
>
> Using a default Options instance with a ServiceClient causes a NullPointerException from ServiceClient.createClient(QName operationQName) throws AxisFault.
> The line in question is: 648
>          if (JavaUtils.isTrue(getOptions().getProperty(AUTO_OPERATION_CLEANUP), true) &&
>                  !getOptions().isUseSeparateListener()) {
>              cleanupTransport();
>         }
> In a default Options, properties are null, causing the NPE. This code should check for NPE's.
> Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-4656) NPE from ServiceClient in method [public OperationClient createClient]

Posted by "Martin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12859886#action_12859886 ] 

Martin commented on AXIS2-4656:
-------------------------------

My apologies.

I did not word that correctly.

With a default ServiceClient, not having Options set, getOptions() returns null, causing an NPE within the isTrue() clause.

IMO, getOptions() should be checked for null and a more appropriate course of action taken.


Thanks for looking at this!

Martin

> NPE from ServiceClient in method [public OperationClient createClient]
> ----------------------------------------------------------------------
>
>                 Key: AXIS2-4656
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4656
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.5.1
>         Environment: Java 5, Windows
>            Reporter: Martin
>            Priority: Minor
>
> Using a default Options instance with a ServiceClient causes a NullPointerException from ServiceClient.createClient(QName operationQName) throws AxisFault.
> The line in question is: 648
>          if (JavaUtils.isTrue(getOptions().getProperty(AUTO_OPERATION_CLEANUP), true) &&
>                  !getOptions().isUseSeparateListener()) {
>              cleanupTransport();
>         }
> In a default Options, properties are null, causing the NPE. This code should check for NPE's.
> Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-4656) NPE from ServiceClient in method [public OperationClient createClient]

Posted by "Nuwan Bandara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12859688#action_12859688 ] 

Nuwan Bandara commented on AXIS2-4656:
--------------------------------------

Hi 

can you explain the scenario, which caused the NPE, more. It seems inside "JavaUtils.isTrue" method a null check is in place.

Regards,
/Nuwan

> NPE from ServiceClient in method [public OperationClient createClient]
> ----------------------------------------------------------------------
>
>                 Key: AXIS2-4656
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4656
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.5.1
>         Environment: Java 5, Windows
>            Reporter: Martin
>            Priority: Minor
>
> Using a default Options instance with a ServiceClient causes a NullPointerException from ServiceClient.createClient(QName operationQName) throws AxisFault.
> The line in question is: 648
>          if (JavaUtils.isTrue(getOptions().getProperty(AUTO_OPERATION_CLEANUP), true) &&
>                  !getOptions().isUseSeparateListener()) {
>              cleanupTransport();
>         }
> In a default Options, properties are null, causing the NPE. This code should check for NPE's.
> Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-4656) NPE from ServiceClient in method [public OperationClient createClient]

Posted by "Nuwan Bandara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12859892#action_12859892 ] 

Nuwan Bandara commented on AXIS2-4656:
--------------------------------------

Hi,

Okey, understood, will look in to it

Regards
/Nuwan

> NPE from ServiceClient in method [public OperationClient createClient]
> ----------------------------------------------------------------------
>
>                 Key: AXIS2-4656
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4656
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.5.1
>         Environment: Java 5, Windows
>            Reporter: Martin
>            Priority: Minor
>
> Using a default Options instance with a ServiceClient causes a NullPointerException from ServiceClient.createClient(QName operationQName) throws AxisFault.
> The line in question is: 648
>          if (JavaUtils.isTrue(getOptions().getProperty(AUTO_OPERATION_CLEANUP), true) &&
>                  !getOptions().isUseSeparateListener()) {
>              cleanupTransport();
>         }
> In a default Options, properties are null, causing the NPE. This code should check for NPE's.
> Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (AXIS2-4656) NPE from ServiceClient in method [public OperationClient createClient]

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4656.
------------------------------------

    Resolution: Invalid

Since the options attribute is initialized at construction time, the only way it could be null is after calling setOptions with a null argument. However, that is forbidden by the Javadoc of that method. Therefore the NPE can only be caused by an invalid usage of ServiceClient.

> NPE from ServiceClient in method [public OperationClient createClient]
> ----------------------------------------------------------------------
>
>                 Key: AXIS2-4656
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4656
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.5.1
>         Environment: Java 5, Windows
>            Reporter: Martin
>            Priority: Minor
>
> Using a default Options instance with a ServiceClient causes a NullPointerException from ServiceClient.createClient(QName operationQName) throws AxisFault.
> The line in question is: 648
>          if (JavaUtils.isTrue(getOptions().getProperty(AUTO_OPERATION_CLEANUP), true) &&
>                  !getOptions().isUseSeparateListener()) {
>              cleanupTransport();
>         }
> In a default Options, properties are null, causing the NPE. This code should check for NPE's.
> Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-4656) NPE from ServiceClient in method [public OperationClient createClient]

Posted by "Nuwan Bandara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12859920#action_12859920 ] 

Nuwan Bandara commented on AXIS2-4656:
--------------------------------------

Hi Martin,

If we take a RPCServiceClient (/modules/samples/pojo/src/sample/addressbook/rpcclient/AddressBookRPCClient.java)

You will see once the service client is created, it creates an Options object, (ServiceClient.java:116) so apparently getOptions() cannot be null, but its attributes can be (null check is done for the properties).

If you can point out how you have created the client it will be much helpful (Maybe I have misunderstood your point)

Regards
/Nuwan

> NPE from ServiceClient in method [public OperationClient createClient]
> ----------------------------------------------------------------------
>
>                 Key: AXIS2-4656
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4656
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.5.1
>         Environment: Java 5, Windows
>            Reporter: Martin
>            Priority: Minor
>
> Using a default Options instance with a ServiceClient causes a NullPointerException from ServiceClient.createClient(QName operationQName) throws AxisFault.
> The line in question is: 648
>          if (JavaUtils.isTrue(getOptions().getProperty(AUTO_OPERATION_CLEANUP), true) &&
>                  !getOptions().isUseSeparateListener()) {
>              cleanupTransport();
>         }
> In a default Options, properties are null, causing the NPE. This code should check for NPE's.
> Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-4656) NPE from ServiceClient in method [public OperationClient createClient]

Posted by "Nuwan Bandara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12859688#action_12859688 ] 

Nuwan Bandara commented on AXIS2-4656:
--------------------------------------

Hi 

can you explain the scenario, which caused the NPE, more. It seems inside "JavaUtils.isTrue" method a null check is in place.

Regards,
/Nuwan

> NPE from ServiceClient in method [public OperationClient createClient]
> ----------------------------------------------------------------------
>
>                 Key: AXIS2-4656
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4656
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.5.1
>         Environment: Java 5, Windows
>            Reporter: Martin
>            Priority: Minor
>
> Using a default Options instance with a ServiceClient causes a NullPointerException from ServiceClient.createClient(QName operationQName) throws AxisFault.
> The line in question is: 648
>          if (JavaUtils.isTrue(getOptions().getProperty(AUTO_OPERATION_CLEANUP), true) &&
>                  !getOptions().isUseSeparateListener()) {
>              cleanupTransport();
>         }
> In a default Options, properties are null, causing the NPE. This code should check for NPE's.
> Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-4656) NPE from ServiceClient in method [public OperationClient createClient]

Posted by "Nuwan Bandara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12859688#action_12859688 ] 

Nuwan Bandara commented on AXIS2-4656:
--------------------------------------

Hi 

can you explain the scenario, which caused the NPE, more. It seems inside "JavaUtils.isTrue" method a null check is in place.

Regards,
/Nuwan

> NPE from ServiceClient in method [public OperationClient createClient]
> ----------------------------------------------------------------------
>
>                 Key: AXIS2-4656
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4656
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.5.1
>         Environment: Java 5, Windows
>            Reporter: Martin
>            Priority: Minor
>
> Using a default Options instance with a ServiceClient causes a NullPointerException from ServiceClient.createClient(QName operationQName) throws AxisFault.
> The line in question is: 648
>          if (JavaUtils.isTrue(getOptions().getProperty(AUTO_OPERATION_CLEANUP), true) &&
>                  !getOptions().isUseSeparateListener()) {
>              cleanupTransport();
>         }
> In a default Options, properties are null, causing the NPE. This code should check for NPE's.
> Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-4656) NPE from ServiceClient in method [public OperationClient createClient]

Posted by "Nuwan Bandara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12859892#action_12859892 ] 

Nuwan Bandara commented on AXIS2-4656:
--------------------------------------

Hi,

Okey, understood, will look in to it

Regards
/Nuwan

> NPE from ServiceClient in method [public OperationClient createClient]
> ----------------------------------------------------------------------
>
>                 Key: AXIS2-4656
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4656
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.5.1
>         Environment: Java 5, Windows
>            Reporter: Martin
>            Priority: Minor
>
> Using a default Options instance with a ServiceClient causes a NullPointerException from ServiceClient.createClient(QName operationQName) throws AxisFault.
> The line in question is: 648
>          if (JavaUtils.isTrue(getOptions().getProperty(AUTO_OPERATION_CLEANUP), true) &&
>                  !getOptions().isUseSeparateListener()) {
>              cleanupTransport();
>         }
> In a default Options, properties are null, causing the NPE. This code should check for NPE's.
> Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-4656) NPE from ServiceClient in method [public OperationClient createClient]

Posted by "Martin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12859886#action_12859886 ] 

Martin commented on AXIS2-4656:
-------------------------------

My apologies.

I did not word that correctly.

With a default ServiceClient, not having Options set, getOptions() returns null, causing an NPE within the isTrue() clause.

IMO, getOptions() should be checked for null and a more appropriate course of action taken.


Thanks for looking at this!

Martin

> NPE from ServiceClient in method [public OperationClient createClient]
> ----------------------------------------------------------------------
>
>                 Key: AXIS2-4656
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4656
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.5.1
>         Environment: Java 5, Windows
>            Reporter: Martin
>            Priority: Minor
>
> Using a default Options instance with a ServiceClient causes a NullPointerException from ServiceClient.createClient(QName operationQName) throws AxisFault.
> The line in question is: 648
>          if (JavaUtils.isTrue(getOptions().getProperty(AUTO_OPERATION_CLEANUP), true) &&
>                  !getOptions().isUseSeparateListener()) {
>              cleanupTransport();
>         }
> In a default Options, properties are null, causing the NPE. This code should check for NPE's.
> Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-4656) NPE from ServiceClient in method [public OperationClient createClient]

Posted by "Nuwan Bandara (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12859920#action_12859920 ] 

Nuwan Bandara commented on AXIS2-4656:
--------------------------------------

Hi Martin,

If we take a RPCServiceClient (/modules/samples/pojo/src/sample/addressbook/rpcclient/AddressBookRPCClient.java)

You will see once the service client is created, it creates an Options object, (ServiceClient.java:116) so apparently getOptions() cannot be null, but its attributes can be (null check is done for the properties).

If you can point out how you have created the client it will be much helpful (Maybe I have misunderstood your point)

Regards
/Nuwan

> NPE from ServiceClient in method [public OperationClient createClient]
> ----------------------------------------------------------------------
>
>                 Key: AXIS2-4656
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4656
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api
>    Affects Versions: 1.5.1
>         Environment: Java 5, Windows
>            Reporter: Martin
>            Priority: Minor
>
> Using a default Options instance with a ServiceClient causes a NullPointerException from ServiceClient.createClient(QName operationQName) throws AxisFault.
> The line in question is: 648
>          if (JavaUtils.isTrue(getOptions().getProperty(AUTO_OPERATION_CLEANUP), true) &&
>                  !getOptions().isUseSeparateListener()) {
>              cleanupTransport();
>         }
> In a default Options, properties are null, causing the NPE. This code should check for NPE's.
> Thanks!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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