OpenLiberty / ci.maven

Maven plugins for managing Liberty profile servers #devops
Apache License 2.0
130 stars 91 forks source link

Using 24.0.0.8-beta in OpenLiberty jakarta-data sample causes deployment problems for feature manager #1823

Closed geziefer closed 3 months ago

geziefer commented 3 months ago

I played around with the OpenLiberty jakarta-data sample: https://github.com/OpenLiberty/sample-jakarta-data It works fine as it is checked-in there and even if I update openliberty-runtime to 24.0.0.7-beta. The sample uses openliberty-plugin version 3.10.3. But if I use the currently latest 24.0.0.8-beta, I get the following error messages when starting liberty:dev:

[INFO] [ERROR   ] CWWKF0047E: The data-1.0 and io.openliberty.servlet.api-6.0 features cannot be loaded at the same time. The data-1.0 feature of Jakarta EE 11 is incompatible with the io.openliberty.servlet.api-6.0 feature of Jakarta EE 10. The configuration includes an incompatible combination of Jakarta EE features that is not supported. The data-1.0 and io.openliberty.data1.0-jdbc configured features include an incompatible combination of features. Your configuration is not supported. Update the configuration to use compatible versions of the configured features that support the Jakarta EE 11 or Jakarta EE 10 programming models.
[INFO] [ERROR   ] CWWKF0033E: The singleton features cdi-4.0 and cdi-4.1 cannot be loaded at the same time.  The configured features cdi-4.0 and data-1.0 include one or more features that cause the conflict. Your configuration is not supported; update server.xml to remove incompatible features.
[INFO] [ERROR   ] CWWKF0033E: The singleton features io.openliberty.jakarta.cdi-4.0 and io.openliberty.jakarta.cdi-3.0 cannot be loaded at the same time.  The configured features data-1.0 and beanValidation-3.0 include one or more features that cause the conflict. Your configuration is not supported; update server.xml to remove incompatible features.
[INFO] [ERROR   ] CWWKF0033E: The singleton features io.openliberty.servlet.internal-6.0 and io.openliberty.servlet.internal-5.0 cannot be loaded at the same time.  The configured features restfulWS-3.1 and passwordUtilities-1.0 include one or more features that cause the conflict. Your configuration is not supported; update server.xml to remove incompatible features.
[INFO] [ERROR   ] CWWKF0033E: The singleton features io.openliberty.jakarta.expressionLanguage-5.0 and io.openliberty.jakarta.expressionLanguage-4.0 cannot be loaded at the same time.  The configured features data-1.0 and passwordUtilities-1.0 include one or more features that cause the conflict. Your configuration is not supported; update server.xml to remove incompatible features.

(Thanks to Cherryl, the messages are now in English 😉)

Additionally, when I executing "g" for automatic feature generation it results in an unknown feature: [ERROR] Failed to generate a working set of features. Error scanning the application for Liberty features: java.lang.RuntimeException: CWMIG12125E: Das unbekannte Feature data-1.0 wurde gefunden.. (Strangly, some log messages persist in German even though having switched locale - the last sentence means "Unknown feature data-1.0 found.".

I found an older, but similar problem here answered by Scott which had to do with the openliberty-plugin: https://stackoverflow.com/questions/72234497/getting-cwwkf0044e-incompatible-feature-error-using-open-liberty-with-maven-but

So has this also to do with the plugin or is somethin inconsistent in either the sample code's dependencies or OpenLiberty itself in that version?

cherylking commented 3 months ago

@geziefer There is an update coming for that sample project to use EE11 features. The data-1.0 feature was updated in the latest beta to only work with EE11 features, which is why you are seeing that failure. Once the sample project is updated, you should no longer see the error you reported in this issue.

cherylking commented 3 months ago

@geziefer See fixes provided in PR https://github.com/OpenLiberty/sample-jakarta-data/pull/85.

cherylking commented 3 months ago

I'm going to close this now. If you still encounter a problem, please open an issue on the sample repo.