Azure-Samples / open-liberty-on-aks

The project demonstrates how to prepare and deploy Java application inside Open/WebSphere Liberty on an Azure Kubernetes Service cluster.
MIT License
7 stars 19 forks source link

Adopt Jakarta EE 10 #43

Closed Emily-Jiang closed 7 months ago

Emily-Jiang commented 8 months ago

This application uses Java EE 8 and it is out of date. I would like this application to be updated to Jakarta EE 10 as @bbenz and I will need to demo this at DevNexus at the Jakarta EE track. I don't think using a Java EE 8 app is appropriate for a Jakarta EE talk. I am happy to do a PR with the namespace transform. Please let me know what you think.

Emily-Jiang commented 8 months ago

@edburns @majguo please let me know what you think

edburns commented 7 months ago

Iterating in #44 .

edburns commented 7 months ago

Hello @Emily-Jiang ,

I am working on your #43.

I am trying to configure it for use with Liberty 23.0.0.3. There is a problem in the pom.xml/server.xml. Even with a carefully vetted set of <feature> elements in the <featureManager> I still get this error at build time.

[ERROR] Failed to execute goal io.openliberty.tools:liberty-maven-plugin:3.10:install-feature (package-server) on project javaee-cafe: Error installing features for server defaultServer: CWWKF1299E: The following features could not be obtained: jaxb-4.0 restfulws-3.0 enterprisebeanslite-4.0 cdi-4.0 persistence-3.0 faces-4.0 io.openliberty.emptyHandleListContext-1.0 com.ibm.websphere.appserver.ejbliteJNDI-1.0 com.ibm.websphere.appserver.javaeePlatform7.0-jndi1.0 io.openliberty.ejbliteJPA-2.0 io.openliberty.restfulWS3.0-xmlBinding3.0 com.ibm.websphere.appserver.ejbComponentMetadataDecorator-1.0 com.ibm.websphere.appserver.jakarta-transactionContext-1.0 com.ibm.websphere.appserver.classloaderContext-1.0. Ensure that the features are valid for Open Liberty. -> [Help 1]

Can you please take a look at the pom.xml and server.xml and see if anything jumps out to you?

edburns commented 7 months ago

Problem https://github.com/Azure-Samples/open-liberty-on-aks/issues/43#issuecomment-1947605954 was fixed in c8d92a1 .

edburns commented 7 months ago

I need help getting past this error: Could not find MessageBodyWriter for response object of type: java.util.Vector of media type: application/json. Please feel free to push code to the ranch.

Deployment details See attachment 20240216-ibm-569-deployment-details.md.

Steps to reproduce

  1. Clone this repo and checkout this branch: https://github.com/azure-javaee/open-liberty-on-aks/tree/edburns-msft-ibm-524-update-to-ee-10
  2. Set your JDK to be JDK 17.
  3. Set your environment variables as in 20240216-ibm-569-deployment-details.md.
  4. cd java-app
  5. mvn clean install
  6. mvn liberty:run
  7. curl -H "Accept: application/xml" http://localhost:9080/rest/coffees
    • Note that it provides a correct result:
      <?xml version="1.0" encoding="UTF-8" standalone="yes"?><collection><coffee><id>256</id><name>decaf</name><price>1.0</price></coffee></collection>
  8. curl -H "Accept: application/json" http://localhost:9080/rest/coffees
    • Note that it provides an incorrect result:
      Could not find MessageBodyWriter for response object of type: java.util.Vector of media type: application/json

Measures tried so far