Difference between revisions of "GCube Java 8 migration guide"
(→Source Code) |
|||
Line 10: | Line 10: | ||
http://www.oracle.com/technetwork/java/javase/8-compatibility-guide-2156366.html | http://www.oracle.com/technetwork/java/javase/8-compatibility-guide-2156366.html | ||
− | = | + | = PREREQUISITES = |
+ | ....... | ||
− | == Source Incompatibilities == | + | = Source Code - UNDER CONSTRUCTION= |
+ | |||
+ | == Source Incompatibilities - TO COMPLETE== | ||
* Detected at integration time (the component does not build) | * Detected at integration time (the component does not build) | ||
* animal-sniffer-maven-plugin can be used by developers to detect them at development time | * animal-sniffer-maven-plugin can be used by developers to detect them at development time | ||
− | == Behaviour Incompatibilities == | + | == Behaviour Incompatibilities - TO COMPLETE == |
* Cannot be detected at development and integration time | * Cannot be detected at development and integration time | ||
* We will need to carefully test our artifacts | * We will need to carefully test our artifacts | ||
− | == Other Incompatibilities == | + | == Other Incompatibilities - TO COMPLETE== |
+ | <div style= "color:red"> | ||
+ | * Java8 required as pre-requisited the latest TOMCAT version as reported in the https://support.d4science.org/issues/6306: | ||
+ | |||
+ | " | ||
+ | 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. | ||
− | + | </div> | |
= JVM = | = JVM = |
Revision as of 16:06, 27 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.
NOTE
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.
Java 8 compatibility guide: http://www.oracle.com/technetwork/java/javase/8-compatibility-guide-2156366.html
Contents
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
- Java8 required as pre-requisited the latest TOMCAT version as reported in the https://support.d4science.org/issues/6306:
" 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
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.
TODO: not enough results to provide guidelines and instructions
References
- Oracle releases plan
http://www.oracle.com/technetwork/java/eol-135779.html
- New features in Java 8
- 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/