Page tree

Michael O'Brien

Skip to end of metadata
Go to start of metadata

TOC: see Developer Guide

JVisualVM

JVisualVM is distributed with the JDK until JDK8.  In Java 9 and above run it separately via https://visualvm.github.io/download.html

Java Versions

Java 8 LTS


Java 11 LTS

see Performance#Java11support

Get 11.0.5 directly from https://www.oracle.com/technetwork/java/javase/downloads/jdk11-downloads-5066655.html

It makes sense to move from Java 8 to 11 (not 9/10 or 12/13) because 11 is the LTS until 17 becomes LTS.  Support for Java11 also is in Spring 5.1

Required for JDK 11 support (spring 5.1+)

spring-boot 2.1.x = Spring core 5.1.5

spring-boot 2.2.0-RC = Spring core 5.2.0


Therefore we need to up our spring-boot version from 2.0 to 2.1 to pickup spring 5.1 which support Java 11 https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.1-Release-Notes

To deploy SB 5.1 apps we will also need to upgrade from Tomcat 8.5 to 9.0, Hibernate to 5.3 and JUnit to 5.2


Java changes from 8 to 11 - primarily I see reactive streams as the main feature in J9 and local variable changes, concurrency improvements

Java 11 adds

+ local var lambda params and (http client, JRockit Flight Recorder, TLS 1.3)

Java 10 (discontinued) adds

+ local var type inference, threadlocal handshakes

Java 9 (discontinued) adds

+ reactive streams and (modules, jshell, concurrency updates)

Prototype with but do not put into production Java 12-13 for now until we are close to Java 17 LTS (in 18+ months)

Investigate issues with JAXB movement, Hibernate and Tomcat 9

Need a workaround for JAXB movement

https://jira.onap.org/browse/LOG-126

Caused by: java.lang.ClassNotFoundException: javax.xml.bind.ValidationException
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1291)


Maven

Maven Central HTTPS support as of 15 Jan 2020

I am running fine on my macbook pro but not on my jenkins server

Issue: During a maven build pulling new artifacts - for example switching from Spring boot 2.1.3 to 2.2.4 you can no longer pull from maven central without SSL support

Parsing POMs
Failed to transfer Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.2.4.RELEASE from/to central (http://repo.maven.apache.org/maven2): Failed to transfer file: http://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.2.4.RELEASE/spring-boot-starter-parent-2.2.4.RELEASE.pom. Return code is: 501 , ReasonPhrase:HTTPS Required.
ERROR: Failed to parse POMs
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.2.4.RELEASE from/to central (http://repo.maven.apache.org/maven2): Failed to transfer file: http://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.2.4.RELEASE/spring-boot-starter-parent-2.2.4.RELEASE.pom. Return code is: 501 , ReasonPhrase:HTTPS Required. and 'parent.relativePath' points at no local POM @ line 5, column 10

	at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:364)
	at hudson.maven.MavenEmbedder.buildProjects(MavenEmbedder.java:361)
	at hudson.maven.MavenEmbedder.readProjects(MavenEmbedder.java:331)
	at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1328)
	at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1125)
	at hudson.FilePath.act(FilePath.java:1075)


see https://github.com/microsoft/azure-pipelines-tasks/issues/12156

Add HTTPS support in Maven Builds

Use Maven 3.6.3 - and in the case of Jenkins upgrade from Maven 3.2 to 3.4 at least so that we can pull from maven central


  • No labels