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

Deployments using resteasy spring integration fail to deploy with LoggingPermission exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • 7.1.0.DR15
    • REST
    • None
    • Hide
      • Start server with security manager enabled bin/standalone.sh -secmgr
      • deploy attached test application

      Expected result
      Application deploys

      Current Result

      Caused by: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("java.util.logging.LoggingPermission" "control")" in code source "(vfs:/home/kanovotn/eap-bin/7.1.0.DR15/jboss-eap-7.1/modules/system/layers/base/org/jboss/resteasy/resteasy-spring/main/bundled/resteasy-spring-jar/resteasy-spring-3.0.21.Final-redhat-1.jar <no signer certificates>)" of "ModuleClassLoader for Module "deployment._DEFAULT___DEFAULT__ContextRefreshTest.war" from Service Module Loader")
      

      To run the test from source:

      git clone https://github.com/kanovotn/Resteasy.git; cd Resteasy; git checkout securityManager
      mvn clean install -DskipTests
      cd testsuite
      mvn clean verify -Dserver.home=EAP_HOME -Dversion.resteasy.testsuite=3.0.21.Final -fn -Dtest=ContextRefreshTest -Dmaven.test.redirectTestOutputToFile=false -Dsecurity.manager
      
      Show
      Start server with security manager enabled bin/standalone.sh -secmgr deploy attached test application Expected result Application deploys Current Result Caused by: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("java.util.logging.LoggingPermission" "control")" in code source "(vfs:/home/kanovotn/eap-bin/7.1.0.DR15/jboss-eap-7.1/modules/system/layers/base/org/jboss/resteasy/resteasy-spring/main/bundled/resteasy-spring-jar/resteasy-spring-3.0.21.Final-redhat-1.jar <no signer certificates>)" of "ModuleClassLoader for Module "deployment._DEFAULT___DEFAULT__ContextRefreshTest.war" from Service Module Loader") To run the test from source: git clone https: //github.com/kanovotn/Resteasy.git; cd Resteasy; git checkout securityManager mvn clean install -DskipTests cd testsuite mvn clean verify -Dserver.home=EAP_HOME -Dversion.resteasy.testsuite=3.0.21.Final -fn -Dtest=ContextRefreshTest -Dmaven.test.redirectTestOutputToFile= false -Dsecurity.manager

      Description:
      Tests are running on EAP with security manager and produces following error.
      All deployments which use resteasy-spring integration with spring included as a server module or included in the deployment, require LoggingPermission to create application context:

      ("java.util.logging.LoggingPermission" "control")
      

      The affected tests from resteasy testsuite are:
      ContextRefreshTest
      JavaConfigTest
      RequestScopedBeanTest
      SpringBeanProcessorTest
      SpringLocatingResourceTest
      SpringWebappContextTest
      AddSpringResteasyAsResourceRootTest
      ContactsDependenciesInDeploymentTest
      ContextRefreshDependenciesInDeploymentTest
      JavaConfigDependenciesInDeploymentTest
      JaxrsWithSpringMVCTest
      RequestScopedBeanDependenciesInDeploymentTest
      SpringBeanProcessorDependenciesInDeploymentTest
      SpringLocatingResourceDependenciesInDeploymentTest
      SpringWebappContextDependenciesInDeploymentTest

      Test output:

      16:28:25,186 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 62) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./SpringBeanProcessorTest: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./SpringBeanProcessorTest: java.lang.RuntimeException: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("java.util.logging.LoggingPermission" "control")" in code source "(vfs:/home/kanovotn/eap-bin/7.1.0.DR15/jboss-eap-7.1/modules/system/layers/base/org/jboss/resteasy/resteasy-spring/main/bundled/resteasy-spring-jar/resteasy-spring-3.0.21.Final-redhat-1.jar <no signer certificates>)" of "ModuleClassLoader for Module "deployment.SpringBeanProcessorTest.war" from Service Module Loader")
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:84)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	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)
      	at org.jboss.threads.JBossThread.run(JBossThread.java:320)
      Caused by: java.lang.RuntimeException: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("java.util.logging.LoggingPermission" "control")" in code source "(vfs:/home/kanovotn/eap-bin/7.1.0.DR15/jboss-eap-7.1/modules/system/layers/base/org/jboss/resteasy/resteasy-spring/main/bundled/resteasy-spring-jar/resteasy-spring-3.0.21.Final-redhat-1.jar <no signer certificates>)" of "ModuleClassLoader for Module "deployment.SpringBeanProcessorTest.war" from Service Module Loader")
      	at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:241)
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:99)
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:81)
      	... 6 more
      Caused by: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("java.util.logging.LoggingPermission" "control")" in code source "(vfs:/home/kanovotn/eap-bin/7.1.0.DR15/jboss-eap-7.1/modules/system/layers/base/org/jboss/resteasy/resteasy-spring/main/bundled/resteasy-spring-jar/resteasy-spring-3.0.21.Final-redhat-1.jar <no signer certificates>)" of "ModuleClassLoader for Module "deployment.SpringBeanProcessorTest.war" from Service Module Loader")
      	at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:278)
      	at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:175)
      	at org.jboss.logmanager.LogContext.checkSecurityAccess(LogContext.java:410)
      	at org.jboss.logmanager.Logger.attachIfAbsent(Logger.java:197)
      	at org.apache.commons.logging.JBossLogFactory.getInstance(JBossLogFactory.java:81)
      	at org.apache.commons.logging.JBossLogFactory.getInstance(JBossLogFactory.java:70)
      	at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:329)
      	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:302)
      	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
      	at org.jboss.resteasy.plugins.spring.SpringContextLoaderListener.contextInitialized(SpringContextLoaderListener.java:57)
      	at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187)
      	at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:205)
      	at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:174)
      	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
      	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
      	at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1704)
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1704)
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1704)
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1704)
      	at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:239)
      	... 8 more
      
      

        1. thread_dump.txt
          5 kB
          r searls
        2. server.log
          42 kB
          r searls
        3. _DEFAULT___DEFAULT__ContextRefreshTest.war
          835 kB
          Katerina Odabasi

              rsearls r searls
              kanovotn Katerina Odabasi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: