Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch Runner Can't Find Groovy #96

Open
ncollier opened this issue Sep 4, 2024 · 2 comments
Open

Batch Runner Can't Find Groovy #96

ncollier opened this issue Sep 4, 2024 · 2 comments

Comments

@ncollier
Copy link
Member

ncollier commented Sep 4, 2024

Stand alone batch runner run can't find the groovy jar

INFO  10:15:24,983 repast.simphony.batch.gui.HeadlessMain - Writing batch run config file to: <my_repast_directory>\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)
        ... 6 more
Caused by: java.lang.ClassNotFoundException: groovy.lang.GroovyObject
        at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:593)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
        ... 9 more
@ncollier
Copy link
Member Author

ncollier commented Sep 4, 2024

Groovy jar is: groovy-3.0.21-indy.jar and we use a regex to find it -

private static final String VNUM_REGEX = "(\\d+\\.)(\\d+\\.)(\\d)";
private static final String INDY_REGEX = "groovy-" + VNUM_REGEX + "-indy.jar";

The regex needs additional "+" on the last "d".

private static final String VNUM_REGEX = "(\\d+\\.)(\\d+\\.)(\\d+)";

@ncollier
Copy link
Member Author

ncollier commented Sep 4, 2024

New batch runner jar with updated regex is attached
batch_runner.jar.zip

This finds the groovy libraries but there seems to be an issue with the jvm --add-export args not being used. Continue testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant