Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Username cannot be null" error received when running the 6.1 branch #7

Open
rawlingsj opened this issue May 14, 2014 · 2 comments
Open

Comments

@rawlingsj
Copy link

When running the 6.1 branch I'm seeing the exception below repeatedly...

 12:26:34,398 | ERROR | RetryTimer       | GenericResourceManager           | 131 - org.apache.activemq.activemq-osgi - 5.9.0.redhat-610379 | Failed to create ConnectionAndWrapperNamedXAResource, User name [null] or password is invalid.
javax.transaction.SystemException: Failed to create ConnectionAndWrapperNamedXAResource, User name [null] or password is invalid.
    at org.apache.activemq.jms.pool.GenericResourceManager$Recovery$1.getNamedXAResource(GenericResourceManager.java:161)[131:org.apache.activemq.activemq-osgi:5.9.0.redhat-610379]
    at org.apache.geronimo.transaction.manager.RecoverTask.run(RecoverTask.java:49)[116:org.apache.aries.transaction.manager:1.0.1.redhat-610379]
    at org.apache.geronimo.transaction.manager.ExponentialtIntervalRetryScheduler$TaskWrapper.run(ExponentialtIntervalRetryScheduler.java:50)[116:org.apache.aries.transaction.manager:1.0.1.redhat-610379]
    at java.util.TimerThread.mainLoop(Timer.java:555)[:1.7.0_45]
    at java.util.TimerThread.run(Timer.java:505)[:1.7.0_45]
Caused by: javax.jms.JMSSecurityException: User name [null] or password is invalid.
    at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:52)[131:org.apache.activemq.activemq-osgi:5.9.0.redhat-610379]
    at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1408)[131:org.apache.activemq.activemq-osgi:5.9.0.redhat-610379]
    at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1513)[131:org.apache.activemq.activemq-osgi:5.9.0.redhat-610379]
    at org.apache.activemq.ActiveMQXAConnection.createSession(ActiveMQXAConnection.java:74)[131:org.apache.activemq.activemq-osgi:5.9.0.redhat-610379]
    at org.apache.activemq.ActiveMQXAConnection.createXASession(ActiveMQXAConnection.java:61)[131:org.apache.activemq.activemq-osgi:5.9.0.redhat-610379]
    at org.apache.activemq.jms.pool.GenericResourceManager$Recovery$1.getNamedXAResource(GenericResourceManager.java:155)[131:org.apache.activemq.activemq-osgi:5.9.0.redhat-610379]
    ... 4 more
Caused by: 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_45]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_45]
    at java.lang.Thread.run(Thread.java:744)[:1.7.0_45]
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)[karaf-jaas-boot.jar:]
    at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_45]
    at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_45]
    at javax.security.auth.login.LoginContext.invoke(LoginContext.java:784)[:1.7.0_45]
    at javax.security.auth.login.LoginContext.access$000(LoginContext.java:203)[:1.7.0_45]
    at javax.security.auth.login.LoginContext$4.run(LoginContext.java:698)[:1.7.0_45]
    at javax.security.auth.login.LoginContext$4.run(LoginContext.java:696)[:1.7.0_45]
    at java.security.AccessController.doPrivileged(Native Method)[:1.7.0_45]
    at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:695)[:1.7.0_45]
    at javax.security.auth.login.LoginContext.login(LoginContext.java:594)[:1.7.0_45]
    at org.apache.activemq.security.JaasAuthenticationBroker.addConnection(JaasAuthenticationBroker.java:73)[131:org.apache.activemq.activemq-osgi:5.9.0.redhat-610379]
    ... 13 more

@tamersakr
Copy link

I am experiencing the same issue with 6.1
Failed to create ConnectionAndWrapperNamedXAResource, User name [null] or password is invalid.

@pgfox
Copy link

pgfox commented Jul 10, 2014

I think this can be avoided by adding "userName" and "password" to the resourceManager-AMQ bean

<bean id="resourceManager-AMQ" class="org.apache.activemq.pool.ActiveMQResourceManager" init-method="recoverResource">
    <property name="transactionManager" ref="recoverableTxManager" />
    <!-- CF must be of type ActiveMQConnectionFactory, otherwise no recovery will occur -->
    <property name="connectionFactory" ref="AmqXaCF" />
    <property name="userName" value="admin" />
    <property name="password" value="admin" />
    <property name="resourceName" value="activemq.default" />
  </bean>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants