OpenLiberty / open-liberty

Open Liberty is a highly composable, fast to start, dynamic application server runtime environment
https://openliberty.io
Eclipse Public License 2.0
1.15k stars 592 forks source link

Unable to start spring boot 3.1.5 application with open Open Liberty 23.0.0.9/wlp-1.0.81.cl230920230904-1158) on Eclipse OpenJ9 VM, version 17.0.10+7 (en_US) #29160

Closed mmenezes closed 3 months ago

mmenezes commented 3 months ago

when I start my application on a jdk 17 docker image it comes packaged with Open Liberty 23.0.0.9/wlp-1.0.81.cl230920230904-1158) on Eclipse OpenJ9 VM, version 17.0.10+7 (en_US). This causes the spring boot application to fail to boot.

following is the error in bold:

Launching defaultServer (Open Liberty 23.0.0.9/wlp-1.0.81.cl230920230904-1158) on Eclipse OpenJ9 VM, version 17.0.10+7 (en_US) [AUDIT ] CWWKE0001I: The server defaultServer has been launched. [AUDIT ] CWWKG0093A: Processing configuration drop-ins resource: /opt/ol/wlp/usr/servers/defaultServer/configDropins/defaults/keystore.xml [AUDIT ] CWWKG0093A: Processing configuration drop-ins resource: /opt/ol/wlp/usr/servers/defaultServer/configDropins/defaults/open-default-port.xml [WARNING ] CWWKS3103W: There are no users defined for the BasicRegistry configuration of ID com.ibm.ws.security.registry.basic.config[basic]. [AUDIT ] CWWKZ0058I: Monitoring dropins for applications. [AUDIT ] CWWKI0001I: The CORBA name server is now available at corbaloc:iiop:localhost:2809/NameService. [WARNING ] SRVE9967W: The manifest class path jakarta.activation-api.jar can not be found in jar file file:/opt/ol/wlp/usr/servers/defaultServer/apps/expanded/sw-license-compliance-api.war/WEB-INF/lib/com.sun.xml.bind-jaxb-core-4.0.5.jar or its parent. [WARNING ] SRVE9967W: The manifest class path jakarta.xml.bind-api.jar can not be found in jar file file:/opt/ol/wlp/usr/servers/defaultServer/apps/expanded/sw-license-compliance-api.war/WEB-INF/lib/com.sun.xml.bind-jaxb-core-4.0.5.jar or its parent. [WARNING ] SRVE9967W: The manifest class path pdq.jar can not be found in jar file file:/opt/ol/wlp/usr/servers/defaultServer/apps/expanded/sw-license-compliance-api.war/WEB-INF/lib/db2jcc-db2jcc4.jar or its parent. [WARNING ] SRVE9967W: The manifest class path jaxb-core.jar can not be found in jar file file:/opt/ol/wlp/usr/servers/defaultServer/apps/expanded/sw-license-compliance-api.war/WEB-INF/lib/jaxb-impl-4.0.5.jar or its parent. [WARNING ] SRVE9967W: The manifest class path angus-activation.jar can not be found in jar file file:/opt/ol/wlp/usr/servers/defaultServer/apps/expanded/sw-license-compliance-api.war/WEB-INF/lib/jaxb-impl-4.0.5.jar or its parent. [WARNING ] SRVE9967W: The manifest class path jakarta.activation-api.jar can not be found in jar file file:/opt/ol/wlp/usr/servers/defaultServer/apps/expanded/sw-license-compliance-api.war/WEB-INF/lib/com.sun.xml.bind-jaxb-core-4.0.5.jar or its parent. [WARNING ] SRVE9967W: The manifest class path jakarta.xml.bind-api.jar can not be found in jar file file:/opt/ol/wlp/usr/servers/defaultServer/apps/expanded/sw-license-compliance-api.war/WEB-INF/lib/com.sun.xml.bind-jaxb-core-4.0.5.jar or its parent. [WARNING ] SRVE9967W: The manifest class path pdq.jar can not be found in jar file file:/opt/ol/wlp/usr/servers/defaultServer/apps/expanded/sw-license-compliance-api.war/WEB-INF/lib/db2jcc-db2jcc4.jar or its parent. [WARNING ] SRVE9967W: The manifest class path jaxb-core.jar can not be found in jar file file:/opt/ol/wlp/usr/servers/defaultServer/apps/expanded/sw-license-compliance-api.war/WEB-INF/lib/jaxb-impl-4.0.5.jar or its parent. [WARNING ] SRVE9967W: The manifest class path angus-activation.jar can not be found in jar file file:/opt/ol/wlp/usr/servers/defaultServer/apps/expanded/sw-license-compliance-api.war/WEB-INF/lib/jaxb-impl-4.0.5.jar or its parent. [ERROR ] CWWKZ0002E: An exception occurred while starting the application sw-license-compliance-api. The exception message was: com.ibm.ws.container.service.metadata.MetaDataException: com.ibm.wsspi.adaptable.module.UnableToAdaptException: com.ibm.ws.javaee.ddmodel.DDParser$ParseException: CWWKC2263E: XXXXXX : WEB-INF/lib/spring-web-6.0.19.jar : META-INF/web-fragment.xml deployment descriptor on line 5 specifies version 50, which is higher than the current provisioned version 40. [AUDIT ] CWWKF0012I: The server installed the following features: [appClientSupport-1.0, appSecurity-2.0, appSecurity-3.0, batch-1.0, beanValidation-2.0, cdi-2.0, concurrent-1.0, distributedMap-1.0, ejb-3.2, ejbHome-3.2, ejbLite-3.2, ejbPersistentTimer-3.2, ejbRemote-3.2, el-3.0, j2eeManagement-1.1, jacc-1.5, jaspic-1.1, javaMail-1.6, javaee-8.0, jaxb-2.2, jaxrs-2.1, jaxrsClient-2.1, jaxws-2.2, jca-1.7, jcaInboundSecurity-1.0, jdbc-4.2, jms-2.0, jndi-1.0, jpa-2.2, jpaContainer-2.2, jsf-2.3, jsonb-1.0, jsonp-1.1, jsp-2.3, managedBeans-1.0, mdb-3.2, servlet-4.0, ssl-1.0, wasJmsClient-2.0, wasJmsSecurity-1.0, wasJmsServer-1.0, webProfile-8.0, websocket-1.1]. [AUDIT ] CWWKF0011I: The defaultServer server is ready to run a smarter planet. The defaultServer server started in 23.812 seconds. [AUDIT ] CWWKE0085I: The server defaultServer is stopping because the JVM is exiting. [AUDIT ] CWWKE1100I: Waiting for up to 30 seconds for the server to quiesce. [AUDIT ] CWWKI0002I: The CORBA name server is no longer available at corbaloc:iiop:localhost:2809/NameService. [AUDIT ] CWWKE0036I: The server defaultServer stopped after 2 minutes, 49.941 seconds.

Please can you tell if there is any compatibility issue with open liberty support for spring boot version 3.1.5 maven snipet as follows

org.springframework.boot spring-boot-starter-parent 3.1.5
jhanders34 commented 3 months ago

SpringBoot 3.x requires EE 10 features to be used with Liberty, not EE 8 ones that were used with SpringBoot 2.x. It appears that you are using the javaee-8.0 feature in your server.xml. By switching to the jakartaee-10.0 feature in your server.xml, you should be able to bypass this problem.