6 Replies Latest reply on Mar 25, 2013 9:06 AM by Claudio Miranda Branched to a new discussion.

    deployment module not found - EAP 6.1 alpha

    Claudio Miranda Apprentice

      EAP 6.1 alpha is in use here, where I need to verify the new ejb security interceptor stuff.

      There is a ejb-propagation-interceptor.jar that contains container interceptors (ServerSecurityInterceptor.java). It is deployed as any other application.

       

      There is jboss-as-propagation-ejb.jar that contains

       

      META-INF/jboss-deployment-structure.xml


      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
          <deployment>
              <dependencies>
                  <module name="org.jboss.remoting3" />
                  <module name="org.jboss.as.domain-management" />
                  <module name="org.jboss.as.controller" />
                  <module name="deployment.ejb-propagation-interceptor.jar" annotations="true" />
              </dependencies>
          </deployment>
      </jboss-deployment-structure>
      

       

       

      META-INF/jboss-ejb3.xml

       

      <assembly-descriptor>
          <s:security>
              <ejb-name>SecuredEJB</ejb-name>
              <s:security-domain>security-propagation-quickstart</s:security-domain>
          </s:security>
          <ci:container-interceptors>
              <interceptor-binding>
                  <ejb-name>SecuredEJB</ejb-name>
                  <interceptor-class>org.jboss.as.quickstarts.ejb_security_interceptors.ServerSecurityInterceptor</interceptor-class>
              </interceptor-binding>
          </ci:container-interceptors>
      </assembly-descriptor>
      

       

      If jboss-deployment-structure.xml of EJB is deployed as that way there is the following exception


      2013-03-21  12:52:26,643 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment jboss-as-propagation-ejb.jar (runtime-name: jboss-as-propagation-ejb.jar) in 1ms

      2013-03-21  12:52:26,645 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "jboss-as-propagation-ejb.jar" (runtime-name: "jboss-as-propagation-ejb.jar")

      2013-03-21  12:52:26,648 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."jboss-as-propagation-ejb.jar".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."jboss-as-propagation-ejb.jar".PARSE: JBAS018733: Failed to process phase PARSE of deployment "jboss-as-propagation-ejb.jar"

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_33]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_33]

              at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_33]

      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: org.jboss.modules.ModuleNotFoundException: deployment.ejb-propagation-interceptor.jar:main

              at org.jboss.as.server.deployment.annotation.CompositeIndexProcessor.deploy(CompositeIndexProcessor.java:78) [jboss-as-server-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]

              ... 5 more

      Caused by: org.jboss.modules.ModuleNotFoundException: deployment.ejb-propagation-interceptor.jar:main

              at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:224) [jboss-modules.jar:1.2.0.CR1]

              at org.jboss.as.server.deployment.annotation.CompositeIndexProcessor.deploy(CompositeIndexProcessor.java:70) [jboss-as-server-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]

              ... 6 more

       

       

      However if I remove annotations="true" from EJB jboss-deployment-structure.xml, EJB jar deploy works fine.

       

       

      2013-03-21  12:34:01,180 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment jboss-as-propagation-ejb.jar (runtime-na

      me: jboss-as-propagation-ejb.jar) in 1ms

      2013-03-21  12:34:01,181 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "jboss-as-propagation-ejb.jar" (runt

      ime-name: "jboss-as-propagation-ejb.jar")

      2013-03-21  12:34:01,198 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-6) JBAS018567: Deployment "deployment.jboss-as-propagation-ejb.jar" is us

      ing a private module ("org.jboss.as.domain-management:main") which may be changed or removed in future versions without notice.

      2013-03-21  12:34:01,198 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-6) JBAS018567: Deployment "deployment.jboss-as-propagation-ejb.jar" is us

      ing a private module ("org.jboss.as.domain-management:main") which may be changed or removed in future versions without notice.

      2013-03-21  12:34:01,198 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-6) JBAS018567: Deployment "deployment.jboss-as-propagation-ejb.jar" is us

      ing a private module ("org.jboss.as.controller:main") which may be changed or removed in future versions without notice.

      2013-03-21  12:34:01,199 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-6) JBAS018567: Deployment "deployment.jboss-as-propagation-ejb.jar" is us

      ing a private module ("org.jboss.as.controller:main") which may be changed or removed in future versions without notice.

      2013-03-21  12:34:01,202 DEBUG [org.jboss.as.ejb3] (MSC service thread 1-6) Installing timer service for component HelloEJB

      2013-03-21  12:34:01,202 DEBUG [org.jboss.as.ejb3] (MSC service thread 1-6) Installing timer service for component SecuredEJB

      2013-03-21  12:34:01,204 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-6) JNDI bindings for sessi

      on bean named HelloEJB in deployment unit deployment "jboss-as-propagation-ejb.jar" are as follows:

       

              java:global/jboss-as-propagation-ejb/HelloEJB!org.jboss.as.quickstarts.ejb_security.Hello

              java:app/jboss-as-propagation-ejb/HelloEJB!org.jboss.as.quickstarts.ejb_security.Hello

              java:module/HelloEJB!org.jboss.as.quickstarts.ejb_security.Hello

              java:jboss/exported/jboss-as-propagation-ejb/HelloEJB!org.jboss.as.quickstarts.ejb_security.Hello

              java:global/jboss-as-propagation-ejb/HelloEJB

              java:app/jboss-as-propagation-ejb/HelloEJB

              java:module/HelloEJB

       

      But this way, the ServerSecurityInterceptor is never called. This test shows annotations="true" plays a significant role here.

       

      Am I missing something here, related to the module dependency configuration for deployments ?

       

      Thanks

       

      Claudio

        • 1. Re: deployment module not found - EAP 6.1 alpha
          jaikiran pai Master

          This name:

           

          deployment.ejb-propagation-interceptor.jar

           

          looks wrong. How have you deployed the module containing the interceptor? And what's it's name and folder structure?


          • 2. Re: deployment module not found - EAP 6.1 alpha
            Claudio Miranda Apprentice

            This the output of ejb-propagation-interceptor deploy

            2013-03-21  12:19:52,154 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "ejb-propagation-interceptor.jar" (runtime-name: "ejb-propagation-interceptor.jar")

            2013-03-21  12:19:52,246 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-8) JBAS018567: Deployment "deployment.ejb-propagation-interceptor.jar" is using a private module ("org.jboss.as.domain-management:main") which may be changed or removed in future versions without notice.

            2013-03-21  12:19:52,246 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-8) JBAS018567: Deployment "deployment.ejb-propagation-interceptor.jar" is using a private module ("org.jboss.as.domain-management:main") which may be changed or removed in future versions without notice.

            2013-03-21  12:19:52,247 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-8) JBAS018567: Deployment "deployment.ejb-propagation-interceptor.jar" is using a private module ("org.jboss.as.controller:main") which may be changed or removed in future versions without notice.

            2013-03-21  12:19:52,247 WARN  [org.jboss.as.dependency.private] (MSC service thread 1-8) JBAS018567: Deployment "deployment.ejb-propagation-interceptor.jar" is using a private module ("org.jboss.as.controller:main") which may be changed or removed in future versions without notice.

            2013-03-21  12:19:52,262 DEBUG [org.jboss.as.ejb3.deployment.processors.EjbClientContextSetupProcessor] (MSC service thread 1-6) Deployment unit deployment "ejb-propagation-interceptor.jar" doesn't have any explicit EJB client context configured. Falling back on the default service jboss.ejb3.ejbClientContext.default EJB client context service

            2013-03-21  12:19:52,263 DEBUG [org.jboss.as.ejb3.deployment.processors.EjbClientContextSetupProcessor] (MSC service thread 1-6) Registering EJB client context org.jboss.ejb.client.EJBClientContext@1983eae7 for classloader ModuleClassLoader for Module "deployment.ejb-propagation-interceptor.jar:main" from Service Module Loader

            2013-03-21  12:19:52,401 DEBUG [org.jboss.security] (MSC service thread 1-7) PBOX000307: Constructing JBossPolicyConfiguration with contextID ejb-propagation-interceptor.jar

            2013-03-21  12:19:52,402 DEBUG [org.jboss.as.security] (MSC service thread 1-7) Cannot create permissions with 'null' metaData for id=ejb-propagation-interceptor.jar

            2013-03-21  12:19:52,402 TRACE [org.jboss.security] (MSC service thread 1-7) PBOX000314: commit, contextID: ejb-propagation-interceptor.jar

            2013-03-21  12:19:52,632 INFO  [org.jboss.as.server] (Controller Boot Thread) JBAS018559: Deployed "ejb-propagation-interceptor.jar" (runtime-name : "ejb-propagation-interceptor.jar")

             

            The strange is if annotations=true is removed, EJB jar is deployed fine.

             

            The ejb-propagation-interceptor.jar content

             

             

            $ jar tf target/ejb-propagation-interceptor.jar
            META-INF/
            META-INF/MANIFEST.MF
            org/
            org/jboss/
            org/jboss/as/
            org/jboss/as/quickstarts/
            org/jboss/as/quickstarts/ejb_security_interceptors/
            delegation-mapping.properties
            META-INF/jandex.idx
            META-INF/jboss-deployment-structure.xml
            org/jboss/as/quickstarts/ejb_security_interceptors/ClientSecurityInterceptor.class
            org/jboss/as/quickstarts/ejb_security_interceptors/DelegationLoginModule.class
            org/jboss/as/quickstarts/ejb_security_interceptors/OuterUserCredential.class
            org/jboss/as/quickstarts/ejb_security_interceptors/SecurityActions$ContextClassLoaderAction$1.class
            org/jboss/as/quickstarts/ejb_security_interceptors/SecurityActions$ContextClassLoaderAction$2$1.class
            org/jboss/as/quickstarts/ejb_security_interceptors/SecurityActions$ContextClassLoaderAction$2.class
            org/jboss/as/quickstarts/ejb_security_interceptors/SecurityActions$ContextClassLoaderAction.class
            org/jboss/as/quickstarts/ejb_security_interceptors/SecurityActions$RemotingContextActions$1.class
            org/jboss/as/quickstarts/ejb_security_interceptors/SecurityActions$RemotingContextActions$2$1.class
            org/jboss/as/quickstarts/ejb_security_interceptors/SecurityActions$RemotingContextActions$2$2.class
            org/jboss/as/quickstarts/ejb_security_interceptors/SecurityActions$RemotingContextActions$2$3.class
            org/jboss/as/quickstarts/ejb_security_interceptors/SecurityActions$RemotingContextActions$2.class
            org/jboss/as/quickstarts/ejb_security_interceptors/SecurityActions$RemotingContextActions.class
            org/jboss/as/quickstarts/ejb_security_interceptors/SecurityActions$SecurityContextActions$1.class
            org/jboss/as/quickstarts/ejb_security_interceptors/SecurityActions$SecurityContextActions$2$1.class
            org/jboss/as/quickstarts/ejb_security_interceptors/SecurityActions$SecurityContextActions$2$2.class
            org/jboss/as/quickstarts/ejb_security_interceptors/SecurityActions$SecurityContextActions$2$3.class
            org/jboss/as/quickstarts/ejb_security_interceptors/SecurityActions$SecurityContextActions$2$4.class
            org/jboss/as/quickstarts/ejb_security_interceptors/SecurityActions$SecurityContextActions$2$5.class
            org/jboss/as/quickstarts/ejb_security_interceptors/SecurityActions$SecurityContextActions$2.class
            org/jboss/as/quickstarts/ejb_security_interceptors/SecurityActions$SecurityContextActions.class
            org/jboss/as/quickstarts/ejb_security_interceptors/SecurityActions.class
            org/jboss/as/quickstarts/ejb_security_interceptors/ServerSecurityInterceptor$1.class
            org/jboss/as/quickstarts/ejb_security_interceptors/ServerSecurityInterceptor$SimplePrincipal.class
            org/jboss/as/quickstarts/ejb_security_interceptors/ServerSecurityInterceptor.class
            META-INF/maven/
            META-INF/maven/org.jboss.as.quickstarts/
            META-INF/maven/org.jboss.as.quickstarts/jboss-as-propagation-interceptor/
            META-INF/maven/org.jboss.as.quickstarts/jboss-as-propagation-interceptor/pom.xml
            META-INF/maven/org.jboss.as.quickstarts/jboss-as-propagation-interceptor/pom.properties
            
            • 3. Re: deployment module not found - EAP 6.1 alpha
              jaikiran pai Master

              Ah! I misread your first post. I thought you were deploying the interceptors jar as a JBoss module, which isn't the case as you clearly say:

              There is a ejb-propagation-interceptor.jar that contains container interceptors (ServerSecurityInterceptor.java). It is deployed as any other application.

              So the module name that you are using in your dependency is correct. I just had a look at the code and I see what the problem is. This looks like a bug. Give me some time, I'll get back to this in a few hours and see what can be done.

              • 4. Re: deployment module not found - EAP 6.1 alpha
                Claudio Miranda Apprentice

                Have removed ejb-propagation-interceptor.jar from deployment and installed it as a module instead. That way the ejb and web applications are correctly deployed.

                 

                However the issue now is the ServerSecurityInterceptor is not called when invoking SecuredEJB (see first post).

                 

                Perhaps this issue is related to the same bug you pointed out ?

                • 5. Re: deployment module not found - EAP 6.1 alpha
                  jaikiran pai Master

                  Follow the discussion in this JIRA https://issues.jboss.org/browse/AS7-6764. It explains what needs to be done.

                  1 of 1 people found this helpful
                  • 6. Re: deployment module not found - EAP 6.1 alpha
                    Claudio Miranda Apprentice

                    Hi Jaikiran, as a module it worked. (jandex and annotations="true")

                     

                    For a while, the module can be installed as a module, but the plan is to deploy, to better manage it and reditribute. Do you think the bug is to be fixed in 6.1 beta ?

                     

                    However there is an unrelated exception.

                    2013-03-25  09:59:54,912 DEBUG [org.jboss.security] PBOX000293: Exception caught: javax.naming.NameNotFoundException: policyRegistration -- service jboss.naming.context.java.policyRegistration

                            at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:103)

                            at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:197)

                            at org.jboss.as.naming.InitialContext.lookup(InitialContext.java:120)

                            at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:183)

                            at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:179)

                            at javax.naming.InitialContext.lookup(InitialContext.java:392) [rt.jar:1.6.0_33]

                            at org.jboss.security.plugins.javaee.EJBAuthorizationHelper.getPolicyRegistrationFromJNDI(EJBAuthorizationHelper.java:353) [picketbox-4.0.15.Final.jar:4.0.15.Final]

                            at org.jboss.security.plugins.javaee.EJBAuthorizationHelper.authorize(EJBAuthorizationHelper.java:303) [picketbox-4.0.15.Final.jar:4.0.15.Final]

                            at org.jboss.as.security.service.SimpleSecurityManager.authorize(SimpleSecurityManager.java:255) [jboss-as-security-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]

                            at org.jboss.as.ejb3.security.AuthorizationInterceptor.processInvocation(AuthorizationInterceptor.java:112) [jboss-as-ejb3-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]

                            at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                            at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:76) [jboss-as-ejb3-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]

                            at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                            at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:374) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

                            at org.jboss.as.quickstarts.ejb_security_interceptors.ServerSecurityInterceptor.aroundInvoke(ServerSecurityInterceptor.java:97) [ejb-propagation-interceptor.jar:]

                            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_33]


                     

                    Thanks for your very helpful assistance.

                     

                    Claudio