发生了非法的反射访问操作

时间:2019-05-17 14:01:22

标签: java groovy ide intellij-13

我尝试在groovy中运行IntelliJ,但收到错误消息:

/Library/Java/JavaVirtualMachines/openjdk-12.0.1.jdk/Contents/Home/bin/java -Dtools.jar=/Library/Java/JavaVirtualMachines/openjdk-12.0.1.jdk/Contents/Home/lib/tools.jar -Dgroovy.home=/path/to/project/groovy-2.5.7 -Dgroovy.starter.conf=/path/to/project/groovy-2.5.7/conf/groovy-starter.conf -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar" com.intellij.rt.execution.CommandLineWrapper /private/var/folders/bh/m7vk09j54m1gmmxkgsdb5r0w0000gn/T/idea_classpath818724450 org.codehaus.groovy.tools.GroovyStarter --conf /path/to/project/groovy-2.5.7/conf/groovy-starter.conf --main org.codehaus.groovy.tools.shell.Main --classpath .:/path/to/project/groovy-2.5.7/lib/ant-1.9.13.jar:/path/to/project/groovy-2.5.7/lib/ant-antlr-1.9.13.jar:/path/to/project/groovy-2.5.7/lib/ant-junit-1.9.13.jar:/path/to/project/groovy-2.5.7/lib/ant-launcher-1.9.13.jar:/path/to/project/groovy-2.5.7/lib/apiguardian-api-1.0.0.jar:/path/to/project/groovy-2.5.7/lib/bsf-2.4.0.jar:/path/to/project/groovy-2.5.7/lib/commons-cli-1.4.jar:/path/to/project/groovy-2.5.7/lib/commons-logging-1.2.jar:/path/to/project/groovy-2.5.7/lib/gpars-1.2.1.jar:/path/to/project/groovy-2.5.7/lib/groovy-2.5.7.jar:/path/to/project/groovy-2.5.7/lib/groovy-ant-2.5.7.jar:/path/to/project/groovy-2.5.7/lib/groovy-bsf-2.5.7.jar:/path/to/project/groovy-2.5.7/lib/groovy-cli-commons-2.5.7.jar:/path/to/project/groovy-2.5.7/lib/groovy-cli-picocli-2.5.7.jar:/path/to/project/groovy-2.5.7/lib/groovy-console-2.5.7.jar:/path/to/project/groovy-2.5.7/lib/groovy-datetime-2.5.7.jar:/path/to/project/groovy-2.5.7/lib/groovy-dateutil-2.5.7.jar:/path/to/project/groovy-2.5.7/lib/groovy-docgenerator-2.5.7.jar:/path/to/project/groovy-2.5.7/lib/groovy-groovydoc-2.5.7.jar:/path/to/project/groovy-2.5.7/lib/groovy-groovysh-2.5.7.jar:/path/to/project/groovy-2.5.7/lib/groovy-jaxb-2.5.7.jar:/path/to/project/groovy-2.5.7/lib/groovy-jmx-2.5.7.jar:/path/to/project/groovy-2.5.7/lib/groovy-json-2.5.7.jar:/path/to/project/groovy-2.5.7/lib/groovy-json-direct-2.5.7.jar:/path/to/project/groovy-2.5.7/lib/groovy-jsr223-2.5.7.jar:/path/to/project/groovy-2.5.7/lib/groovy-macro-2.5.7.jar:/path/to/project/groovy-2.5.7/lib/groovy-nio-2.5.7.jar:/path/to/project/groovy-2.5.7/lib/groovy-servlet-2.5.7.jar:/path/to/project/groovy-2.5.7/lib/groovy-sql-2.5.7.jar:/path/to/project/groovy-2.5.7/lib/groovy-swing-2.5.7.jar:/path/to/project/groovy-2.5.7/lib/groovy-templates-2.5.7.jar:/path/to/project/groovy-2.5.7/lib/groovy-test-2.5.7.jar:/path/to/project/groovy-2.5.7/lib/groovy-test-junit5-2.5.7.jar:/path/to/project/groovy-2.5.7/lib/groovy-testng-2.5.7.jar:/path/to/project/groovy-2.5.7/lib/groovy-xml-2.5.7.jar:/path/to/project/groovy-2.5.7/lib/hamcrest-core-1.3.jar:/path/to/project/groovy-2.5.7/lib/ivy-2.4.0.jar:/path/to/project/groovy-2.5.7/lib/jansi-1.17.1.jar:/path/to/project/groovy-2.5.7/lib/javax.servlet-api-3.0.1.jar:/path/to/project/groovy-2.5.7/lib/jcommander-1.72.jar:/path/to/project/groovy-2.5.7/lib/jline-2.14.6.jar:/path/to/project/groovy-2.5.7/lib/jsp-api-2.0.jar:/path/to/project/groovy-2.5.7/lib/jsr166y-1.7.0.jar:/path/to/project/groovy-2.5.7/lib/junit-4.12.jar:/path/to/project/groovy-2.5.7/lib/junit-jupiter-api-5.4.0.jar:/path/to/project/groovy-2.5.7/lib/junit-jupiter-engine-5.4.0.jar:/path/to/project/groovy-2.5.7/lib/junit-platform-commons-1.4.0.jar:/path/to/project/groovy-2.5.7/lib/junit-platform-engine-1.4.0.jar:/path/to/project/groovy-2.5.7/lib/junit-platform-launcher-1.4.0.jar:/path/to/project/groovy-2.5.7/lib/multiverse-core-0.7.0.jar:/path/to/project/groovy-2.5.7/lib/opentest4j-1.1.1.jar:/path/to/project/groovy-2.5.7/lib/picocli-3.9.5.jar:/path/to/project/groovy-2.5.7/lib/qdox-1.12.1.jar:/path/to/project/groovy-2.5.7/lib/testng-6.13.1.jar:/path/to/project/groovy-2.5.7/lib/xstream-1.4.10.jar
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:/path/to/project/groovy-2.5.7/lib/groovy-2.5.7.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$1
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
java.lang.reflect.InvocationTargetException
    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:567)
    at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:110)
    at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:128)
    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:567)
    at com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:66)
Caused by: java.lang.NoClassDefFoundError: Unable to load class org.apache.groovy.dateutil.extensions.DateUtilExtensions due to missing dependency java/sql/Date
    at org.codehaus.groovy.vmplugin.v5.Java5.configureClassNode(Java5.java:409)
    at org.codehaus.groovy.ast.ClassNode.lazyClassInit(ClassNode.java:280)
    at org.codehaus.groovy.ast.ClassNode.getMethods(ClassNode.java:400)
    at org.codehaus.groovy.macro.transform.MacroMethodsCache.scanExtClasses(MacroMethodsCache.java:88)
    at org.codehaus.groovy.macro.transform.MacroMethodsCache.access$000(MacroMethodsCache.java:45)
    at org.codehaus.groovy.macro.transform.MacroMethodsCache$2.onModule(MacroMethodsCache.java:69)
    at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromProperties(ExtensionModuleScanner.java:87)
    at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromMetaInf(ExtensionModuleScanner.java:81)
    at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanClasspathModulesFrom(ExtensionModuleScanner.java:63)
    at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanClasspathModules(ExtensionModuleScanner.java:54)
    at org.codehaus.groovy.macro.transform.MacroMethodsCache.getMacroMethodsFromClassLoader(MacroMethodsCache.java:76)
    at org.codehaus.groovy.macro.transform.MacroMethodsCache$1.provide(MacroMethodsCache.java:53)
    at org.codehaus.groovy.macro.transform.MacroMethodsCache$1.provide(MacroMethodsCache.java:50)
    at org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache.getAndPut(ConcurrentCommonCache.java:147)
    at org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache.getAndPut(ConcurrentCommonCache.java:123)
    at org.codehaus.groovy.macro.transform.MacroMethodsCache.get(MacroMethodsCache.java:50)
    at org.codehaus.groovy.macro.transform.MacroCallTransformingVisitor.findMacroMethods(MacroCallTransformingVisitor.java:117)
    at org.codehaus.groovy.macro.transform.MacroCallTransformingVisitor.visitMethodCallExpression(MacroCallTransformingVisitor.java:88)
    at org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:68)
    at org.codehaus.groovy.ast.CodeVisitorSupport.visitListOfExpressions(CodeVisitorSupport.java:324)
    at org.codehaus.groovy.ast.CodeVisitorSupport.visitTupleExpression(CodeVisitorSupport.java:229)
    at org.codehaus.groovy.ast.CodeVisitorSupport.visitArgumentlistExpression(CodeVisitorSupport.java:334)
    at org.codehaus.groovy.ast.expr.ArgumentListExpression.visit(ArgumentListExpression.java:74)
    at org.codehaus.groovy.ast.CodeVisitorSupport.visitMethodCallExpression(CodeVisitorSupport.java:182)
    at org.codehaus.groovy.macro.transform.MacroCallTransformingVisitor.visitMethodCallExpression(MacroCallTransformingVisitor.java:79)
    at org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:68)
    at org.codehaus.groovy.ast.CodeVisitorSupport.visitBinaryExpression(CodeVisitorSupport.java:195)
    at org.codehaus.groovy.ast.CodeVisitorSupport.visitDeclarationExpression(CodeVisitorSupport.java:296)
    at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitDeclarationExpression(ClassCodeVisitorSupport.java:116)
    at org.codehaus.groovy.ast.expr.DeclarationExpression.visit(DeclarationExpression.java:86)
    at org.codehaus.groovy.ast.CodeVisitorSupport.visitExpressionStatement(CodeVisitorSupport.java:120)
    at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitExpressionStatement(ClassCodeVisitorSupport.java:197)
    at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)
    at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:86)
    at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:106)
    at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
    at org.codehaus.groovy.ast.MethodCallTransformation.visit(MethodCallTransformation.java:42)
    at org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:318)
    at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:965)
    at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:647)
    at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:623)
    at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:600)
    at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:390)
    at groovy.lang.GroovyClassLoader.access$300(GroovyClassLoader.java:89)
    at groovy.lang.GroovyClassLoader$5.provide(GroovyClassLoader.java:330)
    at groovy.lang.GroovyClassLoader$5.provide(GroovyClassLoader.java:327)
    at org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache.getAndPut(ConcurrentCommonCache.java:147)
    at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:325)
    at groovy.lang.GroovyShell.parseClass(GroovyShell.java:540)
    at groovy.lang.GroovyShell.parse(GroovyShell.java:552)
    at groovy.lang.GroovyShell.evaluate(GroovyShell.java:436)
    at groovy.lang.GroovyShell.evaluate(GroovyShell.java:475)
    at groovy.lang.GroovyShell.evaluate(GroovyShell.java:446)
    at org.codehaus.groovy.tools.shell.util.PackageHelperImpl.getPackagesAndClassesFromJigsaw(PackageHelperImpl.groovy:149)
    at org.codehaus.groovy.tools.shell.util.PackageHelperImpl.getPackages(PackageHelperImpl.groovy:122)
    at org.codehaus.groovy.tools.shell.util.PackageHelperImpl.initializePackages(PackageHelperImpl.groovy:59)
    at org.codehaus.groovy.tools.shell.util.PackageHelperImpl.<init>(PackageHelperImpl.groovy:49)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
    at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:80)
    at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:59)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:237)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:249)
    at org.codehaus.groovy.tools.shell.Groovysh.<init>(Groovysh.groovy:112)
    at org.codehaus.groovy.tools.shell.Groovysh.<init>(Groovysh.groovy:101)
    at org.codehaus.groovy.tools.shell.Groovysh.<init>(Groovysh.groovy:140)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
    at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:80)
    at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:59)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:237)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:257)
    at org.codehaus.groovy.tools.shell.Main.<init>(Main.groovy:65)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
    at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:80)
    at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:59)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:237)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:257)
    at org.codehaus.groovy.tools.shell.Main.main(Main.groovy:158)
    ... 11 more

Process finished with exit code 1

我搜索了它,但没有找到任何解决方案。

0 个答案:

没有答案