I have to change the configuration of an already setup jboss 4.0.2 environment. the Topic that was already established, it needed a name change. so i changed it in the places it needed like properties files under /home/jboss-4.0.2/server/myappinstance/conf/ and the main jboss service.xml files which listed the Topic
mytopic-Destination-service.xml
<server>
<!-- event publish destination -->
<mbean code="org.jboss.mq.server.jmx.Topic"
name="jboss.mq.destination:service=Topic,name=myTopic">
<depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
</mbean>
</server>
and myapp-jms-destinations-service.xml ( pretty much the same thing, not sure why it was originally splitted out)
<?xml version="1.0" encoding="UTF-8"?>
<server>
<mbean code="org.jboss.naming.NamingAlias" name="jboss.mq:service=NamingAlias,fromName=issues/incomingEvent">
<attribute name="ToName">topic/myTopic</attribute>
<attribute name="FromName">issues/incomingEvent</attribute>
</mbean>
</server
> the error i get in the jboss log is like:
org.jboss.deployment.DeploymentException: Error during topic setup; - nested throwable: (org.jboss.mq.SpyJMSException: Cannot subscribe to this Destination: ; - nested throwable: (java.lang.NullPointerException))
.........
......
....
Caused by: org.jboss.mq.SpyJMSException: Cannot subscribe to this Destination: ;
- nested throwable: (java.lang.NullPointerException)
at org.jboss.mq.SpyJMSException.getAsJMSException(SpyJMSException.java:66)
at org.jboss.mq.SpyJMSException.rethrowAsJMSException(SpyJMSException.java:51)
at org.jboss.mq.Connection.addConsumer(Connection.java:835)
at org.jboss.mq.SpyConnectionConsumer.<init>(SpyConnectionConsumer.java:95)
at org.jboss.mq.SpyConnection.createDurableConnectionConsumer(SpyConnection.java:156)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContainerInvoker.java:789)
... 140 more Caused by: java.lang.NullPointerException
at org.jboss.mq.sm.AbstractStateManager.setDurableSubscription(AbstractStateManager.java:134)
at org.jboss.mq.server.JMSTopic.addSubscriber(JMSTopic.java:95)
at org.jboss.mq.server.ClientConsumer.addSubscription(ClientConsumer.java:133)
at org.jboss.mq.server.JMSDestinationManager.subscribe(JMSDestinationManager.java:596)
if you notice where it says : org.jboss.mq.SpyJMSException: Cannot subscribe to this Destination: ;
there is a space between 'Destination:' and ';' meaning the name of the destination is null. Now when i use the original name which was LP1 it was fine when i change it to myTopic it gives me this error. I searched on this issue and it seems it is a config issue but i cant seem to pin point where the issue is.
I checked the code the topic name is not hardcoded in the code either. i removed the work and tmp directories as well just to remove any cached configs.