]
Scott Marlow resolved WFLY-9064.
--------------------------------
Resolution: Duplicate Issue
This issue is a duplicate of
.
HibernateNativeAPINaturalIdTestCase fails with security manager
---------------------------------------------------------------
Key: WFLY-9064
URL:
https://issues.redhat.com/browse/WFLY-9064
Project: WildFly
Issue Type: Bug
Components: JPA / Hibernate, Test Suite
Affects Versions: 11.0.0.Beta1
Reporter: Ondrej Kotek
Assignee: Scott Marlow
Priority: Major
Labels: security-manager
{{HibernateNativeAPINaturalIdTestCase}} fails with security manager because of missing
permission {{"("java.lang.RuntimePermission"
"createClassLoader")"}}:
{noformat}
javax.ejb.EJBException: java.lang.RuntimeException: Could not setup config
at org.jboss.as.ejb3.tx.BMTInterceptor.handleException(BMTInterceptor.java:83)
at
org.jboss.as.ejb3.tx.StatefulBMTInterceptor.handleInvocation(StatefulBMTInterceptor.java:96)
...
Caused by: java.lang.RuntimeException: Could not setup config
at
org.jboss.as.test.integration.hibernate.naturalid.SFSBHibernateSFNaturalId.setupConfig(SFSBHibernateSFNaturalId.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
Caused by: java.security.AccessControlException: WFSM000001: Permission check failed
(permission "("java.lang.RuntimePermission"
"createClassLoader")" in code source
"(vfs:/content/hibernate4naturalid_test.ear/beans.jar <no signer
certificates>)" of "ModuleClassLoader for Module
"deployment.hibernate4naturalid_test.ear.beans.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.SecurityManager.checkCreateClassLoader(SecurityManager.java:611)
at
org.wildfly.security.manager.WildFlySecurityManager.checkCreateClassLoader(WildFlySecurityManager.java:308)
...
{noformat}
After adding the permission, there is another missing permission
{{"("java.io.FilePermission"
"/home/okotek/git/wildfly/dist/target/wildfly-11.0.0.Beta1-SNAPSHOT/modules/system/layers/base/org/hibernate/main/hibernate-envers-5.1.8.Final.jar"
"read")"}}. A privileged section is missing probably.