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

The jakarta.mail.api module cannot load the implementation if the security manager is enabled

XMLWordPrintable

    • False
    • None
    • False
    • Known Issue
    • Workaround Exists
    • Hide

      Permissions would need to be added to the deployment to read the implementation JAR.

      Show
      Permissions would need to be added to the deployment to read the implementation JAR.

      The jakarta.mail.api module cannot load the Angus Mail implementation if the security manager is enabled. An example stack trace is:

      aused by: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("java.io.FilePermission" "/Users/yborgess/.m2/repository/org/eclipse/angus/angus-mail/1.0.0/angus-mail-1.0.0.jar" "read")" in code source "(vfs:/content/jakarta-mail-tester-1.0-SNAPSHOT.war/WEB-INF/classes <no signer certificates>)" of "ModuleClassLoader for Module "deployment.jakarta-mail-tester-1.0-SNAPSHOT.war" from Service Module Loader")
      	at org.wildfly.security.elytron-base@2.0.0.Beta2//org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:309)
      	at org.wildfly.security.elytron-base@2.0.0.Beta2//org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:201)
      	at java.base/java.lang.SecurityManager.checkRead(SecurityManager.java:661)
      	at org.wildfly.security.elytron-base@2.0.0.Beta2//org.wildfly.security.manager.WildFlySecurityManager.checkRead(WildFlySecurityManager.java:374)
      	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:237)
      	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:177)
      	at java.base/java.util.jar.JarFile.<init>(JarFile.java:350)
      	at java.base/sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:103)
      	at java.base/sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:72)
      	at java.base/sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:99)
      	at java.base/sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:125)
      	at java.base/sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:155)
      	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.parse(ServiceLoader.java:1165)
      	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1206)
      	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1221)
      	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator$1.run(ServiceLoader.java:1268)
      	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator$1.run(ServiceLoader.java:1267)
      	at java.base/java.security.AccessController.doPrivileged(Native Method)
      	at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1270)
      	at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1300)
      	at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1385)
      	at jakarta.mail.api@2.1.0//jakarta.mail.util.FactoryFinder.factoryFromServiceLoader(FactoryFinder.java:130)
      	... 52 more
      

            yborgess1@redhat.com Yeray Borges Santana
            yborgess1@redhat.com Yeray Borges Santana
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: