Scott Marlow ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%... ) *updated* an issue
Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiYjUyNTBkZTdi... ) / Bug ( https://hibernate.atlassian.net/browse/HHH-15514?atlOrigin=eyJpIjoiYjUyNT... ) HHH-15514 ( https://hibernate.atlassian.net/browse/HHH-15514?atlOrigin=eyJpIjoiYjUyNT... ) EntityTestCase Test failures with Hibernate ORM when run under security manager ( https://hibernate.atlassian.net/browse/HHH-15514?atlOrigin=eyJpIjoiYjUyNT... )
Change By: Scott Marlow ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%... )
The Running two WildFly tests under Java Security Manager with Hibernate ORM 6.1.3 shows failure:
{{Caused by: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("java.lang.RuntimePermission" "accessDeclaredMembers")" in code source "(vfs:/content/jpa_entitytest.jar <no signer certificates>)" of "ModuleClassLoader }}
{{for Module "deployment.jpa_entitytest.jar" from Service Module Loader") }}
{{ at org.wildfly.security.elytron-base@2.0.0.Beta3//org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:309) }}
{{ at org.wildfly.security.elytron-base@2.0.0.Beta3//org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:201) }}
{{ at java.base/java.lang.Class.checkMemberAccess(Class.java:2847) }}
{{ at java.base/java.lang.Class.getDeclaredMethod(Class.java:2471) }}
{{ at deployment.jpa_entitytest.jar//org.jboss.as.test.integration.jpa.hibernate.entity.Flight$HibernateProxy$nGaCISjH.<clinit>(Unknown Source)}}
To see [ Flight| https:// github.com/wildfly/wildfly/blob/9146d41a6f0d35a827e9699885ea0e7604bc1c45/... hibernate /entity/Flight. atlassian java] class constructor as generated bytecode, see [https://gist. net github.com / browse scottmarlow / HHH 2c602fcfa8512b904c4c0776a88b8152#file - 15371 gistfile1-txt-L513 |https:// hibernate gist. atlassian github. net com / browse scottmarlow / HHH 2c602fcfa8512b904c4c0776a88b8152#file - 15371 gistfile1-txt-L513 |smart-link] change addressed Hibernate ORM Envers test failures when run under a Java Security Manager but two of the tests not addressed by that change can be seen when running with Hibernate ORM 6 (loaded entity proxy class was saved to disk via [https://github. 1 com/hibernate/hibernate-orm/pull/5308|https://github. 3 com/hibernate/hibernate-orm/pull/5308|smart-link])
To recreate with WildFly :
h1. Steps to use Scott's branch to reproduce wildfly test failure
git clone [https://github.com/scottmarlow/wildfly|https://github.com/scottmarlow/wil...]
cd wildfly
git checkout WFLY-16713_Hibernate_ORM6.1.3
./build.sh clean install -DskipTests=true
pushd wildfly/testsuite/integration/basic
mvn clean test -Dtest=SessionFactoryTestCase -Dsecurity.manager
mvn clean test -Dtest=EntityTestCase -Dsecurity.manager
popd
h1. Recreate the failure with a debugger
pushd dist/target/wildfly-27.0.0.Beta1-SNAPSHOT/bin
vim standalone.conf
find line with #JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n"
save your changes to standalone.conf
./standalone.sh -secmgr &
popd
pushd wildfly/testsuite/integration/basic
mvn clean test -Dtest=EntityTestCase -Dsecurity.manager
popd
( https://hibernate.atlassian.net/browse/HHH-15514#add-comment?atlOrigin=ey... ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-15514#add-comment?atlOrigin=ey... )
Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.... ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailN... ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100207- sha1:7afd384 )