0

I am trying to run jira application on my local machine with atlas-run and atlas-debug command. But i have a build failure here.

[ERROR] Failed to execute goal com.atlassian.maven.plugins:maven-amps-dispatcher-plugin:6.2.1:run (default-cli) on project ccd_jirautils: Execution de
fault-cli of goal com.atlassian.maven.plugins:maven-amps-dispatcher-plugin:6.2.1:run failed: Unable to load the mojo 'run' in the plugin 'com.atlassia
n.maven.plugins:maven-amps-dispatcher-plugin:6.2.1' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupE
xception: com/atlassian/maven/plugins/ampsdispatcher/AmpsDispatcherRunMojo : Unsupported major.minor version 52.0

I tried to run the same on Linux machine i am able to get the success build with the jre 1.7 and atlassian_sdk version 5.0.3. when i am trying to run the same on Windows platform i get the above error. I also tried with jre 1.8 which is a bigtime failure jira refuse to start. so please I need your help here. can you please suggest me what might be the solution for this?

Caused by: java.lang.UnsupportedClassVersionError: com/atlassian/maven/plugins/ampsdispatcher/AmpsDispatcherRunMojo : Unsupported major.minor version
52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:389)
        at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235)
        at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
        at org.eclipse.sisu.space.URLClassSpace.loadClass(URLClassSpace.java:107)
        ... 41 more
ravthiru
  • 8,878
  • 2
  • 43
  • 52
prb_cm
  • 117
  • 1
  • 4
  • 13

2 Answers2

0

Following are the major versions of JRE the class file is compatible with

Java SE 9 = 53
Java SE 8 = 52
Java SE 7 = 51

Check what version of JAVA does your MAVEN is using mvn -version. You should be using jre 1.7

ravthiru
  • 8,878
  • 2
  • 43
  • 52
  • I am explicitly setting the java version for jira application and it is running on 1.7 jre. Apache Maven 3.2.1 Maven home: C:\xxxxx\xxx\atlassian_sdk\6.2.2\apache-maven-3.2.1 Java version: 1.7.0_75, vendor: Oracle Corporation Java home: C:\xxxxx\xxx\java\1.7.0_75w64\jre OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows" – prb_cm Sep 22 '16 at 14:30
  • Any other solutions that i can try implementing? – prb_cm Sep 26 '16 at 14:11
0

You didn't mention the Jira version you're running, but the error, as mentioned by ravthiru comes from a Java version mismatch. That is you have to use Java 8 for this to work, at least if you stick to the atlas-run and atlas-debug scripts, which use the mentioned com.atlassian.maven.plugins:maven-amps-dispatcher-plugin:6.2.1 which is a bit odd, as that one is included in the plugin-sdk 6.2.2, maybe you updated the sdk? Would you mind having a look inside atlas-run and double check it's 5.0.3?

That plugin was compiled using Java 8, so you either have to do so too or use an older version of the atlassian-plugin-sdk, which was compiled using Java 7. The 5.x versions should work.

Regarding the failure of running Jira with Java 8: Which version are you running, and what errors does it log?