You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by Philippe Mouawad <p....@ubik-ingenierie.com> on 2019/07/23 21:07:16 UTC

Replacing nashorn

Hello,
When running under jdk12, we see the warning about nashorn being dropped in
the future.

What shall we do to handle it?

- drop it and revert back to rhino as default  which does not seem very
active
- replace it with an alternative, I didn’t find one yet

Regards
Philippe


-- 


[image: logo Ubik Ingenierie] <https://www.ubik-ingenierie.com> Philippe
Mouawad
Senior Performance Expert
320914981 <+33320914981> | p.mouawad@ubik-ingenierie.com
[image: ubik-ingenierie.com] ubik-ingenierie.com
<https://www.ubik-ingenierie.com> | [image: 03.20.91.49.81] 03.20.91.49.81
<+33320914981> | [image: 23 rue du chemin de fer , 59100 , Roubaix] 23 rue
du chemin de fer, 59100, Roubaix
<https://www.openstreetmap.org/#map=18/50.69454/3.16455>

Re: Replacing nashorn

Posted by Vladimir Sitnikov <si...@gmail.com>.
There might be yet another option.

It might be that Nashorn would be moved to a community-managed library
(e.g. like JavaFx became OpenJFX).


>Is Nashorn or its replacment needed for *all* test plans?

Some of the plans depend on Nashorn, and some of them do not.

Vladimir

Re: Replacing nashorn

Posted by Philippe Mouawad <ph...@gmail.com>.
If users don't follow best practices, then yes (If Controller and While
Controller use Javascript so nashorn).
But if we switch to rhino as default JS engine, it should work in 99% of
cases.

If it's overkill, maybe it's not worth investing in this.
Noting that IMO, JS is bad for JMeter performances.
The best thing would be to make IfController / While Controller use JEXL3
by default instead of JS, but how to manage transition in a clear way ?

Regards


On Wed, Mar 25, 2020 at 6:37 PM sebb <se...@gmail.com> wrote:

> Is Nashorn or its replacment needed for *all* test plans?
> If not, then another alternative is to document how to download it,
> and report a suitable error if a test plan needs it.
>
> On Mon, 23 Mar 2020 at 17:57, Felix Schumacher
> <fe...@internetallee.de> wrote:
> >
> > The third option would be to go back to rhino, which is included in
> jmeter anyhow.
> >
> > Wouldn't it?
> >
> > Felix
> >
> > Am 23. März 2020 16:59:43 MEZ schrieb Vladimir Sitnikov <
> sitnikov.vladimir@gmail.com>:
> > >up.
> > >
> > >Graal.JS seems to be mature now.
> > >It can run on any Java machine:
> > >
> https://github.com/graalvm/graaljs/blob/master/docs/user/RunOnJDK.md#run-graalvm-javascript-on-a-stock-jdk
> > >
> > >The licenses there are MIT and/or UPL (both are permissible for Apache)
> > >
> > >The sad thing is that Graal.JS is ~20 megabytes extra.
> > >
> > >
> > >It is extremely likely Nashorn will be removed from Java 15, so we need
> > >to
> > >deal with it somehow.
> > >
> > >So the options are:
> > >a) Bundle Graal.JS (+20MiB :( )
> > >b) Document the way to add Graal.JS jars as an external dependency
> > >(everybody would need to download the file manually :( )
> > >c) Add an option to download Graal.JS on demand (not that trivial to
> > >implement, yet useful for many(!) other cases)
> > >
> > >WDYT?
> > >
> > >Vladimir
>


-- 
Cordialement.
Philippe Mouawad.

Re: Replacing nashorn

Posted by sebb <se...@gmail.com>.
Is Nashorn or its replacment needed for *all* test plans?
If not, then another alternative is to document how to download it,
and report a suitable error if a test plan needs it.

On Mon, 23 Mar 2020 at 17:57, Felix Schumacher
<fe...@internetallee.de> wrote:
>
> The third option would be to go back to rhino, which is included in jmeter anyhow.
>
> Wouldn't it?
>
> Felix
>
> Am 23. März 2020 16:59:43 MEZ schrieb Vladimir Sitnikov <si...@gmail.com>:
> >up.
> >
> >Graal.JS seems to be mature now.
> >It can run on any Java machine:
> >https://github.com/graalvm/graaljs/blob/master/docs/user/RunOnJDK.md#run-graalvm-javascript-on-a-stock-jdk
> >
> >The licenses there are MIT and/or UPL (both are permissible for Apache)
> >
> >The sad thing is that Graal.JS is ~20 megabytes extra.
> >
> >
> >It is extremely likely Nashorn will be removed from Java 15, so we need
> >to
> >deal with it somehow.
> >
> >So the options are:
> >a) Bundle Graal.JS (+20MiB :( )
> >b) Document the way to add Graal.JS jars as an external dependency
> >(everybody would need to download the file manually :( )
> >c) Add an option to download Graal.JS on demand (not that trivial to
> >implement, yet useful for many(!) other cases)
> >
> >WDYT?
> >
> >Vladimir

Re: Replacing nashorn

Posted by Felix Schumacher <fe...@internetallee.de>.
The third option would be to go back to rhino, which is included in jmeter anyhow.

Wouldn't it?

Felix 

Am 23. März 2020 16:59:43 MEZ schrieb Vladimir Sitnikov <si...@gmail.com>:
>up.
>
>Graal.JS seems to be mature now.
>It can run on any Java machine:
>https://github.com/graalvm/graaljs/blob/master/docs/user/RunOnJDK.md#run-graalvm-javascript-on-a-stock-jdk
>
>The licenses there are MIT and/or UPL (both are permissible for Apache)
>
>The sad thing is that Graal.JS is ~20 megabytes extra.
>
>
>It is extremely likely Nashorn will be removed from Java 15, so we need
>to
>deal with it somehow.
>
>So the options are:
>a) Bundle Graal.JS (+20MiB :( )
>b) Document the way to add Graal.JS jars as an external dependency
>(everybody would need to download the file manually :( )
>c) Add an option to download Graal.JS on demand (not that trivial to
>implement, yet useful for many(!) other cases)
>
>WDYT?
>
>Vladimir

Re: Replacing nashorn

Posted by Philippe Mouawad <ph...@gmail.com>.
Hello,
thanks for analysis.
My answer inline below.
Regards

On Mon, Mar 23, 2020 at 4:59 PM Vladimir Sitnikov <
sitnikov.vladimir@gmail.com> wrote:

> up.
>
> Graal.JS seems to be mature now.
> It can run on any Java machine:
>
> https://github.com/graalvm/graaljs/blob/master/docs/user/RunOnJDK.md#run-graalvm-javascript-on-a-stock-jdk
>
> The licenses there are MIT and/or UPL (both are permissible for Apache)
>
> The sad thing is that Graal.JS is ~20 megabytes extra.
>
>
> It is extremely likely Nashorn will be removed from Java 15, so we need to
> deal with it somehow.
>
> So the options are:
> a) Bundle Graal.JS (+20MiB :( )
>
I'd go for this option provided the license is ok which seems to be the
case.

b) Document the way to add Graal.JS jars as an external dependency
> (everybody would need to download the file manually :( )
> c) Add an option to download Graal.JS on demand (not that trivial to
> implement, yet useful for many(!) other cases)
>
> WDYT?
>
> Vladimir
>


-- 
Cordialement.
Philippe Mouawad.

Re: Replacing nashorn

Posted by Vladimir Sitnikov <si...@gmail.com>.
up.

Graal.JS seems to be mature now.
It can run on any Java machine:
https://github.com/graalvm/graaljs/blob/master/docs/user/RunOnJDK.md#run-graalvm-javascript-on-a-stock-jdk

The licenses there are MIT and/or UPL (both are permissible for Apache)

The sad thing is that Graal.JS is ~20 megabytes extra.


It is extremely likely Nashorn will be removed from Java 15, so we need to
deal with it somehow.

So the options are:
a) Bundle Graal.JS (+20MiB :( )
b) Document the way to add Graal.JS jars as an external dependency
(everybody would need to download the file manually :( )
c) Add an option to download Graal.JS on demand (not that trivial to
implement, yet useful for many(!) other cases)

WDYT?

Vladimir

Re: Replacing nashorn

Posted by Philippe Mouawad <ph...@gmail.com>.
Hello,
Thanks, I had looked at this one but:

   - I don't think it's compatible with Apache license
   - This mode is still experimental
   - I must say I'm afraid of another future abrupt termination (as with
   Nashorn)

Did you try embedding it in JMeter ?

Helpful refs:

https://medium.com/graalvm/oracle-graalvm-announces-support-for-nashorn-migration-c04810d75c1f
https://github.com/graalvm/graaljs/blob/master/docs/user/NashornMigrationGuide.md

Regards



On Wed, Jul 24, 2019 at 8:10 AM Jmeter Tea <jm...@gmail.com> wrote:

> Hello,
> There's GraalVM JavaScript with optional "Nashorn compatibility mode"
>
> https://github.com/graalvm/graaljs/blob/master/docs/user/NashornMigrationGuide.md
>
> FYI
>
> On Wed, Jul 24, 2019 at 12:07 AM Philippe Mouawad <
> p.mouawad@ubik-ingenierie.com> wrote:
>
> > Hello,
> > When running under jdk12, we see the warning about nashorn being dropped
> in
> > the future.
> >
> > What shall we do to handle it?
> >
> > - drop it and revert back to rhino as default  which does not seem very
> > active
> > - replace it with an alternative, I didn’t find one yet
> >
> > Regards
> > Philippe
> >
> >
> > --
> >
> >
> > [image: logo Ubik Ingenierie] <https://www.ubik-ingenierie.com> Philippe
> > Mouawad
> > Senior Performance Expert
> > 320914981 <+33320914981> | p.mouawad@ubik-ingenierie.com
> > [image: ubik-ingenierie.com] ubik-ingenierie.com
> > <https://www.ubik-ingenierie.com> | [image: 03.20.91.49.81]
> 03.20.91.49.81
> > <+33320914981> | [image: 23 rue du chemin de fer , 59100 , Roubaix] 23
> rue
> > du chemin de fer, 59100, Roubaix
> > <https://www.openstreetmap.org/#map=18/50.69454/3.16455>
> >
>


-- 
Cordialement.
Philippe Mouawad.

Re: Replacing nashorn

Posted by Graham Russell <gr...@ham1.co.uk>.
Option 4, also deprecate and remove support for JS and provide a guide on
how to migrate to Groovy?

Graham

On Wed, 24 Jul 2019, 07:11 Jmeter Tea, <jm...@gmail.com> wrote:

> Hello,
> There's GraalVM JavaScript with optional "Nashorn compatibility mode"
>
> https://github.com/graalvm/graaljs/blob/master/docs/user/NashornMigrationGuide.md
>
> FYI
>
> On Wed, Jul 24, 2019 at 12:07 AM Philippe Mouawad <
> p.mouawad@ubik-ingenierie.com> wrote:
>
> > Hello,
> > When running under jdk12, we see the warning about nashorn being dropped
> in
> > the future.
> >
> > What shall we do to handle it?
> >
> > - drop it and revert back to rhino as default  which does not seem very
> > active
> > - replace it with an alternative, I didn’t find one yet
> >
> > Regards
> > Philippe
> >
> >
> > --
> >
> >
> > [image: logo Ubik Ingenierie] <https://www.ubik-ingenierie.com> Philippe
> > Mouawad
> > Senior Performance Expert
> > 320914981 <+33320914981> | p.mouawad@ubik-ingenierie.com
> > [image: ubik-ingenierie.com] ubik-ingenierie.com
> > <https://www.ubik-ingenierie.com> | [image: 03.20.91.49.81]
> 03.20.91.49.81
> > <+33320914981> | [image: 23 rue du chemin de fer , 59100 , Roubaix] 23
> rue
> > du chemin de fer, 59100, Roubaix
> > <https://www.openstreetmap.org/#map=18/50.69454/3.16455>
> >
>

Re: Replacing nashorn

Posted by Jmeter Tea <jm...@gmail.com>.
Hello,
There's GraalVM JavaScript with optional "Nashorn compatibility mode"
https://github.com/graalvm/graaljs/blob/master/docs/user/NashornMigrationGuide.md

FYI

On Wed, Jul 24, 2019 at 12:07 AM Philippe Mouawad <
p.mouawad@ubik-ingenierie.com> wrote:

> Hello,
> When running under jdk12, we see the warning about nashorn being dropped in
> the future.
>
> What shall we do to handle it?
>
> - drop it and revert back to rhino as default  which does not seem very
> active
> - replace it with an alternative, I didn’t find one yet
>
> Regards
> Philippe
>
>
> --
>
>
> [image: logo Ubik Ingenierie] <https://www.ubik-ingenierie.com> Philippe
> Mouawad
> Senior Performance Expert
> 320914981 <+33320914981> | p.mouawad@ubik-ingenierie.com
> [image: ubik-ingenierie.com] ubik-ingenierie.com
> <https://www.ubik-ingenierie.com> | [image: 03.20.91.49.81] 03.20.91.49.81
> <+33320914981> | [image: 23 rue du chemin de fer , 59100 , Roubaix] 23 rue
> du chemin de fer, 59100, Roubaix
> <https://www.openstreetmap.org/#map=18/50.69454/3.16455>
>