在 Windows 上以无头模式运行 batch_runner.jar 时,groovy/lang/GroovyObject 未找到错误

问题描述 投票:0回答:1

我正在尝试构建一个管道来生成一个服务,该服务可以在远程计算机中设置和运行就餐交响乐模型。经过几篇文章后,似乎实现它的最简单方法是使用批处理配置以及batch_runner.jar,如官方文档中所述。

但是,当运行以下命令提示符时:

java -jar batch_runner.jar -hl -r -c path/to/cofnfig.properties

抛出异常:

INFO  13:22:33,709 repast.simphony.batch.gui.HeadlessMain - Writing batch run config file to: C:\Users\mpena\RepastSimphony-2.10.0\output\config.props
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:566)
        at repast.simphony.batch.standalone.StandAloneMain.run(StandAloneMain.java:207)
        at repast.simphony.batch.standalone.StandAloneMain.main(StandAloneMain.java:276)
Caused by: java.lang.NoClassDefFoundError: groovy/lang/GroovyObject
        at repast.simphony.batch.gui.HeadlessMain.createAntProject(HeadlessMain.java:87)
        at repast.simphony.batch.gui.HeadlessMain.run(HeadlessMain.java:66)
        at repast.simphony.batch.gui.HeadlessMain.main(HeadlessMain.java:310)

有什么想法可以解决吗? 顺便说一句:我已经在 Eclipse 发行版的插件目录中包含了命令提示符上的

-plugin_dir
标志。

谢谢!

groovy repast-simphony
1个回答
0
投票

我面临着完全相同的错误。我尝试在命令行中将 groovy-all.jar 文件添加到类路径中:

java -classpath path\to\groovy-all-2.4.15.jar batch_runner.jar -hl -r -c path\to\batch_configuration.properties

但错误保持不变:

    INFO  17:21:24,232 repast.simphony.batch.gui.HeadlessMain - Writing batch run config file to: C:\Users\14
62639\git\IFMAS\output\config.props
java.lang.reflect.InvocationTargetException
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:7
7)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
l.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at repast.simphony.batch.standalone.StandAloneMain.run(StandAloneMain.java:207)
        at repast.simphony.batch.standalone.StandAloneMain.main(StandAloneMain.java:276)
Caused by: java.lang.NoClassDefFoundError: groovy/lang/GroovyObject
        at repast.simphony.batch.gui.HeadlessMain.createAntProject(HeadlessMain.java:87)
        at repast.simphony.batch.gui.HeadlessMain.run(HeadlessMain.java:66)
        at repast.simphony.batch.gui.HeadlessMain.main(HeadlessMain.java:310)
        ... 6 more
Caused by: java.lang.ClassNotFoundException: groovy.lang.GroovyObject
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
        ... 9 more

问题解决了吗?

© www.soinside.com 2019 - 2024. All rights reserved.