activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sudip <sud...@gmail.com>
Subject Re: activemq username/password config in tomcat jndi
Date Mon, 05 Nov 2007 15:01:33 GMT

using activemq-4.2.snapshot.
 
This is what I have defined in the activemq config file:
  <plugins>
    <simpleAuthenticationPlugin>
        <users>
          <authenticationUser username="system" password="manager" 
groups="users,admins"/>
          <authenticationUser username="user"   password="password"
groups="users"/>
          <authenticationUser username="guest"  password="password"
groups="guests"/>
        </users>
    </simpleAuthenticationPlugin>
  </plugins>


when I do this as you suggested, I get the following exception:

org.springframework.jms.UncategorizedJmsException: Uncategorized exception
occured during JMS processing; nested exception is javax.jms.JMSException:
User name or password is invalid.
Caused by: 
javax.jms.JMSException: User name or password is invalid.
	at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:46)
	at
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1177)
	at
org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1259)
	at
org.apache.activemq.ActiveMQConnection.start(ActiveMQConnection.java:447)
	at
org.springframework.jms.listener.AbstractJmsListeningContainer.startSharedConnection(AbstractJmsListeningContainer.java:358)
	at
org.springframework.jms.listener.AbstractJmsListeningContainer.doStart(AbstractJmsListeningContainer.java:345)
	at
org.springframework.jms.listener.AbstractJmsListeningContainer.initialize(AbstractJmsListeningContainer.java:163)
	at
org.springframework.jms.listener.AbstractJmsListeningContainer.afterPropertiesSet(AbstractJmsListeningContainer.java:133)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1143)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1110)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:431)
	at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:254)
	at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:144)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:251)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:163)
	at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
	at
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:241)
	at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
	at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
	at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
	at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
	at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)
	at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
	at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Caused by: java.lang.SecurityException: User name or password is invalid.
	at
org.apache.activemq.security.SimpleAuthenticationBroker.addConnection(SimpleAuthenticationBroker.java:55)
	at
org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:93)
	at
org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:669)
	at
org.apache.activemq.broker.jmx.ManagedTransportConnection.processAddConnection(ManagedTransportConnection.java:86)
	at
org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:121)
	at
org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:282)
	at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:188)
	at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:65)
	at
org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:133)
	at
org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:121)
	at
org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
	at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:137)
	at java.lang.Thread.run(Thread.java:595)


Mario Siegenthaler-2 wrote:
> 
> Just use the userName (uppercase N) and password property. This
> applies to JNDI as well as spring.
> 
> Example tomcat config:
>     <Resource
>         name="jms/ConnectionFactory"
>         auth="Container"
>         type="org.apache.activemq.ActiveMQConnectionFactory"
>         description="JMS Connection Factory"
>         factory="org.apache.activemq.jndi.JNDIReferenceFactory"
>         brokerURL="tcp://localhost:61616"
> 
>         userName="sudip"
>         password="verySecret"
> 
>         useEmbeddedBroker="false"/>
> 
> 
> Mario
> 
> On 11/2/07, sudip <sudipx@gmail.com> wrote:
>>
>> The activemq server I am using requires username and password for
>> connection.
>> I have setup jndi resource in tomcat for the connectionFactory.  How do I
>> provide these auth parameters via tomcat config files or spring config
>> files?
> 
> 

-- 
View this message in context: http://www.nabble.com/activemq-username-password-config-in-tomcat-jndi-tf4740973s2354.html#a13588463
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message