Bug 915369

Summary: Failed to start service jboss.messaging.default.jms.manager: org.jboss.msc.service.StartException in service jboss.messaging.default.jms.manager: java.lang.NullPointerException
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Dmytro Pogrebniuk <dpogrebn>
Component: JMSAssignee: baranowb <bbaranow>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1.0CC: bbaranow, brian.stansberry, mnovak, pslavice
Target Milestone: ER4   
Target Release: EAP 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dmytro Pogrebniuk 2013-02-25 15:32:56 UTC
Description of problem:
NullPointerException in JMSService.start which caused by referring to non-registered connector.

Version-Release number of selected component (if applicable):
2.3.0.CR1

Steps to Reproduce:
<connectors>
      <netty-connector name="netty" socket-binding="messaging"/>
      <netty-connector name="netty-throughput" socket-binding="messaging-throughput">
           <param key="batch-delay" value="50"/>
      </netty-connector>
<!--
      <netty-connector name="connector-to-proxy-directing-to-this-server" socket-binding="binding-connect-to-this-server-through-remote-proxy"/>
-->
      <in-vm-connector name="in-vm" server-id="0"/>
</connectors>

<broadcast-groups>
          <broadcast-group name="bg-group1">
          <socket-binding>messaging-group</socket-binding>
          <broadcast-period>2000</broadcast-period>
          <connector-ref>
             connector-to-proxy-directing-to-this-server
          </connector-ref>
      </broadcast-group>
</broadcast-groups>

Additional info:
15:56:47,200 WARN  [org.hornetq.core.server] (MSC service thread 1-5) HQ222185: There is no connector deployed with name {0}. The broadcast group with name {1} will not be deployed.
15:56:47,201 ERROR [org.hornetq.core.server] (MSC service thread 1-5) HQ224002: Failure in initialisation: java.lang.NullPointerException
	at org.hornetq.core.server.management.impl.ManagementServiceImpl.registerBroadcastGroup(ManagementServiceImpl.java:346) [hornetq-server-2.3.0.CR1.jar:]
	at org.hornetq.core.server.cluster.ClusterManager.deployBroadcastGroup(ClusterManager.java:815) [hornetq-server-2.3.0.CR1.jar:]
	at org.hornetq.core.server.cluster.ClusterManager.deploy(ClusterManager.java:225) [hornetq-server-2.3.0.CR1.jar:]
	at org.hornetq.core.server.impl.HornetQServerImpl.initialisePart1(HornetQServerImpl.java:1414) [hornetq-server-2.3.0.CR1.jar:]
	at org.hornetq.core.server.impl.HornetQServerImpl.access$1000(HornetQServerImpl.java:164) [hornetq-server-2.3.0.CR1.jar:]
	at org.hornetq.core.server.impl.HornetQServerImpl$SharedNothingLiveActivation.run(HornetQServerImpl.java:2496) [hornetq-server-2.3.0.CR1.jar:]
	at org.hornetq.core.server.impl.HornetQServerImpl.start(HornetQServerImpl.java:416) [hornetq-server-2.3.0.CR1.jar:]
	at org.hornetq.jms.server.impl.JMSServerManagerImpl.start(JMSServerManagerImpl.java:464) [hornetq-jms-server-2.3.0.CR1.jar:]
	at org.jboss.as.messaging.jms.JMSService.start(JMSService.java:74) [jboss-as-messaging-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_38]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_38]
	at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_38]

15:56:47,205 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.messaging.default.jms.manager: org.jboss.msc.service.StartException in service jboss.messaging.default.jms.manager: java.lang.NullPointerException
	at org.jboss.as.messaging.jms.JMSService.start(JMSService.java:97)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_38]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_38]
	at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_38]
Caused by: java.lang.NullPointerException
	at org.jboss.as.messaging.jms.JMSService.start(JMSService.java:78)
	... 5 more

Comment 2 JBoss JIRA Server 2013-03-07 18:54:23 UTC
Jeff Mesnil <jmesnil> made a comment on jira AS7-6683

We could provide a cleaner failure in AS7 integration code in the BroadcastGroupAdd operation.

In the method addBroadcastGroupConfigs(context, configuration, model), we can check that the HornetQ's configuration object contains the connector that are referenced by the broadcast-group's model. If that's not the case, we can report the error to the user with a meaningful explanation.

Comment 3 JBoss JIRA Server 2013-03-08 07:24:51 UTC
Bartosz Baranowski <bbaranow> made a comment on jira AS7-6683

Ok, got it, missed this class.

Comment 4 JBoss JIRA Server 2013-03-11 11:45:50 UTC
Bartosz Baranowski <bbaranow> updated the status of jira AS7-6683 to Coding In Progress

Comment 5 baranowb 2013-03-12 15:35:35 UTC
PR for private git repo: https://github.com/jbossas/jboss-eap/pull/46

Comment 7 JBoss JIRA Server 2013-03-27 08:19:44 UTC
Jeff Mesnil <jmesnil> made a comment on jira AS7-6683

PR merged in master branch