-
Bug
-
Resolution: Done
-
Major
-
JBoss A-MQ 6.1
-
None
-
4
I get a strange authentication failure on JBoss Fuse 6.1 (jboss-fuse-6.1.0.redhat-379) even if the userName & password are defined in the bean of the ActiveMQ Camel component
2014-05-06 17:08:20,425 | WARN | JmsConsumer[in] | faultJmsMessageListenerContainer | ? ? | 184 - org.apache.servicemix.bundles.spring-jms - 3.2.8.RELEASE_1 | Setup of JMS message listener invoker failed for destination 'in' - trying to recover. Cause: User name [null] or password is invalid. 2014-05-06 17:08:20,426 | INFO | JmsConsumer[in] | TransportConnector | ? ? | 131 - org.apache.activemq.activemq-osgi - 5.9.0.redhat-610379 | Connector vm://amq started 2014-05-06 17:08:20,428 | INFO | JmsConsumer[in] | TransportConnector | ? ? | 131 - org.apache.activemq.activemq-osgi - 5.9.0.redhat-610379 | Connector vm://amq stopped 2014-05-06 17:08:20,429 | INFO | JmsConsumer[in] | faultJmsMessageListenerContainer | ? ? | 184 - org.apache.servicemix.bundles.spring-jms - 3.2.8.RELEASE_1 | Successfully refreshed JMS Connection 2014-05-06 17:08:20,429 | INFO | JmsConsumer[in] | TransportConnector | ? ? | 131 - org.apache.activemq.activemq-osgi - 5.9.0.redhat-610379 | Connector vm://amq started 2014-05-06 17:08:20,433 | WARN | : vm://amq#247-1 | TransportConnection | ? ? | 131 - org.apache.activemq.activemq-osgi - 5.9.0.redhat-610379 | Failed to add Connection ID:Dabou.local-55791-1399388370885-3:124 java.lang.SecurityException: User name [null] or password is invalid. at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:80)[131:org.apache.activemq.activemq-osgi:5.9.0.redhat-610379] at org.apache.activemq.broker.MutableBrokerFilter.addConnection(MutableBrokerFilter.java:97)[131:org.apache.activemq.activemq-osgi:5.9.0.redhat-610379] at org.apache.activemq.broker.TransportConnection.processAddConnection(TransportConnection.java:764)[131:org.apache.activemq.activemq-osgi:5.9.0.redhat-610379] at org.apache.activemq.command.ConnectionInfo.visit(ConnectionInfo.java:139)[131:org.apache.activemq.activemq-osgi:5.9.0.redhat-610379] at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:294)[131:org.apache.activemq.activemq-osgi:5.9.0.redhat-610379] at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:148)[131:org.apache.activemq.activemq-osgi:5.9.0.redhat-610379] at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:116)[131:org.apache.activemq.activemq-osgi:5.9.0.redhat-610379] at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)[131:org.apache.activemq.activemq-osgi:5.9.0.redhat-610379] at org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:242)[131:org.apache.activemq.activemq-osgi:5.9.0.redhat-610379] at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:133)[131:org.apache.activemq.activemq-osgi:5.9.0.redhat-610379] at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48)[131:org.apache.activemq.activemq-osgi:5.9.0.redhat-610379] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_51] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_51] at java.lang.Thread.run(Thread.java:744)[:1.7.0_51] Caused by: javax.security.auth.login.LoginException: Username can not be null at org.apache.karaf.jaas.modules.properties.PropertiesLoginModule.login(PropertiesLoginModule.java:93) at org.apache.karaf.jaas.boot.ProxyLoginModule.login(ProxyLoginModule.java:83) at sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at javax.security.auth.login.LoginContext.invoke(LoginContext.java:762)[:1.7.0_51] at javax.security.auth.login.LoginContext.access$000(LoginContext.java:203)[:1.7.0_51] at javax.security.auth.login.LoginContext$4.run(LoginContext.java:690)[:1.7.0_51] at javax.security.auth.login.LoginContext$4.run(LoginContext.java:688)[:1.7.0_51] at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:687)[:1.7.0_51] at javax.security.auth.login.LoginContext.login(LoginContext.java:595)[:1.7.0_51] at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:73)[131:org.apache.activemq.activemq-osgi:5.9.0.redhat-610379] ... 13 more
Camel config
<!-- ActiveMQ component --> <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent"> <property name="connectionFactory"> <osgi:reference interface="javax.jms.ConnectionFactory"/> </property> <property name="userName" value="admin"/> <property name="password" value="admin"/> <property name="transacted" value="true"/> <property name="transactionManager"> <osgi:reference interface="org.springframework.transaction.PlatformTransactionManager"/> </property> </bean>
The user is well defined in karaf realm -->
JBossFuse:karaf@root> jaas:manage --realm karaf --index 1 JBossFuse:karaf@root> jaas:users User Name Role admin admin