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
> 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 application changes System
> properties during Hibernate initialization.
> // See HHH-8383.
> synchronized ( systemProperties ) {
> GLOBAL_PROPERTIES.putAll( systemProperties );
> }
> }
> catch (SecurityException se) {
> LOG.unableToCopySystemProperties();
> }
>
> As the System.getProperties() call is not in a privileged block, it fails.
>
> Not sure if it's a bug or a feature.
>
> --
> Guillaume
>
> On Mon, Aug 27, 2018 at 3:18 PM Scott Marlow  wrote:
>
>> 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 one off, find the arquillian.xml being used, for example
>> wildfly/testsuite/integration/basic/src/test/config/arq/arquillian.xml
>> and see if you can update the:
>>
>>${server.jvm.args}
>>
>> Perhaps you could try presetting setting server.jvm.args to
>> -Dhibernate.bytecode.provider=javassist
>>
>> Scott
>>
>> On 08/27/2018 07:20 AM, Martin Simka wrote:
>> > 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
>> hibernate.cfg.xml
>> > with the same result.
>> >
>> > Martin
>> >
>> > On Sat, Aug 25, 2018 at 11:28 PM Gail Badner 
>> wrote:
>> >
>> >> 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, and ByteBuddy is in the
>> stacktrace.
>> >>>
>> >>> I also tried adding the property to the StandardServiceRegistryBuilder
>> >>> built by SFSBHibernateSFNaturalId, and that didn't work either.
>> >>>
>> >>> Is there some other way to enable javassist?
>> >>>
>> >>> Thanks,
>> >>> Gail
>> >>>
>> >> ___
>> >> hibernate-dev mailing list
>> >> hibernate-dev@lists.jboss.org
>> >> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>> >>
>> > ___
>> > hibernate-dev mailing list
>> > hibernate-dev@lists.jboss.org
>> > https://lists.jboss.org/mailman/listinfo/hibernate-dev
>> >
>> ___
>> hibernate-dev mailing list
>> hibernate-dev@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>
>
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


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, Gail Badner wrote:
> > 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 SFSBHibernateSFNaturalId, and that didn't work either.
> >
> > Is there some other way to enable javassist?
> >
> > Thanks,
> > Gail
> > ___
> > hibernate-dev mailing list
> > hibernate-dev@lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
> ___
> hibernate-dev mailing list
> hibernate-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


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 application changes System properties
during Hibernate initialization.
// See HHH-8383.
synchronized ( systemProperties ) {
GLOBAL_PROPERTIES.putAll( systemProperties );
}
}
catch (SecurityException se) {
LOG.unableToCopySystemProperties();
}

As the System.getProperties() call is not in a privileged block, it fails.

Not sure if it's a bug or a feature.

-- 
Guillaume

On Mon, Aug 27, 2018 at 3:18 PM Scott Marlow  wrote:

> 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 one off, find the arquillian.xml being used, for example
> wildfly/testsuite/integration/basic/src/test/config/arq/arquillian.xml
> and see if you can update the:
>
>${server.jvm.args}
>
> Perhaps you could try presetting setting server.jvm.args to
> -Dhibernate.bytecode.provider=javassist
>
> Scott
>
> On 08/27/2018 07:20 AM, Martin Simka wrote:
> > 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
> hibernate.cfg.xml
> > with the same result.
> >
> > Martin
> >
> > On Sat, Aug 25, 2018 at 11:28 PM Gail Badner  wrote:
> >
> >> 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, and ByteBuddy is in the
> stacktrace.
> >>>
> >>> I also tried adding the property to the StandardServiceRegistryBuilder
> >>> built by SFSBHibernateSFNaturalId, and that didn't work either.
> >>>
> >>> Is there some other way to enable javassist?
> >>>
> >>> Thanks,
> >>> Gail
> >>>
> >> ___
> >> hibernate-dev mailing list
> >> hibernate-dev@lists.jboss.org
> >> https://lists.jboss.org/mailman/listinfo/hibernate-dev
> >>
> > ___
> > hibernate-dev mailing list
> > hibernate-dev@lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/hibernate-dev
> >
> ___
> hibernate-dev mailing list
> hibernate-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


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 one off, find the arquillian.xml being used, for example 
wildfly/testsuite/integration/basic/src/test/config/arq/arquillian.xml 
and see if you can update the:

   ${server.jvm.args}

Perhaps you could try presetting setting server.jvm.args to 
-Dhibernate.bytecode.provider=javassist

Scott

On 08/27/2018 07:20 AM, Martin Simka wrote:
> 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 hibernate.cfg.xml
> with the same result.
> 
> Martin
> 
> On Sat, Aug 25, 2018 at 11:28 PM Gail Badner  wrote:
> 
>> 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, and ByteBuddy is in the stacktrace.
>>>
>>> I also tried adding the property to the StandardServiceRegistryBuilder
>>> built by SFSBHibernateSFNaturalId, and that didn't work either.
>>>
>>> Is there some other way to enable javassist?
>>>
>>> Thanks,
>>> Gail
>>>
>> ___
>> hibernate-dev mailing list
>> hibernate-dev@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>
> ___
> hibernate-dev mailing list
> hibernate-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
> 
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


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 is a permissions failure, and ByteBuddy is in the stacktrace.
>
> I also tried adding the property to the StandardServiceRegistryBuilder
> built by SFSBHibernateSFNaturalId, and that didn't work either.
>
> Is there some other way to enable javassist?
>
> Thanks,
> Gail
> ___
> hibernate-dev mailing list
> hibernate-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev

___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


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 the exact command line you are using Martin.

On Mon, Aug 27, 2018 at 1:31 PM Martin Simka  wrote:

> 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 hibernate.cfg.xml
> with the same result.
>
> Martin
>
> On Sat, Aug 25, 2018 at 11:28 PM Gail Badner  wrote:
>
> > 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, and ByteBuddy is in the
> stacktrace.
> > >
> > > I also tried adding the property to the StandardServiceRegistryBuilder
> > > built by SFSBHibernateSFNaturalId, and that didn't work either.
> > >
> > > Is there some other way to enable javassist?
> > >
> > > Thanks,
> > > Gail
> > >
> > ___
> > hibernate-dev mailing list
> > hibernate-dev@lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/hibernate-dev
> >
> ___
> hibernate-dev mailing list
> hibernate-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


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 hibernate.cfg.xml
with the same result.

Martin

On Sat, Aug 25, 2018 at 11:28 PM Gail Badner  wrote:

> 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, and ByteBuddy is in the stacktrace.
> >
> > I also tried adding the property to the StandardServiceRegistryBuilder
> > built by SFSBHibernateSFNaturalId, and that didn't work either.
> >
> > Is there some other way to enable javassist?
> >
> > Thanks,
> > Gail
> >
> ___
> hibernate-dev mailing list
> hibernate-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


Re: [hibernate-dev] Re-enabling the BlueOcean interface in Jenkins

2018-08-27 Thread Yoann Rodiere
Since there was no objections, I re-enabled BlueOcean.

See an example here:
http://ci.hibernate.org/blue/organizations/jenkins/hibernate-search-6-poc/detail/HSEARCH-3239/142/pipeline

When in the BlueOcean interface, you can go back to the classic interface
using the button circled in red in this screen capture:
https://i.imgur.com/lAck9GM.png

Yoann Rodière
Hibernate NoORM Team
yo...@hibernate.org


On Thu, 2 Aug 2018 at 18:59, Sanne Grinovero  wrote:

> +1
>
> I think we can live with minor inconveniences, especially as I hope
> we'll be moving more projects to take advantage of the pipelines.
>
> On Thu, 2 Aug 2018 at 17:56, Yoann Rodiere  wrote:
> >
> > Hi,
> >
> > We're about to make use of Jenkins pipelines in Hibernate Search, and for
> > that purpose, the BlueOcean is much easier to read. So I'd like to
> > re-enable it.
> >
> > This should not affect other projects much, as the default interface when
> > you go to ci.hibernate.org will still be the "old" one. However, this
> will
> > unfortunately change the URL in emails sent by Jenkins so that the URL
> > points to the BlueOcean interface; and unfortunately, there doesn't seem
> to
> > be a way around that. You do have a button on the top right of the
> > BlueOcean interface to go back to the "old" interface, though.
> >
> > For anyone wondering, this
> >  is the plugin
> > responsible for this behavior, and we can't uninstall it as long as
> > BlueOcean is installed.
> >
> > Given the inconvenience is minor, and pipeline logs are pretty much
> > unreadable without the interface (seriously, good luck spotting the
> problem
> > in this
> > <
> http://ci.hibernate.org/view/Search/job/hibernate-search-6-poc/job/HSEARCH-3239/142/flowGraphTable/
> >),
> > is it alright for everyone if I re-enable the BlueOcean interface?
> >
> > Yoann Rodière
> > Hibernate NoORM Team
> > yo...@hibernate.org
> > ___
> > hibernate-dev mailing list
> > hibernate-dev@lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

[hibernate-dev] Returned mail: Data format error

2018-08-27 Thread Bounced mail
The original message was received at Mon, 27 Aug 2018 15:37:37 +0800
from lists.jboss.org [15.9.202.182]

- The following addresses had permanent fatal errors -




___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev