Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-9146

EJB deployments with Elytron SD collides in EJB3 SD service

XMLWordPrintable

    • Hide

      a) run enable-elytron.cli and deploy attached EARs (read-props-limited.ear and read-props-grant.ear) after (in any order) - second deployed will return described exception
      b) alternative: using testsuite with -Delytron: (ladybird branch of wildfly)

      cd testsuite/integration/secman
      mvn test -Delytron -Dtest=org.jboss.as.testsuite.integration.secman.propertypermission.EarModulesPPTestCase
      
      Show
      a) run enable-elytron.cli and deploy attached EARs (read-props-limited.ear and read-props-grant.ear) after (in any order) - second deployed will return described exception b) alternative: using testsuite with -Delytron: (ladybird branch of wildfly) cd testsuite/integration/secman mvn test -Delytron -Dtest=org.jboss.as.testsuite.integration.secman.propertypermission.EarModulesPPTestCase

      Every EJB deployment associated with an Elytron security domain builds jboss.ejb3.security-domain service:
      https://github.com/wildfly/wildfly/blob/master/ejb3/src/main/java/org/jboss/as/ejb3/deployment/processors/EJBDefaultSecurityDomainProcessor.java#L107

      But it fails if there are more such deployments, because it mean second service with the same name:

      00:02:12,118 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.subunit."read-props-limited.ear"."ejb-moduleread-props-limited.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."read-props-limited.ear"."ejb-moduleread-props-limited.jar".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of subdeployment "ejb-moduleread-props-limited.jar" of deployment "read-props-limited.ear"
      	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:172)
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.ejb3.security-domain is already registered
      	at org.jboss.msc.service.ServiceRegistrationImpl.setInstance(ServiceRegistrationImpl.java:158)
      	at org.jboss.msc.service.ServiceControllerImpl.startInstallation(ServiceControllerImpl.java:235)
      	at org.jboss.msc.service.ServiceContainerImpl.install(ServiceContainerImpl.java:768)
      	at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:223)
      	at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2555)
      	at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:223)
      	at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2555)
      	at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:317)
      	at org.jboss.as.ejb3.deployment.processors.EJBDefaultSecurityDomainProcessor.deploy(EJBDefaultSecurityDomainProcessor.java:111)
      	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:165)
      	... 5 more
      

        1. enable-elytron.cli
          1 kB
          Josef Cacek
        2. read-props-grant.ear
          4 kB
          Josef Cacek
        3. read-props-limited.ear
          4 kB
          Josef Cacek

              jkalina@redhat.com Jan Kalina (Inactive)
              josef.cacek@gmail.com Josef Cacek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: