[jbossws-issues] [JBoss JIRA] Updated: (JBWS-1965) subscribe method on subscription manager - NullPointerException

Heiko Braun (JIRA) jira-events at lists.jboss.org
Fri Feb 22 06:53:42 EST 2008


     [ http://jira.jboss.com/jira/browse/JBWS-1965?page=all ]

Heiko Braun updated JBWS-1965:
------------------------------

    Description: 
The subscribe method raises NullPointerException when trying to subscribe to an event source with the state of 'CREATED'.

This happens when there's no SubscriptionManager endpoint declared. The event source never goes 'STARTED'.
In the subscribe method when trying to get where managerAddress, it returns null raising NullPointerException.
It should have an assertion on the EventSource object, verifying whether or not it is 'STARTED' as below:

org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager

303: if (null == eventSource)
304:         throw new SubscriptionError(EventingConstants.CODE_UNABLE_TO_PROCESS, "EventSource '" + eventSourceNS + "' not registered");

Assertion snippet after 304:
if (eventSource.getState() != STARTED)
      throw new SubscriptionError(EventingConstants.CODE_UNABLE_TO_PROCESS, "EventSource '" + eventSourceNS + "' not started");

or something like that.

The exception happens here:
341: attrURI.setValue(eventSource.getManagerAddress().toString());

eventSource.getManagerAddress returns null raising NullPointerException.



  was:
The subscribe method raises NullPointerException when trying to subscribe to an event source with the state of 'CREATED'.

This happens because there's no SubscriptionManager endpoint declared. The event source never goes 'STARTED'.
In the subscribe method when trying to get where managerAddress, it returns null raising NullPointerException.
It should have an assertion on the EventSource object, verifying whether or not it is 'STARTED' as below:

org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager

303: if (null == eventSource)
304:         throw new SubscriptionError(EventingConstants.CODE_UNABLE_TO_PROCESS, "EventSource '" + eventSourceNS + "' not registered");

Assertion snippet after 304:
if (eventSource.getState() != STARTED)
      throw new SubscriptionError(EventingConstants.CODE_UNABLE_TO_PROCESS, "EventSource '" + eventSourceNS + "' not started");

or something like that.

The exception happens here:
341: attrURI.setValue(eventSource.getManagerAddress().toString());

eventSource.getManagerAddress returns null raising NullPointerException.




> subscribe method on subscription manager - NullPointerException
> ---------------------------------------------------------------
>
>                 Key: JBWS-1965
>                 URL: http://jira.jboss.com/jira/browse/JBWS-1965
>             Project: JBoss Web Services
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: ws-eventing
>    Affects Versions: jbossws-2.0.1.SP2
>         Environment: JBoss 4.2.2 / JDK 1.5_14 / Windows XP MCE / JBossWS 2.0.1-SP2
>            Reporter: Antonio Souza
>         Assigned To: Heiko Braun
>            Priority: Optional
>             Fix For: jbossws-native-2.0.4
>
>   Original Estimate: 1 hour
>  Remaining Estimate: 1 hour
>
> The subscribe method raises NullPointerException when trying to subscribe to an event source with the state of 'CREATED'.
> This happens when there's no SubscriptionManager endpoint declared. The event source never goes 'STARTED'.
> In the subscribe method when trying to get where managerAddress, it returns null raising NullPointerException.
> It should have an assertion on the EventSource object, verifying whether or not it is 'STARTED' as below:
> org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager
> 303: if (null == eventSource)
> 304:         throw new SubscriptionError(EventingConstants.CODE_UNABLE_TO_PROCESS, "EventSource '" + eventSourceNS + "' not registered");
> Assertion snippet after 304:
> if (eventSource.getState() != STARTED)
>       throw new SubscriptionError(EventingConstants.CODE_UNABLE_TO_PROCESS, "EventSource '" + eventSourceNS + "' not started");
> or something like that.
> The exception happens here:
> 341: attrURI.setValue(eventSource.getManagerAddress().toString());
> eventSource.getManagerAddress returns null raising NullPointerException.

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

        



More information about the jbossws-issues mailing list