Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-1965

subscribe method on subscription manager - NullPointerException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Optional Optional
    • jbossws-native-3.0.1
    • jbossws-2.0.1.SP2
    • ws-eventing
    • None
    • Low

      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.

              rhn-support-hbraun Heiko Braun
              asouza_2000 Antonio Souza (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 1 hour
                  1h
                  Remaining:
                  Remaining Estimate - 1 hour
                  1h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified