Difference between revisions of "GCube Java 8 migration guide"

From Gcube Wiki
Jump to: navigation, search
(JVM)
Line 1: Line 1:
 
This page collects the guidelines for the migration of D4Science infrastructure and the gCUbe software from Java 7 to Java 8. It also collects common issues (and their solution) experienced during the migration as reference for all gCube developers.
 
This page collects the guidelines for the migration of D4Science infrastructure and the gCUbe software from Java 7 to Java 8. It also collects common issues (and their solution) experienced during the migration as reference for all gCube developers.
 
NOTE
 
  
 
There are (few) documented incompatibilities between Java 7 and Java 8.  
 
There are (few) documented incompatibilities between Java 7 and Java 8.  
  
Running into one of them will require to refactor the component and release a new version of it.
+
Running into one of them will require to re-factor the component and release a new version of it.
  
 
Java 8 compatibility guide:
 
Java 8 compatibility guide:

Revision as of 12:16, 30 January 2017

This page collects the guidelines for the migration of D4Science infrastructure and the gCUbe software from Java 7 to Java 8. It also collects common issues (and their solution) experienced during the migration as reference for all gCube developers.

There are (few) documented incompatibilities between Java 7 and Java 8.

Running into one of them will require to re-factor the component and release a new version of it.

Java 8 compatibility guide: http://www.oracle.com/technetwork/java/javase/8-compatibility-guide-2156366.html

PREREQUISITES

.......

Source Code - UNDER CONSTRUCTION

Source Incompatibilities - TO COMPLETE

  • Detected at integration time (the component does not build)
  • animal-sniffer-maven-plugin can be used by developers to detect them at development time

Behaviour Incompatibilities - TO COMPLETE

  • Cannot be detected at development and integration time
  • We will need to carefully test our artifacts

Other Incompatibilities - TO COMPLETE

" Moving to the latest tomcat version is not so easy. We want to stuck with the distribution provided tomcat for a lot of reasons:

backport of bug and security fixes compatibility with the apr libraries In addition to that, the javassist exceptions were a cosmetic only problem in the past, and an upgrade to a newer version of javassist was planned. " The solution proposed was

  • for gCore : updating the xerces and xml-api libraries to make the gCore services working;
  • for Smartgears: upgrade on ubuntu 14.04 all the development and production infrastructure. This should be resolved the problems manifested for the javassist and xml parsing.

JVM - TO COMPLETE

JVM memory management changed in Java 8: concept of PermGen space has been replaced by Metaspace. As consequence, startup options used in Java 7 (e.g. "-XX:MaxPermSize") rae not valid anymore in JVM 8.

Set Java 8 as the default JVM for all the development servers managed by Ansible. A new provisioning run is needed to install the new packages and reconfigure the services. On the smartgears-based nodes this can be done running the playbook(s) with the tags: jdk,tomcat

TODO: not enough results to provide guidelines and instructions

List of the nodes migrated:

  • node26.d.d4science.research-infrastructures.eu migrated (no java app running on this host)
  • node24.d.d4science.research-infrastructures.eu migrated (smartgears or ghn was not running on this host, only postgresql)
  • node27.d.d4science.research-infrastructures.eu migrated (old smartgears tomcat restarted with java8)
  • obis2.i-marine.research-infrastructures.eu alias geoserver-dev2.d4science-ii.research-infrastructures.eu migrated (no java app running on this host, only postgresql)
  • dev.d4science.org migrated (no java app running on this host, only postgresql)

To migrate old ghn dev (ubuntu 8.04) as node1.d.d4science , node4.d.d4science , node5.d.d4science, new nodes are created :

  • node9-d-d4s.d4science.org
  • node4.d.d4science
  • node5.d.d4science

References

  • Oracle releases plan

http://www.oracle.com/technetwork/java/eol-135779.html

  • Compatibility guide

http://www.oracle.com/technetwork/java/javase/8-compatibility-guide-2156366.html

  • Animal Sniffer Plugin Guide

https://blog.gvsig.org/2011/07/25/hunting-api-incompatibilities-with-the-animal-sniffer-project/