转 Nexus启动报错:Unsupported major.minor version 51.0

转:http://www.th7.cn/Program/java/201408/269316.shtml

Nexus启动报错: Unsupported major.minor version 51.0

1.遇到问题

今天搭建Nexus私服,出现了以前没遇到过的错误。

a).采用console-nexus.bat开启报错:

wrapper| --> Wrapper Started as Consolewrapper| Launching a JVM...jvm 1| java.lang.UnsupportedClassVersionError: org/sonatype/nexus/bootstrap/jsw/JswLauncher : Unsupported major.minor version 51.0jvm 1|at java.lang.ClassLoader.defineClass1(Native Method)jvm 1|at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)jvm 1|at java.lang.ClassLoader.defineClass(ClassLoader.java:615)jvm 1|at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)jvm 1|at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)jvm 1|at java.net.URLClassLoader.access$000(URLClassLoader.java:58)jvm 1|at java.net.URLClassLoader$1.run(URLClassLoader.java:197)jvm 1|at java.security.AccessController.doPrivileged(Native Method)jvm 1|at java.net.URLClassLoader.findClass(URLClassLoader.java:190)jvm 1|at java.lang.ClassLoader.loadClass(ClassLoader.java:306)jvm 1|at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)jvm 1|at java.lang.ClassLoader.loadClass(ClassLoader.java:247)jvm 1| Could not find the main class: org.sonatype.nexus.bootstrap.jsw.JswLauncher.Program will exit.jvm 1| Exception in thread "main"wrapper| JVM exited while loading the application.wrapper| Reloading Wrapper configuration...wrapper| Launching a JVM...

b).采用install-nexus.bat、start-nexus.bat开启报错:

wrapper| Starting the nexus service...wrapper| Waiting to start...wrapper| Waiting to start...wrapper| Waiting to start...wrapper| The nexus service was launched, but failed to start.

2.分析问题

看日志的问题,大概就是版本存在问题,找不到Java虚拟机。

Java版本:1.6.0_45

Nexus版本: 2.7.2-03

按照网上的办法是修改bin/jsw/conf/wrapper.conf中的wrapper.java.command

wrapper.java.command=C:/Lynch/Develop/Java/jdk1.6/bin/java.exe

指向自己的jdk,似乎在特俗的Nexus版本可以解决,这里我还是不行。

3.解决问题

最终查询文档得到思路

Sonatype Nexus 2.6.0Java 6 Support EOLOracle‘s support for Java 6 ended in February 2013.Consequentially as of version 2.6 Nexus now requires a Java 7 JRE to run.
Sonatype Nexus OSS 2.5.0Java 6 Support is DeprecatedJava 6 reached Official EOL on February 2013.Since it is no longer receiving updates we are deprecating support for running Nexus with Java 6 in the 2.5 release, and will be removing it in the upcoming 2.6 release.
Sonatype Nexus 2.0 Release NotesJDK 7 SupportNexus 2.0 is the first version of Nexus verified to work with Java 7. The recommended versions areOracle 7u2 or later *IBM Java 7.0 GA or later* Note: Nexus 2.0 will not run on versions of Oracle Java 7 prior to 7u2.When running with Java 6 the recommended versions are:Oracle Java 6u30 or laterIBM Java 6.0.10.0 or Later

a).Nexus的2.6版本及其以后版本

使用的Java的jdk7.

b).Nexus的2.0-2.5版本

使用Java的jdk6的update30版本及其以后的jdk6版本

使用Java的jdk7的update2版本及其以后jdk7版本

c).最终解决方案

升级jdk7(注意jdk的update版本,升级最新版本就可以)

4.参考文档

https://support.sonatype.com/entries/23150053-Sonatype-Nexus-Release-Notes?__utma=246996102.1501838135.1395215985.1395815367.1395822104.4&__utmb=246996102.21.9.1395822181403&__utmc=246996102&__utmx=-&__utmz=246996102.1395822104.4.4.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided)&__utmv=-&__utmk=14901813

时间: 2024-10-25 19:07:56

转 Nexus启动报错:Unsupported major.minor version 51.0的相关文章

应用部署weblogic 报错Unsupported major.minor version 51.0的解决过程

应用部署weblogic 报错Unsupported major.minor version 51.0的解决过程 ? ? 1.部署提示错误:Unsupported major.minor version 51.0 1.1 错误现象如下图所示: 1.2 原因分析 类似错误均属于Java版本问题,即JDK版本过低,只要选择相对应的JDK版本编译即可.48,49,50.51.52是Java编译器内部的版本号:Unsupported major.minor version 52.0 对应于 JDK1.8

HTTP Status 500:报错Unsupported major.minor version 51.0(unable to load class XXX)

这个是jdk版本和JRE不匹配导致的. 报错信息: 问题详解:(待填) 处理: 1.检查jdk和jre版本是否匹配 --打开命令行界面(cmd),分别输入java -version 和javac -version 对比查看版本信息 如果不匹配,则自行下载对应的JRE或者JDK版本 如果像我这样是匹配的,就接下去看: 2.既然是匹配的,那么就是jdk版本的问题了.可以自行选择调整jdk的版本(原先是1.7),最后 apply-->ok 再重启服务器,问题就解决了.

JDK报错Unsupported major.minor version 52.0

一.问题描述: 新建web项目,由于我配置的Tomcat 6依赖jdk 1.8,所以新建的工程在jdk1.8环境下生成.当我把jdk改成1.6版本时,运行main方法或其他,则 报以下错误: java.lang.UnsupportedClassVersionError: PR/Sort : Unsupported major.minor version 52.0 二.解决方案: 在Window -->Properties-->JAVA --> Compiler-中的Compiler co

tomcat启动报错:Unsupported major.minor version 51.0

myeclipse中添加项目后,发现项目启动时报错:Unsupported major.minor version 51.0 因为tomcat使用的jdk版本不支持你项目的jdk版本,需要你在myeclipse中配置几个版本: 配置myeclipse中的jre 配置java compiler level 配置项目的compilor level 配置tomcat的jdk preferences->myeclipse->server->tomcat->tomcat7.0->jdk

MyEclipse配置tomcat报错 - java.lang.UnsupportedClassVersionError: org/apache/lucene/store/Directory : Unsupported major.minor version 51.0

1 开发Servlet程序时,MyEclipse配置好tomcat与JDK之后,启动时控制台报下列错误: 1 java.lang.UnsupportedClassVersionError: org/apache/lucene/store/Directory : Unsupported major.minor version 51.02 at java.lang.ClassLoader.defineClass1(Native Method)3 at java.lang.ClassLoader.de

8.4 sikuli 集成进eclipse 报错:Unsupported major.minor version 51.0

8.3中的问题Win32Util.dll: Can't load 32-bit .dll on a AMD 64 bit platform  解决之后,执行还是会有报错:Unsupported major.minor version 51.0 jdk7编译的class文件放到基于jdk6运行在tomcat之中,就会报这个错. 解决起来也很方便:打开exclipse中项目上的属性—java compiler–选择一个合适的版本后重新编译即可. 具体步骤 解决:项目------>右键------>

HIVE 1.1.0 启动时报错: Unsupported major.minor version 51.0

JDK 1.6 + HIVE 1.1.0 启动时抛异常: [email protected]:~# hive Logging initialized using configuration in jar:file:/hive/apache-hive-1.1.0-bin/lib/hive-common-1.1.0.jar!/hive-log4j.propertiesSLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found bin

运行Tomcat闪退问题,报的错误:Unsupported major.minor version 51.0

在MyEclipse中运行tomcat,tomcat闪退并且报以下错误. java.lang.UnsupportedClassVersionError: org/apache/catalina/startup/Bootstrap : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassL

配置Tomcat出现Unsupported major.minor version 51.0

在配置tomcat时,配置好jdk1.6,下载的tomcat8.0,结果执行start-up.bat,总是一闪而过,网上查了大量的资料,都说是可能是jdk没配置好,但实际上jdk的环境变量设置正常,后面执行configtest.bat,在启动bootstrap.jar包时,报Unsupported major.minor version 51.0的异常,网上查说是jdk的版本不匹配,意识到tomcat8.0和jdk1.6不匹配,后面下载了个tomcat6.0,果然正常! 配置Tomcat出现Un