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

TxException*TestCase fail with security manager

XMLWordPrintable

    • Hide

      cd wildfly/testsuite/integration/basic
      mvn clean test -Dtest=TxException*TestCase -Dsecurity.manager

      Show
      cd wildfly/testsuite/integration/basic mvn clean test -Dtest=TxException*TestCase -Dsecurity.manager

      TxException*TestCase fail with security manager because of missing permission "("java.lang.RuntimePermission" "accessDeclaredMembers")":

      ERROR [org.jboss.as.ejb3.invocation] (default task-9) WFLYEJB0034: EJB Invocation failed on component CmtEjb3 for method public abstract void org.jboss.as.test.integration.ejb.transaction.exception.bean.TestBean.throwExceptionFromTm(org.jboss.as.test.integration.ejb.transaction.exception.TestConfig$TxManagerException) throws java.lang.Exception: javax.ejb.EJBTransactionRolledbackException: WFLYEJB0457: Unexpected Error
      	at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleInCallerTx(CMTTxInterceptor.java:154)
      	at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:257)
      ...
      Caused by: java.lang.ExceptionInInitializerError
      	at org.jboss.as.test.integration.ejb.transaction.exception.TestXAResource.createXATestExceptionClass(TestXAResource.java:164)
      	at org.jboss.as.test.integration.ejb.transaction.exception.TestXAResource.createDriverSpecificXAException(TestXAResource.java:144)
      ...
      Caused by: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("java.lang.RuntimePermission" "accessDeclaredMembers")" in code source "(vfs:/content/tx-exception-test.ear/ejb.jar <no signer certificates>)" of "ModuleClassLoader for Module "deployment.tx-exception-test.ear.ejb.jar" 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 java.lang.Class.checkMemberAccess(Class.java:2348)
      ...
      

      After adding the permission, there are some issues with javassist, see attached logs.

              dsimko Daniel Simko (Inactive)
              okotek@redhat.com Ondrej Kotek
              Ondrej Kotek Ondrej Kotek
              Ondrej Kotek Ondrej Kotek
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: