I am trying to upgrade to the latest Gatling version. I am doing it step by step. My current version is 3.6.1 and I am trying to move to 3.7.6.
When running the simulation I get this error:
java.lang.IllegalAccessException: class io.netty.util.internal.PlatformDependent0$6 cannot access class jdk.internal.misc.Unsafe (in module java.base) because module java.base does not export jdk.internal.misc to unnamed module @38af9828
at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361)
at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:591)
at java.base/java.lang.reflect.Method.invoke(Method.java:558)
at io.netty.util.internal.PlatformDependent0$6.run(PlatformDependent0.java:375)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at io.netty.util.internal.PlatformDependent0.<clinit>(PlatformDependent0.java:366)
at io.netty.util.internal.PlatformDependent.isAndroid(PlatformDependent.java:294)
at io.netty.util.internal.PlatformDependent.<clinit>(PlatformDependent.java:88)
at io.netty.util.internal.ClassInitializerUtil.tryLoadClasses(ClassInitializerUtil.java:32)
at io.netty.channel.epoll.Native.<clinit>(Native.java:72)
at io.netty.channel.epoll.Epoll.<clinit>(Epoll.java:40)
at io.gatling.netty.util.Transports.newEventLoopGroup(Transports.java:40)
at io.gatling.app.Gatling$.start(Gatling.scala:83)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:49)
at io.gatling.app.Gatling$.main(Gatling.scala:38)
at io.gatling.app.Gatling.main(Gatling.scala)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at io.gatling.plugin.util.ForkMain.runMain(ForkMain.java:67)
at io.gatling.plugin.util.ForkMain.main(ForkMain.java:35)
11:36:01.405 [DEBUG] i.n.u.i.PlatformDependent0 - java.nio.DirectByteBuffer.<init>(long, int): available
11:36:01.405 [DEBUG] i.n.u.i.PlatformDependent - sun.misc.Unsafe: available
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by io.netty.util.internal.ReflectionUtil (file:/C:/Users/ZZ00ET704/.m2/repository/io/netty/netty-common/4.1.74.Final/netty-common-4.1.74.Final.jar) to constructor java.nio.DirectByteBuffer(long,int)
WARNING: Please consider reporting this to the maintainers of io.netty.util.internal.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
I am using Java 11. The Maven version is 3.8.1.
Can you please help? ![]()
I tried doing this:
mvn clean gatling:test --add-opens=java.base/jdk.internal.misc=ALL-UNNAMED -Dgatling.simulationClass=AddToCartStressTestSimulation -DRAMP_DURATION_MINUTES=1 -DUSERS=1 -DPROXY_ENABLED=true -Dio.netty.tryReflectionSetAccessible=true
But it doesn’t work, I get the error:
Unable to parse command line options: Unrecognized option: --add-opens...