Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java EE 8 Upgrade #4260

Closed
matthew-a-dunlap opened this issue Nov 3, 2017 · 9 comments · Fixed by #6818
Closed

Java EE 8 Upgrade #4260

matthew-a-dunlap opened this issue Nov 3, 2017 · 9 comments · Fixed by #6818
Labels
Component: Code Infrastructure formerly "Feature: Code Infrastructure"

Comments

@matthew-a-dunlap
Copy link
Contributor

At some point we should upgrade to Java EE 8 to gain the power of new java technology and remain secure.

Outcome of the #4217 spike.

@matthew-a-dunlap
Copy link
Contributor Author

[Info from #4217]

Java EE 8: Unsure, blocked by errors still present in Glassfish 5, also facing a number of issues on its own or ones compounded with Glassfish 5.

  • Depricated api errors when building, but build does work
  • Not supported by Netbeans yet, had to manually switch over Java EE 8 libraries. Different errors have come forth when enabling different Java EE 8 libraries, referred to https://stackoverflow.com/questions/45852077/netbeans-how-to-add-a-javaee-version and http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/index.html#8
  • Error with all enabled: On launch I get the error below. I could try adding and removing parts of Java EE 8 to see what other errors are there but I'm not sure its worth the work. This is especially true because I can't make it much farther as there are Glassfish 5 errors that I cannot pass.
    /dataverse.xhtml @20,83 value="#{DataversePage.dataverse.id}": Target Unreachable, identifier 'DataversePage' resolved to null javax.el.PropertyNotFoundException: /dataverse.xhtml @20,83 value="#{DataversePage.dataverse.id}": Target Unreachable, identifier 'DataversePage' resolved to null
  • Error with EE 8 core & servlet 4.0:
Version:1.0 StartHTML:0000000100 EndHTML:0000010413 StartFragment:0000000100 EndFragment:0000010413 [2017-10-31T15:44:54.805-0400] [glassfish 5.0] [WARNING] [] [javax.enterprise.resource.webcontainer.jsf.lifecycle] [tid: _ThreadID=31 _ThreadName=http-listener-1(5)] [timeMillis: 1509479094
805] [levelValue: 900] [[ /dataverse.xhtml @20,83 value="#{DataversePage.dataverse.id}": Target Unreachable, identifier 'DataversePage' resolved to null javax.el.PropertyNotFoundException: /dataverse.xhtml @20,83 value="#{DataversePage.dataverse.id}": Target Unreachable, identifier 'DataversePage' resolved to null
  • Error with EE 8 core & JSF 2.3:
Version:1.0 StartHTML:0000000100 EndHTML:0000009302 StartFragment:0000000100 EndFragment:0000009302 java.lang.NullPointerException
       at edu.harvard.iq.dataverse.ControlledVocabularyValueConverter.getAsObject(ControlledVocabularyValueConverter.java:29)
       at com.sun.faces.renderkit.html_basic.MenuRenderer.convertSelectManyValuesForCollection(MenuRenderer.java:457)
       at com.sun.faces.renderkit.html_basic.MenuRenderer.convertSelectManyValuesForModel(MenuRenderer.java:333)
       at com.sun.faces.renderkit.html_basic.MenuRenderer.convertSelectManyValue(MenuRenderer.java:133)
       at com.sun.faces.renderkit.html_basic.MenuRenderer.getConvertedValue(MenuRenderer.java:305)
  • Error with EE 8 core only:
Version:1.0 StartHTML:0000000100 EndHTML:0000009302 StartFragment:0000000100 EndFragment:0000009302 java.lang.NullPointerException
       at edu.harvard.iq.dataverse.ControlledVocabularyValueConverter.getAsObject(ControlledVocabularyValueConverter.java:29)
       at com.sun.faces.renderkit.html_basic.MenuRenderer.convertSelectManyValuesForCollection(MenuRenderer.java:457)
       at com.sun.faces.renderkit.html_basic.MenuRenderer.convertSelectManyValuesForModel(MenuRenderer.java:333)
       at com.sun.faces.renderkit.html_basic.MenuRenderer.convertSelectManyValue(MenuRenderer.java:133)
       at com.sun.faces.renderkit.html_basic.MenuRenderer.getConvertedValue(MenuRenderer.java:305)
       at org.primefaces.component.selectmanycheckbox.SelectManyCheckboxRenderer.getConvertedValue(SelectManyCheckboxRenderer.java:40)
...

This is as far as I went, I need a better understanding of which resources we need to upgrade. I can try to fix these first lines of issues and push forward but its hard for me to tell if issues from Glassfish 5 could also be @ play.

@poikilotherm
Copy link
Contributor

Note: the dependency on Google Gson and Jackson within the Dataverse codebase should be avoiding when upgrading to EE 8, as JSON data binding is part of the standard now.

poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Nov 7, 2018
Needed because the transitive dependency from AWS has been used before.
Thus this relates to IQSS#5274. As best practise, code should not rely on
those deps but add a direct dependency.

For the sake of working on IQSS#4260 (Java EE 8) at some point in the future, please
remember to refactor the code using Jackson (and Gson) and remove it
in favor of Java EE 8 native JSON-B and JSON-P support.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Nov 7, 2018
Needed because the transitive dependency from AWS has been used before.
Thus this relates to IQSS#5274. As best practise, code should not rely on
those deps but add a direct dependency.

For the sake of working on IQSS#4260 (Java EE 8) at some point in the future, please
remember to refactor the code using Jackson (and Gson) and remove it
in favor of Java EE 8 native JSON-B and JSON-P support.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Nov 14, 2018
Needed because the transitive dependency from AWS has been used before.
Thus this relates to IQSS#5274. As best practise, code should not rely on
those deps but add a direct dependency.

For the sake of working on IQSS#4260 (Java EE 8) at some point in the future, please
remember to refactor the code using Jackson (and Gson) and remove it
in favor of Java EE 8 native JSON-B and JSON-P support.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Nov 14, 2018
Needed because the transitive dependency from AWS has been used before.
Thus this relates to IQSS#5274. As best practise, code should not rely on
those deps but add a direct dependency.

For the sake of working on IQSS#4260 (Java EE 8) at some point in the future, please
remember to refactor the code using Jackson (and Gson) and remove it
in favor of Java EE 8 native JSON-B and JSON-P support.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Nov 15, 2018
Needed because the transitive dependency from AWS has been used before.
Thus this relates to IQSS#5274. As best practise, code should not rely on
those deps but add a direct dependency.

For the sake of working on IQSS#4260 (Java EE 8) at some point in the future, please
remember to refactor the code using Jackson (and Gson) and remove it
in favor of Java EE 8 native JSON-B and JSON-P support.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Nov 21, 2018
Needed because the transitive dependency from AWS has been used before.
Thus this relates to IQSS#5274. As best practise, code should not rely on
those deps but add a direct dependency.

For the sake of working on IQSS#4260 (Java EE 8) at some point in the future, please
remember to refactor the code using Jackson (and Gson) and remove it
in favor of Java EE 8 native JSON-B and JSON-P support.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Nov 21, 2018
Needed because the transitive dependency from AWS has been used before.
Thus this relates to IQSS#5274. As best practise, code should not rely on
those deps but add a direct dependency.

For the sake of working on IQSS#4260 (Java EE 8) at some point in the future, please
remember to refactor the code using Jackson (and Gson) and remove it
in favor of Java EE 8 native JSON-B and JSON-P support.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Nov 21, 2018
Needed because the transitive dependency from AWS has been used before.
Thus this relates to IQSS#5274. As best practise, code should not rely on
those deps but add a direct dependency.

For the sake of working on IQSS#4260 (Java EE 8) at some point in the future, please
remember to refactor the code using Jackson (and Gson) and remove it
in favor of Java EE 8 native JSON-B and JSON-P support.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Nov 21, 2018
Needed because the transitive dependency from AWS has been used before.
Thus this relates to IQSS#5274. As best practise, code should not rely on
those deps but add a direct dependency.

For the sake of working on IQSS#4260 (Java EE 8) at some point in the future, please
remember to refactor the code using Jackson (and Gson) and remove it
in favor of Java EE 8 native JSON-B and JSON-P support.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Nov 29, 2018
Needed because the transitive dependency from AWS has been used before.
Thus this relates to IQSS#5274. As best practise, code should not rely on
those deps but add a direct dependency.

For the sake of working on IQSS#4260 (Java EE 8) at some point in the future, please
remember to refactor the code using Jackson (and Gson) and remove it
in favor of Java EE 8 native JSON-B and JSON-P support.
@poikilotherm
Copy link
Contributor

Bad news on Jakarta EE and the future. https://eclipse-foundation.blog/2019/05/03/jakarta-ee-java-trademarks/

There is some hope for backward compatibility via application server bytecode manipulation, see https://www.tomitribe.com/blog/jakarta-ee-a-new-hope

Time to get #4172 solved, right?

@pdurbin
Copy link
Member

pdurbin commented May 6, 2019

@poikilotherm I thought maybe you'd say we should take a closer look at your MicroProfile idea in #5187 😄

I heard the Jakarta EE news in the #faif channel on freenode over the weekend. That's the Free as in Freedom podcast. The first link I saw ends with "This is the day when Java EE was killed by Oracle." https://headcrashing.wordpress.com/2019/05/03/negotiations-failed-how-oracle-killed-java-ee/ . Next I read the board minutes: https://www.eclipse.org/org/foundation/boardminutes/2019_03_26_Minutes.pdf . There are tons of links and blog posts out there...

... and probably more since I last checked.

One thing that caught my eye is that in two days on May 8th, there will be a "Jakarta EE Community Hangout" where all of this will be discussed. The agenda/minutes doc is here: https://docs.google.com/document/d/1TH_p_m-z3v9HZyhgwW41JzXWTFIwrClGLaSDIy0Sf5w/edit?usp=sharing

The summary from that doc is this:

Eclipse Foundation Director, quote: "Eclipse and Oracle have agreed that the javax package namespace cannot be evolved by the Jakarta EE community. As well, Java trademarks such as the existing specification names cannot be used by Jakarta EE specifications."

@mheppler
Copy link
Contributor

mheppler commented Jun 26, 2019

Looking over the PrimeFaces Migration Guide while creating the Upgrade to PrimeFaces 7 #5975 issue, I noticed this related nugget of information.

7.0 to 7.1

  • PrimeFaces is now only compatible with Java8+

@pdurbin
Copy link
Member

pdurbin commented Jun 27, 2019

PrimeFaces is now only compatible with Java8+

That's fine. We already moved from Java 7 to Java 8. But thanks for the heads up.

I just learned that there's a beta of Netbeans (Apache NetBeans 11.1-beta2) that supports Java EE 8: http://mail-archives.apache.org/mod_mbox/netbeans-users/201906.mbox/%3CCACkjAxQ7FYu8xF6qO29XZdXzatNWC%3D1vz_gpWXZ7GO9Zusy28g%40mail.gmail.com%3E

@mheppler
Copy link
Contributor

🤦

poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Aug 1, 2019
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=429992

As we are stuck on Glassfish 4.1 for now (see IQSS#4172, IQSS#4248 and IQSS#4260),
we cannot simply upgrade. Meh.

This reverts commit c80aeea.
@poikilotherm
Copy link
Contributor

With the move to Payara 5 in #6230, we are moving to a Java / Jakarta EE 8 certified platform 🥳 .

While talking about #6694, @scolapasta expressed his preference for using a standardized API for JSON Data Binding instead of relying on Jackson or similar and getting to use modern tech.
As JSON-B is part of EE 8 only, upgrading will be a necessity for Dataverse 5.

As the dust settled around the Jakarta EE move, IMHO we should move to Jakarta EE 8, not Java EE 8. There is no technical difference between both (see https://jakarta.ee/specifications/platform/8/platform-spec-8.pdf#changes-in-jakarta-ee-8), but it makes Dataverse look much younger... 😉

poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Apr 17, 2020
pdurbin added a commit to poikilotherm/dataverse that referenced this issue Apr 22, 2020
We especially want to pick up the bug fix in pull request IQSS#6828.
pdurbin added a commit that referenced this issue Apr 22, 2020
@poikilotherm
Copy link
Contributor

🥳🎉🎊🍾

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Code Infrastructure formerly "Feature: Code Infrastructure"
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants