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

Spike: Java 9 and Java EE 8 #4217

Closed
djbrooke opened this issue Oct 18, 2017 · 7 comments
Closed

Spike: Java 9 and Java EE 8 #4217

djbrooke opened this issue Oct 18, 2017 · 7 comments
Assignees

Comments

@djbrooke
Copy link
Contributor

djbrooke commented Oct 18, 2017

An investigation about what needs to be done to upgrade our infrastructure to support:

Output of this spike will be well-informed items detailing the upgrade steps and things to test.

@pdurbin
Copy link
Member

pdurbin commented Oct 24, 2017

Java 9

I don't believe it makes sense to upgrade to Java 9 at this time. It's only been out for a few weeks so Linux vendors haven't had time to package it as java-1.9.0-openjdk. We want the same easy upgrade that we had from Java 7 to Java 8 where we simply change a single digit in a yum command like we did in 1abbd77 for #2151.

The next question is, "When will we be able to simply run yum install java-1.9.0-openjdk on CentOS and get Java 9? I'm not exactly sure but we can expect java-1.9.0-openjdk to land first in Fedora and then CentOS. According to https://fedoraproject.org//wiki/Changes/Java9TechPreview Java 9 will be part of Fedora 27 and https://bugzilla.redhat.com/show_bug.cgi?id=1447237 appears to be the tracking bug for including it. We've been able to happily run the java-1.8.0-openjdk RPM on CentOS 6 and I'm not sure if that means we'll be able to run java-1.9.0-openjdk on CentOS 6 as well or if we'll need to upgrade to CentOS 7. According to the "Oracle Java SE Support Roadmap" doc at http://www.oracle.com/technetwork/java/eol-135779.html Java 8 will stop receiving security updates in Sep 2018.

@pdurbin
Copy link
Member

pdurbin commented Oct 25, 2017

Glassfish 5

Today at our architecture meeting we talked a bit about Glassfish 5 vs Payara. I believe the primary thing our customers want is security. At @bjonnh said, "I'm annoyed that we have to use horribly old software and be stuck with it." @donsizemore opened #4172 asking about Payara support.

The thing about Payara is that it's updated more regularly than Glassfish. Here's a little chart I made from a spreadsheet I made based on release dates on Wikipedia. Note how regular the Payara releases are:

glassfish-vs-payara

More regular releases probably means better security, right? I would hope so. Anyway, over at #4172 I'm asking when we should expect Payara 5 because it would be nice to upgrade to the latest major version if we can. As @landreev mentioned in the meeting today, maybe it wouldn't be too tough to support both Glassfish and Payara. I'm not sure. So far I've been hacking a bit on trying to get Dataverse running on Glassfish 5 and I assume that work will carry over fine to Payara 5. I'll push a branch once I have something to show. At a high level, we need to update the following:

  • Dataverse installer
  • Vagrant files
  • Docker files
  • Installation Guide
  • Dev Guide

We might need to change our Java code itself but I hope not. We'll see.

@pdurbin
Copy link
Member

pdurbin commented Oct 26, 2017

I missed sprint planning yesterday but I heard this issue got moved to the backlog. At standup I mentioned I'd push what I was working on to my fork, which I just did: pdurbin@d757099

@pdurbin
Copy link
Member

pdurbin commented Oct 27, 2017

I just made pull request #4244 for upgrading to Glassfish 5. I'd like to get some Code Review on it so I'll move it to that column at https://waffle.io/IQSS/dataverse

As I indicated above, it's premature to upgrade to Java 9.

I also did not bump the Java EE version from 7 to 8 in pom.xml. Let's do this in small chunks.

Along the way I also fixed #3905 and probably #2443. Basically, I started using the official installer for the first time on a dev environment. Previously I always used some variation of https://github.com/IQSS/dataverse/blob/v4.8.1/scripts/deploy/phoenix.dataverse.org/install which is much smaller and simpler (and Bash instead of Perl). My main objection to the installer originally is that it required root (that's a lot what #2443 is about) but this is no longer the case.

@matthew-a-dunlap matthew-a-dunlap self-assigned this Oct 30, 2017
@djbrooke djbrooke changed the title Spike: Java 9, Java EE 8, and Glassfish 5 Spike: Java 9 and Java EE 8 Oct 30, 2017
@matthew-a-dunlap
Copy link
Contributor

matthew-a-dunlap commented Oct 30, 2017

Java 9: Looks pretty good, I seem to have it mostly running after a few hours today, but we probably don't want to upgrade yet.

Details:

  • Tested on Oracle JDK 9.0.1+11 on osx 10.13
  • Need Netbeans 9 for Java 9 to compile easily. There is only a developer build of Netbeans 9 and no release date (but active development). May be able to work around this with digging into maven but I did not do this.
  • Builds w/o tests after cleaning up a few new ambiguous references (from new classes brought into Java 9)
  • Tests have 1 error, the root cause seems to be that MimetypesFileTypeMap() getContentType is not returning right for png. Looking like implementation weirdness from Java 9, for now I'm just leaving it broken.
  • Starts with more sql noise than I remember, but its been a while since I deployed from command line (see java 9 sql error.txt).
  • Most of the simple dataverse interactions work! Create/delete dataset/dataverse works. Create user works. Uploading data DOES NOT work (see java 9 file upload error.txt).
  • TravisCI works fine switching to Java9.
  • Glassfish 4.1 itself is unable to detect the JDK version for Java 9. Glassfish needs to be set to explicitly use Java 8.

@matthew-a-dunlap
Copy link
Contributor

matthew-a-dunlap commented Oct 31, 2017

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.

@djbrooke
Copy link
Contributor Author

djbrooke commented Nov 3, 2017

Thanks @matthew-a-dunlap for creating a well-informed issue for each upgrade. Those are here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants