Atlassian SDK atlas-run command fails with error Unsupported major.minor version

Still need help?

The Atlassian Community is here for you.

Ask the community

This Knowledge Base article specifically refers to the Atlassian Plugin SDK which is not formally supported.

Problem

While attempting to run the atlas-run command from the Atlassian Plugin SDK, whether its for Cloud or Server:

atlas-run-cloud
atlas-run-standalone

the build fails to complete.

The following appears in the console/terminal:

[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 1.384 s 
[INFO] Finished at: 2016-01-09T13:35:33+01:00 
[INFO] Final Memory: 9M/81M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal com.atlassian.maven.plugins:maven-amps-plugin:6.2.1:run-cloud (default-cli) on project standalone-pom: 
Execution default-cli of goal com.atlassian.maven.plugins:maven-amps-plugin:6.2.1:run-cloud failed: 
Unable to load the mojo 'run-cloud' in the plugin 'com.atlassian.maven.plugins:maven-amps-plugin:6.2.1' due to an API incompatibility: 
org.codehaus.plexus.component.repository.exception.ComponentLookupException: 
com/atlassian/maven/plugins/amps/RunCloudMojo : 
Unsupported major.minor version 52.0 

Specifically, the error is:

Unsupported major.minor version 52.0 

Diagnosis

Environment

  • JAVA_HOME has been set to a JAVA version that is incompatible with the installed SDK version.

Diagnostic Steps

  • To check for the JAVA installation that the Plugin SDK uses, run atlas-version:

    $ atlas-version
    ATLAS Version: 6.2.2 
    ATLAS Home: /Applications/Atlassian/atlassian-plugin-sdk-6.2.2 
    ATLAS Scripts: /Applications/Atlassian/atlassian-plugin-sdk-6.2.2/bin 
    ATLAS Maven Home: /Applications/Atlassian/atlassian-plugin-sdk-6.2.2/apache-maven-3.2.1 
    AMPS Version: 6.2.1 
    -------- 
    Executing: /Applications/Atlassian/atlassian-plugin-sdk-6.2.2/apache-maven-3.2.1/bin/mvn --version -gs /Applications/Atlassian/atlassian-plugin-sdk-6.2.2/apache-maven-3.2.1/conf/settings.xml 
    Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T18:37:52+01:00) 
    Maven home: /Applications/Atlassian/atlassian-plugin-sdk-6.2.2/apache-maven-3.2.1 
    Java version: 1.6.0_65, vendor: Apple Inc. 
    Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home 
    Default locale: de_DE, platform encoding: MacRoman 
    OS name: "mac os x", version: "10.9.5", arch: "x86_64", family: "mac"

    Specifically, refer to the Java home: text above.

Cause

JAVA_HOME has been set to a JAVA version that is incompatible with the installed SDK version, as the SDK by default uses the JAVA installation specified by the system's JAVA_HOME environment variable.

Resolution

Upgrade the system's JAVA installation to a newer version, or point JAVA_HOME to a newer version of JAVA.

(info) As of time of writing, the latest SDK Version 6.2.2 requires JAVA 1.8 or higher.

You can also refer to this article for information on required JDK versions: https://developer.atlassian.com/display/DOCS/Set+up+the+SDK+Prerequisites+for+Linux+or+Mac

Last modified on Mar 30, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.