jenkins/util/SystemProperties : Unsupported major.minor version 52.0解决办法

     安装jenkins,启动失败,最初将下载的最新版jenkins.war放入tomcat下,启动报错:org.apache.catalina.core.StandardContext.startInternal Context [/jenkins] startup failed due to previous errors,tomcat启动成功,jenkins启动失败。

     接着直接运行 java -jar jenkins.war报如下错误: 

Caused by: java.lang.UnsupportedClassVersionError: jenkins/util/SystemProperties : 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.eclipse.jetty.webapp.WebAppClassLoader.findClass(WebAppClassLoader.java:510)
	at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:441)
	at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:403)
	at org.eclipse.jetty.server.handler.ContextHandler.loadClass(ContextHandler.java:1583)
	at org.eclipse.jetty.webapp.StandardDescriptorProcessor.visitListener(StandardDescriptorProcessor.java:1956)
	... 25 more

  截图如下:

jenkins/util/SystemProperties : Unsupported major.minor version 52.0解决办法_第1张图片

  这个错误是因为jdk版本导致的,之前为了编译hadoop2.6.0,将系统的jdk换成了1.7,这里将jdk换回1.8即可。

jenkins/util/SystemProperties : Unsupported major.minor version 52.0解决办法_第2张图片

jenkins启动成功的样子:

28-Jun-2017 22:20:15.480 INFO [Jenkins initialization thread] org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@404e8ef: defining beans [filter,legacy]; root of factory hierarchy
28-Jun-2017 22:20:15.740 INFO [Jenkins initialization thread] jenkins.install.SetupWizard.init 

*************************************************************
*************************************************************
*************************************************************

Jenkins initial setup is required. An admin user has been created and a password generated.
Please use the following password to proceed to installation:

1275685060be4f8299ea83a288c1dee5

This may also be found at: /home/hadoop/.jenkins/secrets/initialAdminPassword

*************************************************************
*************************************************************
*************************************************************

28-Jun-2017 22:20:19.298 INFO [Download metadata thread] hudson.model.UpdateSite.updateData Obtained the latest update center data file for UpdateSource default
28-Jun-2017 22:20:20.237 INFO [Jenkins initialization thread] hudson.model.UpdateSite.updateData Obtained the latest update center data file for UpdateSource default
28-Jun-2017 22:20:20.356 INFO [Jenkins initialization thread] hudson.WebAppMain$3.run Jenkins is fully up and running
28-Jun-2017 22:20:20.520 INFO [Download metadata thread] hudson.model.DownloadService$Downloadable.load Obtained the updated data file for hudson.tasks.Maven.MavenInstaller
28-Jun-2017 22:20:35.910 INFO [Download metadata thread] hudson.model.DownloadService$Downloadable.load Obtained the updated data file for hudson.tools.JDKInstaller
28-Jun-2017 22:20:35.917 INFO [Download metadata thread] hudson.model.AsyncPeriodicWork$1.run Finished Download metadata. 23,130 ms
访问 192.168.42.128:8080/jenkins/如下

jenkins/util/SystemProperties : Unsupported major.minor version 52.0解决办法_第3张图片


你可能感兴趣的:(java)