activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fbcyborg <>
Subject Help configuring ActiveMQ as JMSProvider in WebSphere
Date Thu, 01 Nov 2012 18:01:09 GMT

I am running ActiveMQ 5.7.0 on Linux and I created a Queue named
"jms/systemMessageQueue" through the web interface.
Since I am developing J2EE applications I use IBM Websphere (6.1 or 7) to
deploy my Servlets.

I wrote a Servlet that fails after this line:

Queue queue = (Queue) jndiContext.lookup("jms/systemMessageQueue");

This is the exception: Exception
occurred while the JNDI NamingManager was processing a
javax.naming.Reference object. [Root exception is
javax.naming.NoInitialContextException: Failed to create InitialContext
using factory specified in hashtable
java.naming.queue=jms/systemMessageQueue} [Root exception is
java.lang.StringIndexOutOfBoundsException: String index out of range: 18]]

I don't understand why it says "String index out of range: 18". 

This is the configuration I use on WAS:

Resources->JMS->JMS Providers:
        Name: ActiveMQ
        External initial context factory:
        External provider URL: tcp://localhost:61616
        Custom Properties: 
                Name: java.naming.connectionFactoryNames; Value:
                Name: java.naming.queue; Value: jms/systemMessageQueue
Resources->JMS->Queue Connection Factories:
        Name: Queue Connection Factory
        JNDI Name: jms/QueueConnectionFactory
        External JNDI Name: jms/QueueConnectionFactory
        Provider: ActiveMQ
        Name: System Message Queue
        JNDI Name: jms/systemMessageQueue
        External JNDI Name: jms/systemMessageQueue
        Provider: ActiveMQ

The directory /opt/IBM/WebSphere/AppServer/lib/ext/ contains the following
jar files:
- activeio-core-3.1.4.jar
- activemq-core-5.7.0.jar

I don't know if there is something wrong within the configuration or not,
but I think so.
Could somebody help me to solve this problem when trying to connect to the

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message