Re: [hibernate-dev] How to enable Javassist when running a WildFly unit test?

2018-08-27 Thread Guillaume Smet
Gail, About the issue you had with ByteBuddy + the SM, I opened https://hibernate.atlassian.net/browse/HHH-12932 . I have a (simple) fix for it ready. -- Guillaume On Mon, Aug 27, 2018 at 3:52 PM Guillaume Smet wrote: > So, the system properties are not considered when running with the > secu

Re: [hibernate-dev] How to enable Javassist when running a WildFly unit test?

2018-08-27 Thread Steve Ebersole
To clarify, `/hibernate.properties` (at root of class path) will work. That one (if exists) is always read during boot. On Mon, Aug 27, 2018 at 9:14 AM Chris Cranford wrote: > Technically the -D parameter should work; however I know a > hibernate.properties file works. > > On 08/24/2018 11:54 PM

Re: [hibernate-dev] How to enable Javassist when running a WildFly unit test?

2018-08-27 Thread Guillaume Smet
So, the system properties are not considered when running with the security manager. Log says: Could not copy system properties, system properties will be ignored And the code is the following: try { Properties systemProperties = System.getProperties(); // Must be thread-safe in case an a

Re: [hibernate-dev] How to enable Javassist when running a WildFly unit test?

2018-08-27 Thread Scott Marlow
Better to use WildFly -secmgr option, instead of -Dsecurity.manager. From what I recall, this helps avoid a boot time issue with -Dsecurity.manager. For enabling javassist for a one off test run, simply prestart your WildFly app server with the desired options and then launch. For more than a

Re: [hibernate-dev] How to enable Javassist when running a WildFly unit test?

2018-08-27 Thread Chris Cranford
Technically the -D parameter should work; however I know a hibernate.properties file works. On 08/24/2018 11:54 PM, Gail Badner wrote: > I tried running: > > mvn clean test -Dtest=HibernateNativeAPINaturalIdTestCase > -Dhibernate.bytecode.provider=javassist -Dsecurity.manager=true > > The result i

Re: [hibernate-dev] How to enable Javassist when running a WildFly unit test?

2018-08-27 Thread Guillaume Smet
Let me check what is happening here. There are 2 issues: the test should work with ByteBuddy. At least, it did work a few weeks ago when I worked on this. And we should be able to override the bytecode provider. It also worked a few weeks ago as I tested Javassist and ByteBuddy. And IIRC, I used

Re: [hibernate-dev] How to enable Javassist when running a WildFly unit test?

2018-08-27 Thread Martin Simka
Hi Gail, mvn clean test -Dtest=HibernateNativeAPINaturalIdTestCase -Dextra.server.jvm.args="-Dhibernate.bytecode.provider=javassist" -Dsecurity.manager=true should do it. But I still see ByteBuddy in the stacktrace. I also tried to add property directly to WildFly configuration file or to hiberna

Re: [hibernate-dev] How to enable Javassist when running a WildFly unit test?

2018-08-25 Thread Gail Badner
To clarify, I'm trying to enable javassist on WildFly 14. On Fri, Aug 24, 2018 at 8:54 PM, Gail Badner wrote: > I tried running: > > mvn clean test -Dtest=HibernateNativeAPINaturalIdTestCase > -Dhibernate.bytecode.provider=javassist -Dsecurity.manager=true > > The result is a permissions failure

[hibernate-dev] How to enable Javassist when running a WildFly unit test?

2018-08-24 Thread Gail Badner
I tried running: mvn clean test -Dtest=HibernateNativeAPINaturalIdTestCase -Dhibernate.bytecode.provider=javassist -Dsecurity.manager=true The result is a permissions failure, and ByteBuddy is in the stacktrace. I also tried adding the property to the StandardServiceRegistryBuilder built by SFSB