4 Replies Latest reply on Jul 1, 2008 1:38 PM by afazrihady

    securityManagement not bound

    afazrihady

      Hi,

      I got a NameNotFoundException if I full restart the server, but if I deploy MDBs separately the exception doesn’t occur.

      This starting to happen after I am using JBoss 5.0.0 CR1. I print the stacktrace below.

      Thanks in advance for the help.


      Regards,


      Aldian Fazrihady

      The stack trace:

      20:36:53,531 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}

      20:36:53,578 INFO [SessionFactoryObjectFactory] Bound factory to JNDI name: persistence.units:ear=MBSCustomerAccountDAOEJB.jar.ear,jar=MBSCustomerAccountDAOEJB.jar,unitName=MBS

      20:36:53,578 WARN [SessionFactoryObjectFactory] InitialContext did not implement EventContext

      20:36:53,578 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}

      20:36:53,593 INFO [PersistenceUnitDeployment] Starting persistence unit persistence.units:ear=MBSTwoIntChallengeDAOEJB.jar.ear,jar=MBSTwoIntChallengeDAOEJB.jar,unitName=MBS

      20:36:53,593 WARN [Ejb3Configuration] Persistence provider caller does not implement the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.

      20:36:53,593 INFO [AnnotationBinder] Binding entity from annotated class: com.balicamp.mbs.TwoIntChallenge

      20:36:53,593 INFO [EntityBinder] Bind entity com.balicamp.mbs.TwoIntChallenge on table twointchallenge

      20:36:53,656 ERROR [ExceptionUtil] ConnectionFactoryEndpoint[jboss.messaging.connectionfactory:service=ConnectionFactory] createFailoverConnectionDelegate [y3-g6fnj4if-1-2fvkj4if-tjthy4-159fa]

      java.lang.RuntimeException: javax.naming.NameNotFoundException: securityManagement not bound

      at org.jboss.jms.server.jbosssx.JBossASSecurityMetadataStore.authenticate(JBossASSecurityMetadataStore.java:199)

      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:597)

      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)

      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)

      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)

      at $Proxy93.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:847)

      at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:101)

      at org.jboss.remoting.Client.invoke(Client.java:1685)

      at org.jboss.remoting.Client.invoke(Client.java:589)

      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_25372302.invoke(StateCreationAspect_z_handleCreateConnectionDelegate_25372302.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:401)

      at org.jboss.resource.adapter.jms.inflow.JmsActivation.setup(JmsActivation.java:339)

      at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:692)

      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$Worker.runTask(ThreadPoolExecutor.java:886)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

      at java.lang.Thread.run(Thread.java:619)

      Caused by: javax.naming.NameNotFoundException: securityManagement not bound

      at org.jnp.server.NamingServer.getBinding(NamingServer.java:542)

      at org.jnp.server.NamingServer.getBinding(NamingServer.java:550)

      at org.jnp.server.NamingServer.getObject(NamingServer.java:556)

      at org.jnp.server.NamingServer.lookup(NamingServer.java:296)

      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:669)

      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:629)

      at javax.naming.InitialContext.lookup(InitialContext.java:392)

      at org.jboss.jms.server.jbosssx.JBossASSecurityMetadataStore.lookupSecurityManagement(JBossASSecurityMetadataStore.java:330)

      at org.jboss.jms.server.jbosssx.JBossASSecurityMetadataStore.authenticate(JBossASSecurityMetadataStore.java:195)

      ... 42 more

        • 1. Re: securityManagement not bound
          peterj

          If I understand you correctly, you are saying that if you deploy your MDBs and then start the server, you get errors but if you wait until the server has started before deploying the MDBs, then they deploy just fine. If that is the case, I say "Darn, this is the same as what happened in beta4. Looks like I will have to wait until CR2 for this to be fixed."

          • 2. Re: securityManagement not bound
            afazrihady

            Yes Peter, that's what I meant of my CR1 problem.
            the difference from yours is the problem doesn't occur in my Beta4.
            Howewer, my application still works well regarding the exception.

            Anil Saldhana has propose a solution by adding in messaging-service.xml:



            ....
            CHANGE ME!!
            XMLLoginConfig
            JNDIBasedSecurityManagement


            But the exception still occurs.

            • 3. Re: securityManagement not bound
              afazrihady

              Sorry, forgot to escape the xml of previous post.

              Below is the solution from Anil Saldhana, yet the exception still occurs.

              <mbean code="org.jboss.jms.server.jbosssx.JBossASSecurityMetadataStore"
               name="jboss.messaging:service=SecurityStore">
              
              ....
               <attribute name="SuckerPassword">CHANGE ME!!</attribute>
               <depends>XMLLoginConfig</depends>
               <depends>JNDIBasedSecurityManagement</depends>
               </mbean>


              • 4. Re: securityManagement not bound
                afazrihady

                Anil Saldhana has fixed the problem.
                Add

                <depends>JNDIBasedSecurityRegistration</depends>

                to
                <mbean code="org.jboss.jms.server.jbosssx.JBossASSecurityMetadataStore"
                 name="jboss.messaging:service=SecurityStore">
                

                in deploy/messaging/messaging-service.xml