Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-9063

TxException*TestCase fail with security manager

    XMLWordPrintable

Details

    • 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

    Description

      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.

      Attachments

        Issue Links

          Activity

            Public project attachment banner

              context keys: [headless, issue, helper, isAsynchronousRequest, project, action, user]
              current Project key: WFLY

              People

                Unassigned Unassigned
                okotek@redhat.com Ondrej Kotek
                Ondrej Kotek Ondrej Kotek
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: