3 Replies Latest reply on Aug 31, 2009 5:50 PM by Carlo de Wolf

    JSMSecurityException on my queue (EJB 3)

    Andrig Miller Novice

      I am trying to deploy an EJB 3 application with one MDB, and I am getting the following exception on the queue that I have defined for it, in destinations-service.xml. This is with JBM 1.4.1 CR1 in AS 5 CR2, and I'm struggling to figure out what I have wrong in the configuration for this. I have looked over the documentation, and everything I try either makes it worse, or does nothing. Any help is greatly appreciated.

      2008-10-17 16:02:44,724 ERROR [org.jboss.resource.adapter.jms.inflow.JmsActivation] (WorkManager(2)-2) Unable to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@5079a5ea(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@7d127169 destination=queue/replenish destinationType=javax.jms.Queue tx=true durable=false reconnect=10 provider=java:/DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5)
      javax.jms.JMSSecurityException: User null is NOT authenticated
      at org.jboss.jms.server.jbosssx.JBossASSecurityMetadataStore.authenticate(JBossASSecurityMetadataStore.java:221)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:111)
      at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:45)
      at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:226)
      at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
      at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:251)
      at javax.management.StandardMBean.invoke(StandardMBean.java:405)
      at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy161.authenticate(Unknown Source)
      at org.jboss.jms.server.endpoint.ServerConnectionFactoryEndpoint.createConnectionDelegateInternal(ServerConnectionFactoryEndpoint.java:225)
      at org.jboss.jms.server.endpoint.ServerConnectionFactoryEndpoint.createConnectionDelegate(ServerConnectionFactoryEndpoint.java:165)
      at org.jboss.jms.server.endpoint.advised.ConnectionFactoryAdvised.org$jboss$jms$server$endpoint$advised$ConnectionFactoryAdvised$createConnectionDelegate$aop(ConnectionFactoryAdvised.java:108)
      at org.jboss.jms.server.endpoint.advised.ConnectionFactoryAdvised.createConnectionDelegate(ConnectionFactoryAdvised.java)
      at org.jboss.jms.wireformat.ConnectionFactoryCreateConnectionDelegateRequest.serverInvoke(ConnectionFactoryCreateConnectionDelegateRequest.java:91)
      at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:143)
      at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:908)
      at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106)
      at org.jboss.remoting.Client.invoke(Client.java:1708)
      at org.jboss.remoting.Client.invoke(Client.java:612)
      at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$createConnectionDelegate$aop(ClientConnectionFactoryDelegate.java:167)
      at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeTarget(ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.java)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
      at org.jboss.jms.client.container.StateCreationAspect.handleCreateConnectionDelegate(StateCreationAspect.java:81)
      at org.jboss.aop.advice.org.jboss.jms.client.container.StateCreationAspect_z_handleCreateConnectionDelegate_467358408.invoke(StateCreationAspect_z_handleCreateConnectionDelegate_467358408.java)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.createConnectionDelegate(ClientConnectionFactoryDelegate.java)
      at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:205)
      at org.jboss.jms.client.JBossConnectionFactory.createQueueConnection(JBossConnectionFactory.java:101)
      at org.jboss.jms.client.JBossConnectionFactory.createQueueConnection(JBossConnectionFactory.java:95)
      at org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler.setupDLQConnection(AbstractDLQHandler.java:137)
      at org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler.setup(AbstractDLQHandler.java:83)
      at org.jboss.resource.adapter.jms.inflow.dlq.JBossMQDLQHandler.setup(JBossMQDLQHandler.java:48)
      at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupDLQ(JmsActivation.java:413)
      at org.jboss.resource.adapter.jms.inflow.JmsActivation.setup(JmsActivation.java:351)
      at org.jboss.resource.adapter.jms.inflow.JmsActivation.handleFailure(JmsActivation.java:292)
      at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:733)
      at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
      at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:636)

        • 1. Re: JSMSecurityException on my queue (EJB 3)
          Justin Bertram Master

          The message, "User null is NOT authenticated," typically indicates a problem with your authentication datasource - either the authentication datasource (specified in <JBOSS_HOME>/server//conf/login-config.xml - application-policy "messaging") is different from JBM's datasource (specified in <JBOSS_HOME>/server//deploy/jboss-messaging.sar/*-persistence-service.xml) or the table JMS_USER doesn't exist or the row in the table whose USER_ID is "guest" doesn't exist.

          Can you check those things?

          I hope that makes sense :)

          • 2. Re: JSMSecurityException on my queue (EJB 3)
            Andrig Miller Novice

            Actually there is no SAR file anymore with JBM 1.4.1CR1 in AS 5, but in looking for what you were talking about I ran across one configuration file where I missed changing the DefaultDS to my own data source, MySQLDS, and that was in messaging-jboss-beans.xml which is in server//deploy/messaging.

            Once I fixed that one attribute (happened to be security, and pointed at the correct data source, everything deployed and started just fine.

            Thanks for pointing me in the right direction. By the way, the documentation for 1.4.1, is still at the beta level, and the configuration files have been completely changed in the CR, which makes it difficult to figure out what is where.

            Thanks for the help.

            • 3. Re: JSMSecurityException on my queue (EJB 3)
              Carlo de Wolf Master

              Alternatively enable tracing on org.jboss.security and get the real exception.

              catch(LoginException e)
               {
               // Don't log anonymous user failures unless trace level logging is on
               if( principal != null && principal.getName() != null || trace )
               log.trace("Login failure", e);
               authException = e;
               }