JVM Arguments not working for JDK11

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

JVM Arguments not working for JDK11

Ankit Tomar
Hi Team,

I need to pass jvmArguments in the plugin but they are not working.
We are using embedded cassandra in our application and it tries to access
JDK's internal classes and after JDK 11 Java has put strict checks on
internal class access using reflection . There is one work-around for it
that is to pass packages to access using *--add-exports *option .

I need to pass below option to plugin:

-Djdk.attach.allowAttachSelf=true --add-exports
java.base/jdk.internal.misc=ALL-UNNAMED --add-exports
java.base/jdk.internal.ref=ALL-UNNAMED --add-exports
java.base/sun.nio.ch=ALL-UNNAMED
--add-exports
java.management.rmi/com.sun.jmx.remote.internal.rmi=ALL-UNNAMED
--add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED --add-exports
java.rmi/sun.rmi.server=ALL-UNNAMED --add-exports
java.sql/java.sql=ALL-UNNAMED  --add-opens
java.base/java.lang.module=ALL-UNNAMED --add-opens
java.base/jdk.internal.loader=ALL-UNNAMED --add-opens
java.base/jdk.internal.ref=ALL-UNNAMED --add-opens
java.base/jdk.internal.reflect=ALL-UNNAMED --add-opens
java.base/jdk.internal.math=ALL-UNNAMED --add-opens
java.base/jdk.internal.module=ALL-UNNAMED --add-opens
java.base/jdk.internal.util.jar=ALL-UNNAMED --add-opens
jdk.management/com.sun.management.internal=ALL-UNNAMED

Please suggest how to pass these arguments.

Thanks & Regards,
Ankit
Reply | Threaded
Open this post in threaded view
|

Re: JVM Arguments not working for JDK11

Ankit Tomar
On Tue, Jun 2, 2020 at 11:21 PM Ankit Tomar <[hidden email]>
wrote:

> Hi Team,
>
> I need to pass jvmArguments in the plugin but they are not working.
> We are using embedded cassandra in our application and it tries to access
> JDK's internal classes and after JDK 11 Java has put strict checks on
> internal class access using reflection . There is one work-around for it
> that is to pass packages to access using *--add-exports *option .
>
> I need to pass below option to plugin:
>
> -Djdk.attach.allowAttachSelf=true --add-exports
> java.base/jdk.internal.misc=ALL-UNNAMED --add-exports
> java.base/jdk.internal.ref=ALL-UNNAMED --add-exports java.base/sun.nio.ch=ALL-UNNAMED
> --add-exports
> java.management.rmi/com.sun.jmx.remote.internal.rmi=ALL-UNNAMED
> --add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED --add-exports
> java.rmi/sun.rmi.server=ALL-UNNAMED --add-exports
> java.sql/java.sql=ALL-UNNAMED  --add-opens
> java.base/java.lang.module=ALL-UNNAMED --add-opens
> java.base/jdk.internal.loader=ALL-UNNAMED --add-opens
> java.base/jdk.internal.ref=ALL-UNNAMED --add-opens
> java.base/jdk.internal.reflect=ALL-UNNAMED --add-opens
> java.base/jdk.internal.math=ALL-UNNAMED --add-opens
> java.base/jdk.internal.module=ALL-UNNAMED --add-opens
> java.base/jdk.internal.util.jar=ALL-UNNAMED --add-opens
> jdk.management/com.sun.management.internal=ALL-UNNAMED
>
> Please suggest how to pass these arguments.
>
> Thanks & Regards,
> Ankit
>
>
Reply | Threaded
Open this post in threaded view
|

Re: JVM Arguments not working for JDK11

Ankit Tomar
In reply to this post by Ankit Tomar
Missed plugin name, I am using appassembler-maven-plugin
I have tried <systemProperty> and </extraJvmArguments> but both are not
working.

Thanks & Regards,
Ankit


On Tue, Jun 2, 2020 at 11:21 PM Ankit Tomar <[hidden email]>
wrote:

> Hi Team,
>
> I need to pass jvmArguments in the plugin but they are not working.
> We are using embedded cassandra in our application and it tries to access
> JDK's internal classes and after JDK 11 Java has put strict checks on
> internal class access using reflection . There is one work-around for it
> that is to pass packages to access using *--add-exports *option .
>
> I need to pass below option to plugin:
>
> -Djdk.attach.allowAttachSelf=true --add-exports
> java.base/jdk.internal.misc=ALL-UNNAMED --add-exports
> java.base/jdk.internal.ref=ALL-UNNAMED --add-exports java.base/sun.nio.ch=ALL-UNNAMED
> --add-exports
> java.management.rmi/com.sun.jmx.remote.internal.rmi=ALL-UNNAMED
> --add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED --add-exports
> java.rmi/sun.rmi.server=ALL-UNNAMED --add-exports
> java.sql/java.sql=ALL-UNNAMED  --add-opens
> java.base/java.lang.module=ALL-UNNAMED --add-opens
> java.base/jdk.internal.loader=ALL-UNNAMED --add-opens
> java.base/jdk.internal.ref=ALL-UNNAMED --add-opens
> java.base/jdk.internal.reflect=ALL-UNNAMED --add-opens
> java.base/jdk.internal.math=ALL-UNNAMED --add-opens
> java.base/jdk.internal.module=ALL-UNNAMED --add-opens
> java.base/jdk.internal.util.jar=ALL-UNNAMED --add-opens
> jdk.management/com.sun.management.internal=ALL-UNNAMED
>
> Please suggest how to pass these arguments.
>
> Thanks & Regards,
> Ankit
>
>
Reply | Threaded
Open this post in threaded view
|

Re: JVM Arguments not working for JDK11

Benjamin Marwell
Hi Ankit,

the appassembler-maven-plugin [1] is maintained by mojohaus, they have
a different mailing list on google groups:
https://www.mojohaus.org/mail-lists.html

HTH
Ben

[1] https://www.mojohaus.org/appassembler/appassembler-maven-plugin/

Am Do., 4. Juni 2020 um 00:46 Uhr schrieb Ankit Tomar
<[hidden email]>:

>
> Missed plugin name, I am using appassembler-maven-plugin
> I have tried <systemProperty> and </extraJvmArguments> but both are not
> working.
>
> Thanks & Regards,
> Ankit
>
>
> On Tue, Jun 2, 2020 at 11:21 PM Ankit Tomar <[hidden email]>
> wrote:
>
> > Hi Team,
> >
> > I need to pass jvmArguments in the plugin but they are not working.
> > We are using embedded cassandra in our application and it tries to access
> > JDK's internal classes and after JDK 11 Java has put strict checks on
> > internal class access using reflection . There is one work-around for it
> > that is to pass packages to access using *--add-exports *option .
> >
> > I need to pass below option to plugin:
> >
> > -Djdk.attach.allowAttachSelf=true --add-exports
> > java.base/jdk.internal.misc=ALL-UNNAMED --add-exports
> > java.base/jdk.internal.ref=ALL-UNNAMED --add-exports java.base/sun.nio.ch=ALL-UNNAMED
> > --add-exports
> > java.management.rmi/com.sun.jmx.remote.internal.rmi=ALL-UNNAMED
> > --add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED --add-exports
> > java.rmi/sun.rmi.server=ALL-UNNAMED --add-exports
> > java.sql/java.sql=ALL-UNNAMED  --add-opens
> > java.base/java.lang.module=ALL-UNNAMED --add-opens
> > java.base/jdk.internal.loader=ALL-UNNAMED --add-opens
> > java.base/jdk.internal.ref=ALL-UNNAMED --add-opens
> > java.base/jdk.internal.reflect=ALL-UNNAMED --add-opens
> > java.base/jdk.internal.math=ALL-UNNAMED --add-opens
> > java.base/jdk.internal.module=ALL-UNNAMED --add-opens
> > java.base/jdk.internal.util.jar=ALL-UNNAMED --add-opens
> > jdk.management/com.sun.management.internal=ALL-UNNAMED
> >
> > Please suggest how to pass these arguments.
> >
> > Thanks & Regards,
> > Ankit
> >
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]