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

Antonio Souza (JIRA) jira-events at lists.jboss.org
Wed Jan 23 15:23:21 EST 2008


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


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.



-- 
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