atlas-run不会启动Jira,原因是"不支持的major.minor版本52.0"

时间:2016-01-13 15:49:33

标签: java eclipse jira jira-plugin

我正在使用Spring开发一个Jira插件。现在我只想使用Jira版本6.1.7(工作目录中的atlas-run)启动插件,但这是不可能的。我正在使用AMPS-Version 6.2.1,如果我尝试启动服务器/ Jira,我会收到以下错误。 atlas-run目前正在使用JDK 1.7,因此我在Eclipse中执行并且合规性级别设置为1.7。如果我为命令atlas-run(Eclipse中的JDK版本1.7)更改为JDK版本1.8,我会收到很多关于无法加载插件且Jira被锁定的其他错误。

所以我的问题没有如下:

  1. 您知道上述错误(异常追踪)吗?您知道如何解决此问题吗?

  2. 我应该将JDK 1.8用于所有开发实例(Jira服务器和Eclipse吗?)

  3. 如果高效服务器只使用JDK 1.7,我该怎么办?

    [WARNING] Error injecting: com.atlassian.maven.plugins.amps.UpdateMojo java.lang.TypeNotPresentException: Type com.atlassian.maven.plugins.amps.UpdateMojo not present at org.eclipse.sisu.space.URLClassSpace.loadClass(URLClassSpace.java:115) at org.eclipse.sisu.space.NamedClass.load(NamedClass.java:46) at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClass.java:48) at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86) at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:55) at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:70) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:100) at org.eclipse.sisu.plexus.PlexusLifecycleManager.onProvision(PlexusLifecycleManager.java:133) at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:109) at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:55) at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68) at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:47) at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:997) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1047) at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:993) at com.google.inject.Scopes$1$1.get(Scopes.java:59) at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:82) at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:260) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:252) at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:462) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:120) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213) at org.apache.maven.cli.MavenCli.main(MavenCli.java:157) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: java.lang.UnsupportedClassVersionError: com/atlassian/maven/plugins/amps/UpdateMojo : 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)

1 个答案:

答案 0 :(得分:1)

我已经经历了同样的情况。以下是答案:

  1. 错误是因为最新版本的JIRA和SDK仅与Java 8一起运行。如果在使用Java 8时遇到一些编译错误,那么问题就不一样了。为此,请检查您的IDE是否指向嵌入在Atlassian SDK上的maven安装。
  2. 自JIRA v6.3起,支持Java 7和8。在JIRA 7之后,仅支持Java 8。我所做的是在我的开发环境中使用Java 8,因为我想支持7之前的JIRA版本,所以在打包插件时我使用Java 7的目标级别。这意味着我使用Java 8进行编译,但只使用Java 7语法来避免不兼容。您可以在IDE上进行配置。
  3. 希望有所帮助!