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

ExceptionInInitializerError / InaccessibleObjectException: Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not "opens java.util" to unnamed module @5cde6747 #26

Closed
msingh2890 opened this issue Aug 8, 2023 · 2 comments

Comments

@msingh2890
Copy link

I am working on a tool that would take dmn files from Signavio and use drools engine to process inputs on that. While trying to set up this repository locally, I am getting the following error(which usually comes up when we are using wrong versions of JDK or incompatible versions of some dependency but I see that java version has been set to 1.8 in pom.xml file).
=== DMN EXECUTION === 2023-08-08 05:43:30,602 [main] INFO Found kmodule: file:/C:/Users/msinghchoudhary/Documents/jpmc/signavio_github/dmn-and-drools-execution-examples/target/classes/META-INF/kmodule.xml Exception in thread "main" java.lang.ExceptionInInitializerError at com.thoughtworks.xstream.XStream.setupConverters(XStream.java:990) at com.thoughtworks.xstream.XStream.<init>(XStream.java:593) at com.thoughtworks.xstream.XStream.<init>(XStream.java:515) at com.thoughtworks.xstream.XStream.<init>(XStream.java:484) at com.thoughtworks.xstream.XStream.<init>(XStream.java:430) at com.thoughtworks.xstream.XStream.<init>(XStream.java:397) at org.kie.soup.xstream.XStreamUtils.createTrustingXStream(XStreamUtils.java:120) at org.drools.compiler.kproject.models.KieModuleMarshaller.<init>(KieModuleMarshaller.java:46) at org.drools.compiler.kproject.models.KieModuleMarshaller.<clinit>(KieModuleMarshaller.java:44) at org.drools.compiler.kproject.models.KieModuleModelImpl.fromXML(KieModuleModelImpl.java:151) at org.drools.compiler.kie.builder.impl.ClasspathKieProject.fetchKModule(ClasspathKieProject.java:203) at org.drools.compiler.kie.builder.impl.ClasspathKieProject.fetchKModule(ClasspathKieProject.java:165) at org.drools.compiler.kie.builder.impl.ClasspathKieProject.discoverKieModules(ClasspathKieProject.java:133) at org.drools.compiler.kie.builder.impl.ClasspathKieProject.init(ClasspathKieProject.java:97) at org.drools.compiler.kie.builder.impl.KieContainerImpl.<init>(KieContainerImpl.java:138) at org.drools.compiler.kie.builder.impl.KieContainerImpl.<init>(KieContainerImpl.java:148) at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieClasspathContainer(KieServicesImpl.java:140) at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieClasspathContainer(KieServicesImpl.java:130) at org.drools.compiler.kie.builder.impl.KieServicesImpl.getKieClasspathContainer(KieServicesImpl.java:101) at org.drools.compiler.kie.builder.impl.KieServicesImpl.getKieClasspathContainer(KieServicesImpl.java:79) at com.signavio.examples.dmn.AbstractDmnExample.createDmnRuntime(AbstractDmnExample.java:47) at com.signavio.examples.dmn.AbstractDmnExample.<init>(AbstractDmnExample.java:36) at com.signavio.examples.dmn.SimpleDmnExample.<init>(SimpleDmnExample.java:29) at com.signavio.examples.SignavioExamples.executeDmnExamples(SignavioExamples.java:40) at com.signavio.examples.SignavioExamples.main(SignavioExamples.java:33) Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not "opens java.util" to unnamed module @5cde6747 at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354) at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178) at java.base/java.lang.reflect.Field.setAccessible(Field.java:172) at com.thoughtworks.xstream.core.util.Fields.locate(Fields.java:40) at com.thoughtworks.xstream.converters.collections.TreeMapConverter.<clinit>(TreeMapConverter.java:50) ... 25 more
Before moving to this approach(using this repo) I had been using drools kie/dmn apis and had ~45% incorrect responses, and had no support for custom functions but I was able to get it to run, unlike this one. I would really appreciate any help whatsoever in setting this up.

@msingh2890
Copy link
Author

@j-beyer @TommyNeubert @Jonas-Heinrich @tsologub : Would really appreciate the help. Please take a look

@msingh2890
Copy link
Author

RESOLVED: The pom.xml sets jdk version to 1.8, but the local jdk version for eclipse was a higher version, changing it made it work.

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