Dataverse: Java EE 8 Upgrade

Created on 3 Nov 2017  路  9Comments  路  Source: IQSS/dataverse

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.

Code Infrastructure

Most helpful comment

馃う

All 9 comments

[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.

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.

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?

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

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."

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+

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

馃う

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

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... :wink:

馃コ馃帀馃帄馃嵕

Was this page helpful?
0 / 5 - 0 ratings