You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2019/08/03 15:19:11 UTC

[GitHub] [activemq-artemis] Premik opened a new pull request #2783: Treat empty providerUrl string same way as null value.

Premik opened a new pull request #2783: Treat empty providerUrl string same way as null value.
URL: https://github.com/apache/activemq-artemis/pull/2783
 
 
   The toolking I'm using somehow always sets `java.naming.provider.url` to an empty string by default. I couldn't find a way to set it to `null`. I wanted to use the client-side JNDI but instead I was getting this exception:
   ```
   java.lang.NullPointerException
   	at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:947)
   	at org.apache.activemq.artemis.utils.uri.URIFactory.newObject(URIFactory.java:63)
   	at org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory.createConnectionFactory(ActiveMQInitialContextFactory.java:185)
   	at org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory.getInitialContext(ActiveMQInitialContextFactory.java:65)
   	at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:695)
   	at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:324)
   	at javax.naming.InitialContext.init(InitialContext.java:255)
   	at javax.naming.InitialContext.<init>(InitialContext.java:227)
   	at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:112)
   	at com.ibm.broker.jmsclienthelper.JMSClientHelper.setInitialContext(JMSClientHelper.java:851)
   	at com.ibm.broker.jmsclienthelper.JMSClientRequestResponseHelper.setupJMSRequest(JMSClientRequestResponseHelper.java:939)
   	at com.ibm.broker.jmsclientnodes.JMSClientOutputNode.evaluate(JMSClientOutputNode.java:483)
   	at com.ibm.broker.plugin.MbNode.evaluate(MbNode.java:1453)
   
   javax.naming.NamingException: Invalid broker URL
   	at org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory.getInitialContext(ActiveMQInitialContextFactory.java:73)
   	at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:695)
   	at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:324)
   	at javax.naming.InitialContext.init(InitialContext.java:255)
   	at javax.naming.InitialContext.<init>(InitialContext.java:227)
   	at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:112)
   	at com.ibm.broker.jmsclienthelper.JMSClientHelper.setInitialContext(JMSClientHelper.java:851)
   	at com.ibm.broker.jmsclienthelper.JMSClientRequestResponseHelper.setupJMSRequest(JMSClientRequestResponseHelper.java:939)
   	at com.ibm.broker.jmsclientnodes.JMSClientOutputNode.evaluate(JMSClientOutputNode.java:483)
   	at com.ibm.broker.plugin.MbNode.evaluate(MbNode.java:1453)
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services