-
I am trying to use https://github.com/OHDSI/ETL-Synthea, and it only supports version 2.7.0. When I try to run synthea-with-dependencies.jar (from the 2.7.0 release), I get obscure errors like: java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.util.concurrent.atomic.AtomicLong java.util.Random.seed accessible: module java.base does not "opens java.util" to unnamed module @ea1a8d5 From my debugging it seems this has to do with the Java version. I tried installing different versions (JDK 8, JDK 11, JDK 17...), then using specifically those java.exe's to run synthea-with-dependencies.jar. I also tried building Synthea from sources, but when I follow the instructions, I get the error "Unsupported class file major version 61." I just need to run Synthea 2.7.0. Any suggestions? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
I believe I worked around this issue by using the following flags: java -jar --illegal-access=permit |
Beta Was this translation helpful? Give feedback.
-
Did fdefalco's suggested solution work? You should be able to use Java 17. You can check the version you are actually running using According to the internet, if you are using your own Gradle environment rather than the local one in this repository, then your own environment could also be configured to use a different version of Gradle or Java. If that applies to you, that might be worth exploring. |
Beta Was this translation helpful? Give feedback.
-
I tried, but couldn't get it to work. f I type If I move the This is the "least scary" error I was able to arrive at:
(followed by barrage of Java errors) My plan now is to try to dig into how to get Synthea to work, without the precompiled JAR. Thanks for the attention!! |
Beta Was this translation helpful? Give feedback.
-
For the record, Synthea support for Java 17 was added after 2.7.0. From a quick scan of closed PRs, I don't see anything that would immediately address your issue, but if you can use a newer version, I'd recommend that you do. When Synthea reads in modules, it uses a library called Gson to read in the module files and set that information on Java objects in the running environment. The permissions on what could be set were changed from Java 16 -> Java 17 and we did see it break stuff. I'm surprised to hear that it broke with Java 8. It may be that the settings you are using a triggering a path in the code we haven't hit yet. |
Beta Was this translation helpful? Give feedback.
-
Thanks, @eedrummer! I was finally able to run Synthea 2.7.0! Thanks! What I did was:
My final guess is that the problem was that I was installing older Javas (to run Synthea 2.7.0), but then merely using the old java.exe to run Kind regards, thanks for the great work! |
Beta Was this translation helpful? Give feedback.
For the record, Synthea support for Java 17 was added after 2.7.0. From a quick scan of closed PRs, I don't see anything that would immediately address your issue, but if you can use a newer version, I'd recommend that you do.
When Synthea reads in modules, it uses a library called Gson to read in the module files and set that information on Java objects in the running environment. The permissions on what could be set were changed from Java 16 -> Java 17 and we did see it break stuff. I'm surprised to hear that it broke with Java 8. It may be that the settings you are using a triggering a path in the code we haven't hit yet.