I'm facing the SecurityException error, with the example from readme, that I have no idea how to fix:
$ cat example.groovy
@GrabConfig(systemClassLoader=true)
@Grab('net.simonix.scripts:groovy-jmeter')
@groovy.transform.BaseScript net.simonix.dsl.jmeter.TestScript script
start {
plan {
group {
http 'GET http://www.example.com'
}
// optional element, shows execution progress
summary(file: 'log.jtl')
}
}
$ groovy example.groovy --help
Caught: java.lang.ExceptionInInitializerError
java.lang.ExceptionInInitializerError
at org.apache.ivy.util.url.BasicURLHandler.getURLInfo(BasicURLHandler.java:95)
at org.apache.ivy.plugins.repository.url.URLResource.init(URLResource.java:82)
at org.apache.ivy.plugins.repository.url.URLResource.exists(URLResource.java:101)
at org.apache.ivy.plugins.resolver.IBiblioResolver.listRevisionsWithMavenMetadata(IBiblioResolver.java:494)
at org.apache.ivy.plugins.resolver.IBiblioResolver.listRevisionsWithMavenMetadata(IBiblioResolver.java:485)
at org.apache.ivy.plugins.resolver.IBiblioResolver.listResources(IBiblioResolver.java:438)
at org.apache.ivy.plugins.resolver.RepositoryResolver.findDynamicResourceUsingPattern(RepositoryResolver.java:150)
at org.apache.ivy.plugins.resolver.RepositoryResolver.findResourceUsingPattern(RepositoryResolver.java:135)
at org.apache.ivy.plugins.resolver.AbstractPatternsBasedResolver.findResourceUsingPatterns(AbstractPatternsBasedResolver.java:94)
at org.apache.ivy.plugins.resolver.IBiblioResolver.findIvyFileRef(IBiblioResolver.java:109)
at org.apache.ivy.plugins.resolver.BasicResolver.getDependency(BasicResolver.java:233)
at org.apache.ivy.plugins.resolver.IBiblioResolver.getDependency(IBiblioResolver.java:557)
at org.apache.ivy.plugins.resolver.ChainResolver.getDependency(ChainResolver.java:101)
at org.apache.ivy.core.resolve.IvyNode.loadData(IvyNode.java:185)
at org.apache.ivy.core.resolve.VisitNode.loadData(VisitNode.java:284)
at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:719)
at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:798)
at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:726)
at org.apache.ivy.core.resolve.ResolveEngine.getDependencies(ResolveEngine.java:604)
at org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:250)
at org.apache.ivy.Ivy.resolve(Ivy.java:522)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Caused by: java.lang.SecurityException: Can not initialize cryptographic mechanism
... 24 more
Caused by: java.lang.SecurityException: Missing mandatory jurisdiction policy files: unlimited
... 24 more
$ java -version
java version "17.0.3" 2022-04-19 LTS
Java(TM) SE Runtime Environment (build 17.0.3+8-LTS-111)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.3+8-LTS-111, mixed mode, sharing)
$ groovy -version
Groovy Version: 3.0.7 JVM: 17.0.3 Vendor: Oracle Corporation OS: Linux
$ gradle -version
------------------------------------------------------------
Gradle 7.0.2
------------------------------------------------------------
Build time: 2021-05-14 12:02:31 UTC
Revision: 1ef1b260d39daacbf9357f9d8594a8a743e2152e
Kotlin: 1.4.31
Groovy: 3.0.7
Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM: 17.0.3 (Oracle Corporation 17.0.3+8-LTS-111)
OS: Linux 4.4.0-22000-Microsoft amd64
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
"OS: Linux 4.4.0-22000-Microsoft". I.e., it is Debian within WSL.
I went to jdk and took a look, Ma Ye, the great god’s jdk didn’t even have jre. No wonder we have to solve the strange problems these days and download a new complete jdk again.
Hi sorry to bother you @smicyk,
I'm facing the SecurityException error, with the example from readme, that I have no idea how to fix:
"OS: Linux 4.4.0-22000-Microsoft". I.e., it is Debian within WSL.
Thanks