8 Replies Latest reply on Jul 1, 2003 4:45 PM by kutter

    Security Problem: Running JBoss with MDB from Eclipse

    aheinz

      Hi all

      I have a problem running JBoss with a simple test MDB from within Eclipse. My bean is using some of the predefined test queues (queue/B).

      If I run JBoss standalone everything works ok and my bean is deployed properly.

      Here is the corresponding extract:

      10:56:27,435 INFO [MainDeployer] Starting deployment of package: file:/D:/jboss/server/default/deploy/test4.jar
      10:56:27,926 INFO [EjbModule] Creating
      10:56:28,116 INFO [EjbModule] Deploying StatelessSessionBean
      10:56:28,126 INFO [EjbModule] Deploying Message
      10:56:28,156 INFO [StatelessSessionContainer] Creating
      10:56:28,166 INFO [StatelessSessionInstancePool] Creating
      10:56:28,166 INFO [StatelessSessionInstancePool] Created
      10:56:28,166 INFO [StatelessSessionContainer] Created
      10:56:28,166 INFO [MessageDrivenContainer] Creating
      10:56:28,166 INFO [MessageDrivenInstancePool] Creating
      10:56:28,166 INFO [MessageDrivenInstancePool] Created
      10:56:28,166 INFO [JMSContainerInvoker] Creating
      10:56:28,176 INFO [JMSContainerInvoker] Created
      10:56:28,176 INFO [MessageDrivenContainer] Created
      10:56:28,176 INFO [EjbModule] Created
      10:56:28,176 INFO [EjbModule] Starting
      10:56:28,176 INFO [StatelessSessionContainer] Starting
      10:56:28,206 INFO [StatelessSessionInstancePool] Starting
      10:56:28,206 INFO [StatelessSessionInstancePool] Started
      10:56:28,206 INFO [StatelessSessionContainer] Started
      10:56:28,206 INFO [MessageDrivenContainer] Starting
      10:56:28,206 INFO [JMSContainerInvoker] Starting
      10:56:28,216 INFO [DLQHandler] Creating
      10:56:28,236 DEBUG [Connection] Setting the clockDaemon's thread factory
      10:56:28,256 DEBUG [GenericConnectionFactory] Handing out ClientIL: org.jboss.mq.il.jvm.JVMClientILService
      10:56:28,266 DEBUG [SpyDestinationObjectFactory] SpyDestinationObjectFactory->getObjectInstance()
      10:56:28,266 INFO [DLQHandler] Created
      10:56:28,276 DEBUG [GenericConnectionFactory] Handing out ClientIL: org.jboss.mq.il.jvm.JVMClientILService
      10:56:28,276 DEBUG [SpyDestinationObjectFactory] SpyDestinationObjectFactory->getObjectInstance()
      10:56:28,336 WARN [SecurityManager] No SecurityMetadadata was available for B adding default security conf
      10:56:28,346 INFO [DLQHandler] Starting
      10:56:28,346 INFO [DLQHandler] Started
      10:56:28,346 INFO [JMSContainerInvoker] Started
      10:56:28,346 INFO [MessageDrivenInstancePool] Starting
      10:56:28,346 INFO [MessageDrivenInstancePool] Started
      10:56:28,346 INFO [MessageDrivenContainer] Started
      10:56:28,346 INFO [EjbModule] Started
      10:56:28,346 INFO [EJBDeployer] Deployed: file:/D:/jboss/server/default/deploy/test4.jar
      10:56:28,367 INFO [MainDeployer] Deployed package: file:/D:/jboss/server/default/deploy/test4.jar


      However if I do the same from within Eclipse I get some JMSSecurityExceptions regarding a null user not being authenticated.

      Here is the corresponding extract:

      10:50:53,144 INFO [MainDeployer] Starting deployment of package: file:/D:/jboss/server/default/deploy/test4.jar
      10:50:53,345 INFO [EjbModule] Creating
      10:50:53,355 INFO [EjbModule] Deploying StatelessSessionBean
      10:50:53,365 INFO [EjbModule] Deploying Message
      10:50:53,395 INFO [StatelessSessionContainer] Creating
      10:50:53,405 INFO [StatelessSessionInstancePool] Creating
      10:50:53,405 INFO [StatelessSessionInstancePool] Created
      10:50:53,405 INFO [StatelessSessionContainer] Created
      10:50:53,405 INFO [MessageDrivenContainer] Creating
      10:50:53,405 INFO [MessageDrivenInstancePool] Creating
      10:50:53,405 INFO [MessageDrivenInstancePool] Created
      10:50:53,405 INFO [JMSContainerInvoker] Creating
      10:50:53,415 INFO [JMSContainerInvoker] Created
      10:50:53,415 INFO [MessageDrivenContainer] Created
      10:50:53,415 INFO [EjbModule] Created
      10:50:53,415 INFO [EjbModule] Starting
      10:50:53,415 INFO [StatelessSessionContainer] Starting
      10:50:53,455 INFO [StatelessSessionInstancePool] Starting
      10:50:53,455 INFO [StatelessSessionInstancePool] Started
      10:50:53,455 INFO [StatelessSessionContainer] Started
      10:50:53,455 INFO [MessageDrivenContainer] Starting
      10:50:53,465 INFO [JMSContainerInvoker] Starting
      10:50:53,465 INFO [DLQHandler] Creating
      10:50:53,485 DEBUG [Connection] Setting the clockDaemon's thread factory
      10:50:53,515 ERROR [DLQHandler] Initialization failed
      javax.jms.JMSSecurityException: User: null is NOT authenticated
      at org.jboss.mq.security.SecurityManager.authenticate(SecurityManager.java:181)
      at org.jboss.mq.security.ServerSecurityInterceptor.authenticate(ServerSecurityInterceptor.java:51)
      at org.jboss.mq.server.TracingInterceptor.authenticate(TracingInterceptor.java:650)
      at org.jboss.mq.server.JMSServerInvoker.authenticate(JMSServerInvoker.java:288)
      at org.jboss.mq.il.jvm.JVMServerIL.authenticate(JVMServerIL.java:302)
      at org.jboss.mq.Connection.authenticate(Connection.java:876)
      at org.jboss.mq.Connection.(Connection.java:238)
      at org.jboss.mq.Connection.(Connection.java:315)
      at org.jboss.mq.SpyConnection.(SpyConnection.java:59)
      at org.jboss.mq.SpyConnectionFactory.createQueueConnection(SpyConnectionFactory.java:116)
      at org.jboss.ejb.plugins.jms.DLQHandler.createService(DLQHandler.java:140)
      at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:158)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContainerInvoker.java:394)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:579)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      at org.jboss.ejb.MessageDrivenContainer.startService(MessageDrivenContainer.java:220)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
      at $Proxy11.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:392)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy30.start(Unknown Source)
      at org.jboss.ejb.EjbModule.startService(EjbModule.java:329)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
      at $Proxy11.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:392)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy20.start(Unknown Source)
      at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:540)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:200)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:273)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:392)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy5.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:597)
      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:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy6.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:365)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:272)
      at org.jboss.Main.boot(Main.java:150)
      at org.jboss.Main$1.run(Main.java:388)
      at java.lang.Thread.run(Thread.java:536)
      10:50:53,525 INFO [JMSContainerInvoker] Started
      10:50:53,525 INFO [MessageDrivenInstancePool] Starting
      10:50:53,525 INFO [MessageDrivenInstancePool] Started
      10:50:53,525 INFO [MessageDrivenContainer] Started
      10:50:53,525 INFO [EjbModule] Started
      10:50:53,525 INFO [EJBDeployer] Deployed: file:/D:/jboss/server/default/deploy/test4.jar
      10:50:53,525 WARN [JMSContainerInvoker] JMS provider failure detected:
      javax.jms.JMSSecurityException: User: null is NOT authenticated
      at org.jboss.mq.security.SecurityManager.authenticate(SecurityManager.java:181)
      at org.jboss.mq.security.ServerSecurityInterceptor.authenticate(ServerSecurityInterceptor.java:51)
      at org.jboss.mq.server.TracingInterceptor.authenticate(TracingInterceptor.java:650)
      at org.jboss.mq.server.JMSServerInvoker.authenticate(JMSServerInvoker.java:288)
      at org.jboss.mq.il.jvm.JVMServerIL.authenticate(JVMServerIL.java:302)
      at org.jboss.mq.Connection.authenticate(Connection.java:876)
      at org.jboss.mq.Connection.(Connection.java:238)
      at org.jboss.mq.Connection.(Connection.java:315)
      at org.jboss.mq.SpyConnection.(SpyConnection.java:59)
      at org.jboss.mq.SpyConnectionFactory.createQueueConnection(SpyConnectionFactory.java:116)
      at org.jboss.ejb.plugins.jms.DLQHandler.createService(DLQHandler.java:140)
      at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:158)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContainerInvoker.java:394)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:579)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      at org.jboss.ejb.MessageDrivenContainer.startService(MessageDrivenContainer.java:220)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
      at $Proxy11.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:392)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy30.start(Unknown Source)
      at org.jboss.ejb.EjbModule.startService(EjbModule.java:329)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
      at $Proxy11.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:392)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy20.start(Unknown Source)
      at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:540)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:200)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:273)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:392)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy5.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:597)
      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:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy6.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:365)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:272)
      at org.jboss.Main.boot(Main.java:150)
      at org.jboss.Main$1.run(Main.java:388)
      at java.lang.Thread.run(Thread.java:536)
      10:50:53,525 INFO [JMSContainerInvoker] Trying to reconnect to JMS provider
      10:50:53,545 INFO [MainDeployer] Deployed package: file:/D:/jboss/server/default/deploy/test4.jar


      What am I missing? I noticed that in standalone mode there is this info about "adding default security config" for queue B. To be quite honest I am completely lost here.

      Thanks a lot in advance.

      BR
      Andreas

        • 1. Re: Security Problem: Running JBoss with MDB from Eclipse
          aheinz

          Forgot to mention: Running JBoss 3.2.1 on Eclipse 2.1.0

          • 2. Re: Security Problem: Running JBoss with MDB from Eclipse

            In conf/login-config.xml
            jbossmq should be configured to have
            an unathenticated principal of guest.

            Regards,
            Adrian

            • 3. Re: Security Problem: Running JBoss with MDB from Eclipse
              aheinz

              Hi Adrian

              Thanks for your reply.

              I am using the standard login-config.xml.

              This is an extract from my jboss/server/default/conf/login-config.xml:

              <!-- Security domain for JBossMQ -->
              <application-policy name = "jbossmq">

              <login-module code = "org.jboss.mq.sm.file.DynamicLoginModule"
              flag = "required">
              <module-option name = "unauthenticatedIdentity">guest</module-option>
              <module-option name = "sm.objectname">jboss.mq:service=StateManager</module-option>
              </login-module>

              </application-policy>


              What I do not understand is: Why does it work in standalone mode as opposed to from within Eclipse?

              Any idea?

              Regards
              Andreas

              • 4. Re: Security Problem: Running JBoss with MDB from Eclipse

                It must not be using that configuration.
                It obtains it throught jndi.

                Regards,
                Adrian

                • 5. Re: Security Problem: Running JBoss with MDB from Eclipse
                  aheinz

                  Hi Adrian

                  Thanks for the info.

                  I finally figured out that the jbosssx.jar was missing in my classpath. Kind of hard to find out from the error message I got ;-))

                  I am constructing my classpath within Eclipse on a trial and error basis.

                  Do you happen to know how I can find out the classpath actually used by JBoss?

                  Thanks again for your help.

                  Regards
                  Andreas

                  • 6. Re: Security Problem: Running JBoss with MDB from Eclipse

                    bin/run.jar is the jboss classpath
                    Everything else is dynamic in three/four levels

                    WEB-INF/classes WEB-INF/lib (web apps)
                    server/default/lib & server/default/deploy (UCL)
                    lib/*.jar (kernel)
                    bin/run.jar (bootstrap)

                    I don't know how you will make this work and
                    not loose hotdeployment.
                    Eclipse has something similar to JBoss's
                    UnifiedClassLoaders but they are not dynamic
                    (hotdeploy) like JBoss's

                    Regards,
                    Adrian

                    • 7. Re: Security Problem: Running JBoss with MDB from Eclipse
                      aheinz

                      >> I don't know how you will make this work and not loose hotdeployment.

                      Hi Adrian

                      I don't know either ;-)) Just kidding, at least sort of...

                      I am using Lomboz to create my projects and so far things have worked out fine for me starting JBoss from within Eclipse (I just had to adapt the Lomboz server definition files for versions 3.2.1 and 4.0DR1).

                      I can redeploy my files and JBoss will recognize the change and undeploy/redeploy. However, I am not 100% sure that there are no side effects I am not aware of.

                      It's just VERY convenient to do it all from within the Eclipse environment. And during development you tend to shut down/restart the server from time to time anyway ;-))

                      BTW, I am pretty new to the whole J2EE world and it's a thrilling experience. However, there are so many layers that can break and I do not yet really understand them all...

                      Thanks again for help in this matter. I really appreciate it.

                      Regards
                      Andreas

                      PS: As for the classpath: I figured that run.jar is the classpath as I could see that from the run.bat file. Unfortunately specifying only that inside Eclipse does not really help. So I ended up adding jars (mainly from server/default/lib and lib) whenever I got a NoClassDefFoundError. Just the last one (user not authenticated) led me into a wrong direction.

                      • 8. Re: Security Problem: Running JBoss with MDB from Eclipse
                        kutter

                        Hi, Andreas.
                        Would it be possible that you publish your
                        test MDB and the working settings as an Eclipse
                        project?

                        This would be a great help.

                        Thanks a lot in advance,
                        Philipp