LabKey Server and JDK 8

LabKey Support Forum (Inactive)
LabKey Server and JDK 8 jeckels  2015-07-13 13:51
Status: Closed
 
As many of you already know, Oracle officially end-of-lifed Java/JDK 7 in April 2015:

https://www.java.com/en/download/faq/java_7.xml

As such, LabKey Server version 15.2 is the last release that supports and is tested with Java 7. As of version 15.3, we will strictly require Java 8. We encourage all developers and administrators to upgrade to Java 8, which also works well with version 15.2.

https://www.labkey.org/wiki/home/Documentation/page.view?name=supported

We recently made changes to the SVN trunk that require Java 8 to build and run the server. If you have trunk code that was partially built under Java 7 and switch to Java 8, you may encounter errors such as:

java.lang.NullPointerException
at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:532)
at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355)
at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)
at java.lang.Class.createAnnotationData(Class.java:3521)
at java.lang.Class.annotationData(Class.java:3510)
at java.lang.Class.getAnnotation(Class.java:3415)
at org.labkey.api.action.SpringActionController$DefaultActionResolver$DefaultActionDescriptor.<init>(SpringActionController.java:908)
at org.labkey.api.action.SpringActionController$DefaultActionResolver$DefaultActionDescriptor.<init>(SpringActionController.java:893)
at org.labkey.api.action.SpringActionController$DefaultActionResolver.addAction(SpringActionController.java:848)
at org.labkey.api.action.SpringActionController$DefaultActionResolver.addInnerClassActions(SpringActionController.java:841)
at org.labkey.api.action.SpringActionController$DefaultActionResolver.<init>(SpringActionController.java:826)
at org.labkey.immport.ImmPortController.<clinit>(ImmPortController.java:72)

If so, an "ant rebuild" should resolve the problem.

Thanks,
Josh
 
 
Anthony Corbett responded:  2015-09-15 07:29

Josh,

Just a follow up question about labkey client APIs and Java 8. As for SAS, it does not look like java 8 is supported in 9.4 yet, see http://support.sas.com/resources/thirdpartysupport/v94/jres.html. SAS 9.3 comes with java 6 by default and you needed TS1M2 update (everyone should have had that as it was released in 2012!) to run java 7. BTW, labkey's SAS setup wiki page still references 9.3 with JRE 6, which doesn't even work with the latest 15.2 jars build with java 7 unless you have the TS1M2 upgrade (which isn't mentioned on that page). Also, there is no reference to SAS 9.4 on the SAS setup page.

Will you still be building the client API jars using java 7? As you know the class file format between 7 and 8 are different and this will break SAS if the jars are built in java 8.


Thanks,

Anthony
 
jeckels responded:  2015-09-15 11:22
Hi Anthony,

Yes, we are continuing to build the Java client API targeting Java 7. It's actually being built using the compiler from Java 8 (like all of the rest of the build), but using Java 7 as both the source code and compiled class file versions, which should ensure compatibility with SAS.

I'll pass this along to our docs team to refresh that page.

Thanks,
Josh