Project

General

Profile

Bug #5578

Metacat compilation should target Java 1.6

Added by Robert Waltz over 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Metacat
Target version:
Start date:
2014-07-14
Due date:
2014-11-25
% Done:

100%

Milestone:
CCI-1.4
Product Version:
*
Story Points:
Sprint:

Description

When running ant to compile Metacat, the javac command should include the parameter -target 1.6

See http://stackoverflow.com/questions/10382929/unsupported-major-minor-version-51-0

To fix the actual problem you should try to either run the Java code with a newer version of Java JRE or specify the target parameter to the Java compiler to instruct the compiler to create code compatible with earlier Java versions.

For example, in order to generate class files compatible with Java 1.4, use the following command line:

javac -target 1.4 HelloWorld.java

History

#1 Updated by Robert Waltz over 10 years ago

  • Product Version changed from * to 1.4.0

#2 Updated by Robert Waltz over 10 years ago

  • Due date changed from 2014-07-19 to 2014-08-02
  • Target version changed from 2014.28-Block.4.2 to 2014.30-Block.4.3

#3 Updated by Jing Tao over 10 years ago

  • Status changed from New to Closed

We added the target 1.6 in both Metacat svn trunk and 2.4 branch. Also we released a another product - utility which will be used in Metacat. This release of utilities will target java 1.6 as well.

I tested Metacats built from both trunk and branch 2.4 by java 1.7. The war files was running under both jre 1.7 and 1.6 (tomcat 7). All of them worked.

#4 Updated by Skye Roseboom about 10 years ago

  • Target version changed from 2014.30-Block.4.3 to Release Backlog
  • Due date changed from 2014-08-02 to 2014-09-02

#5 Updated by Robert Waltz about 10 years ago

  • Product Version changed from 1.4.0 to *

#6 Updated by Jing Tao about 10 years ago

  • Due date changed from 2014-09-02 to 2014-09-24

#7 Updated by Dave Vieglais about 10 years ago

  • Target version changed from Release Backlog to CCI-1.4.1

#8 Updated by Robert Waltz about 10 years ago

  • Target version changed from CCI-1.4.1 to CCI-1.5.0

#9 Updated by Robert Waltz about 10 years ago

  • Status changed from Closed to In Progress

#10 Updated by Robert Waltz about 10 years ago

  • Status changed from In Progress to Testing

#11 Updated by Jing Tao almost 10 years ago

  • Due date changed from 2014-09-24 to 2014-11-21

Metacat-index showes the error on the startup in java 1.6 env:
[ERROR]: Application.run Error loading class [org.dataone.cn.indexer.parser.MergeSolrField] for bean with name 'eml.abstract' defined in class path resource [application-context-eml-base.xml]: problem with class file or dependent class; nested exception is java.lang.UnsupportedClassVersionError: org/dataone/cn/indexer/parser/MergeSolrField : Unsupported major.minor version 51.0 (unable to load class org.dataone.cn.indexer.parser.MergeSolrField) [edu.ucsb.nceas.metacat.index.ApplicationController]

#12 Updated by Jing Tao almost 10 years ago

  • Status changed from Testing to Closed
  • Due date changed from 2014-11-21 to 2014-11-25

Some pom.xml files, such as d1-cn-index-processor on the release branches were modified to compatible with java 1.6.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 14.8 MB)