#Jboss #Artemis AMQ153005: Unable to retrieve ${0} from JNDI. Creating a new ${1} named ${2} to be used by the MDB

By | December 17, 2019

This is a strange annoying warning that suddenly appeared after I upgraded to JBoss 7.4.2 and was completly flooding my output log. It looks like an warning due to a bad configuration that until version 7.4.2 was ignored.

My log looked something like this:

...
2019-12-17 12:46:33,305 WARN  [org.apache.activemq.artemis.ra] (default-threads - 7) AMQ153005: Unable to retrieve ${0} from JNDI. Creating a new ${1} named ${2} to be used by the MDB
2019-12-17 12:46:33,315 WARN  [org.apache.activemq.artemis.ra] (default-threads - 7) AMQ153005: Unable to retrieve ${0} from JNDI. Creating a new ${1} named ${2} to be used by the MDB
2019-12-17 12:46:33,325 WARN  [org.apache.activemq.artemis.ra] (default-threads - 7) AMQ153005: Unable to retrieve ${0} from JNDI. Creating a new ${1} named ${2} to be used by the MDB
...

Of course the fact that somehow the warning message seems to be using some unset variables in the message is making it completely useless.

To try to get something useful I had to increase the log level for the package reporting the error “org.apache.activemq.artemis.ra”

To increase the log level to a package simply add to the standalone.xml configuration file under the tag:

 <subsystem xmlns="urn:jboss:domain:logging:6.0">

a logger entry:

  <logger category="org.apache.activemq.artemis.ra">
     <level name="DEBUG"/>
  </logger>

The above will ensure that the logger for package “org.apache.activemq.artemis.ra” will show all the DEBUG, INFO, WARNING, ERROR level messages.

After a restart of Jboss the error messages changed to:

2019-12-17 12:50:12,152 INFO  [org.apache.activemq.artemis.ra] (default-threads - 3) AMQ151001: Attempting to reconnect org.apache.activemq.artemis.ra.inflow.ActiveMQActivationSpec(ra=org.wildfly.extension.messaging.activemq.ActiveMQResou
rceAdapter@798f9ea7 destination=java:/queue/glInput destinationType=javax.jms.Queue ack=Auto-acknowledge durable=false clientID=null user=null maxSession=15)
2019-12-17 12:50:12,152 INFO  [org.apache.activemq.artemis.ra] (default-threads - 8) AMQ151001: Attempting to reconnect org.apache.activemq.artemis.ra.inflow.ActiveMQActivationSpec(ra=org.wildfly.extension.messaging.activemq.ActiveMQResou
rceAdapter@798f9ea7 destination=java:/queue/poInput destinationType=javax.jms.Queue ack=Auto-acknowledge durable=false clientID=null user=null maxSession=15)
2019-12-17 12:50:12,153 WARN  [org.apache.activemq.artemis.ra] (default-threads - 3) AMQ153005: Unable to retrieve ${0} from JNDI. Creating a new ${1} named ${2} to be used by the MDB.
2019-12-17 12:50:12,153 WARN  [org.apache.activemq.artemis.ra] (default-threads - 8) AMQ153005: Unable to retrieve ${0} from JNDI. Creating a new ${1} named ${2} to be used by the MDB.

OK, so now we get some extra information. We can see that the warning seems to be the related to another issue:

AMQ151001: Attempting to reconnect org.apache.activemq.artemis.ra.inflow.ActiveMQActivationSpec(ra=org.wildfly.extension.messaging.activemq.ActiveMQResou
rceAdapter@798f9ea7 destination=java:/queue/glInput

The above error informs us that the resource adapter “ActiveMQResou
rceAdapter” tries to bind to a queue “java:/queue/glInput” and also to a queue “java:/queue/poInput” which do not exists.

By looking at the declared queues in standalone.xml I could clearly see there was no “java:/queue/glInput” or “java:/queue/poInput” queue. In fact I remembered that they were removed because the EJBs that referred to them were removed from the code base.

Then I started to look into the ejb-jar.xml file used by my application deployed on JBoss. There I found two old activation specifications referring to the queues from the warning message, activations that were causing the problem.

By removing the outdated activation specification entries from ejb-jar.xml file the warning message disappeared.

Advertisements

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.