ContextMapper / context-mapper-dsl

ContextMapper DSL: A Domain-specific Language for Context Mapping & Service Decomposition
https://contextmapper.org/
Apache License 2.0
215 stars 28 forks source link

Java 17 Support #311

Closed jabrena closed 1 year ago

jabrena commented 2 years ago

Is your feature request related to a problem? Please describe.

I would like to use this library with Java 17

Currently, If I try to execute the examples with Java 17, I receive the following error:

[ERROR] org.contextmapper.standalone.example.ContextMapGeneratorExampleTest.test  Time elapsed: 0.677 s  <<< ERROR!
com.google.inject.internal.util.$ComputationException: com.google.inject.internal.util.$ComputationException: java.lang.ExceptionInInitializerError
        at org.contextmapper.standalone.example.ContextMapGeneratorExampleTest.test(ContextMapGeneratorExampleTest.java:20)
Caused by: com.google.inject.internal.util.$ComputationException: java.lang.ExceptionInInitializerError
        at org.contextmapper.standalone.example.ContextMapGeneratorExampleTest.test(ContextMapGeneratorExampleTest.java:20)
Caused by: java.lang.ExceptionInInitializerError
        at org.contextmapper.standalone.example.ContextMapGeneratorExampleTest.test(ContextMapGeneratorExampleTest.java:20)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @1e7ba8d9
        at org.contextmapper.standalone.example.ContextMapGeneratorExampleTest.test(ContextMapGeneratorExampleTest.java:20)

Describe the solution you'd like A clear and concise description of what you want to happen.

The library need to be compatible with Java 17 and Upgrade the pipelines for that JVM version.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

stefan-ka commented 2 years ago

Hi @jabrena

Thank you very much for reporting this one and sorry for the late response!

Unfortunately, we depend on Xtext regarding this matter, as our language (CML) is built with Xtext. As for now, Xtext still does not support Java 17. But they work on it: https://github.com/eclipse/xtext/issues/1982 From these release notes, I infer that they plan to release 2.26.0 in January 2022. This release should then support Java 17 or at least allow us to run Xtext-based applications on a Java 17 runtime.

Sorry that I don't have better news regarding this matter. For now, users have to run Context Mapper with Java 11.

Best regards, Stefan

FYI @socadk

smsnheck commented 1 year ago

Hi @stefan-ka correct me if I am wrong but 7 days ago the java 17 build ran successfully. When will the 6.7.0 version be released (and integrated in the CLI)?

I am very interested in a java 17 version with the new xtext version. If I can help you out please give me a hint.

Best

stefan-ka commented 1 year ago

Hi @smsnheck

Thanks for your message. Nice to hear that you are waiting for it; as probably many others :)

There were still some things to do and prepare; and since I am doing this besides my job in projects, I don't have that much time per week to work on Context Mapper.

Hovewer, the release is planned for Friday ;) I hope that is okay for you and you can wait until then...

Best regards, Stefan

smsnheck commented 1 year ago

Good morning @stefan-ka, great to hear that you are planning a release on friday :) I appreciate you working on the tool during your free time.

FYI: I am integrating your tool in my arc42-architecture documentation archetype. Therefore I can wait some days.

stefan-ka commented 1 year ago

@jabrena, @smsnheck, the release v6.7.0 of Context Mapper with Java 17 support is now available: https://contextmapper.org/news/2022/12/02/v6.7.0-released/ I will therefore close this issue. If you have any questions, feel free to contact me.

jabrena commented 1 year ago

Many thanks @stefan-ka,

I will review the tool again in coming weeks.

Have a good weekend

Juan Antonio