一、错误描述
关于nexus-2.4.0-09在Windows Server 2016 数据中心版 64位中文版启动失败,打开logs/wrapper.log日志报"jvm 1 | Error in WrapperListener.start callback. java.lang.StackOverflowError...jvm 1 | java.lang.StackOverflowError..wrapper | <-- Wrapper Stopped.."错误日志,详细错误日志如下
wrapper | --> Wrapper Started as Service@b@wrapper | Launching a JVM...@b@jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org@b@jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.@b@jvm 1 | @b@jvm 1 | 2020-05-05 22:08:16 INFO [er_start_runner] - org.sonatype.nexus.bootstrap.jsw.JswLauncher - Starting with arguments: [./conf/jetty.xml]@b@jvm 1 | 2020-05-05 22:08:16 INFO [er_start_runner] - org.sonatype.nexus.bootstrap.jsw.JswLauncher - JVM ID: 1, JVM PID: 620, Wrapper PID: 3548, User: SYSTEM@b@jvm 1 | 2020-05-05 22:08:16 INFO [er_start_runner] - org.sonatype.nexus.bootstrap.jsw.JswLauncher - Current directory: C:\saas\nexus\nexus-2.4.0-09@b@jvm 1 | Error in WrapperListener.start callback. java.lang.StackOverflowError@b@jvm 1 | java.lang.StackOverflowError@b@jvm 1 | at org.sonatype.appcontext.internal.HierarchicalMap.get(HierarchicalMap.java:113)@b@jvm 1 | at org.sonatype.appcontext.internal.HierarchicalMap.get(HierarchicalMap.java:108)@b@jvm 1 | at java.util.concurrent.ConcurrentHashMap.containsKey(ConcurrentHashMap.java:964)@b@jvm 1 | at org.sonatype.appcontext.internal.HierarchicalMap.containsKey(HierarchicalMap.java:77)@b@jvm 1 | at org.sonatype.appcontext.internal.HierarchicalMap.get(HierarchicalMap.java:113)@b@jvm 1 | at org.sonatype.appcontext.internal.HierarchicalMap.get(HierarchicalMap.java:108)@b@jvm 1 | at java.util.concurrent.ConcurrentHashMap.containsKey(ConcurrentHashMap.java:964)@b@jvm 1 | at org.sonatype.appcontext.internal.HierarchicalMap.containsKey(HierarchicalMap.java:77)@b@jvm 1 | at org.sonatype.appcontext.internal.HierarchicalMap.get(HierarchicalMap.java:113)@b@jvm 1 | at org.sonatype.appcontext.internal.HierarchicalMap.get(HierarchicalMap.java:108)@b@jvm 1 | at java.util.concurrent.ConcurrentHashMap.containsKey(ConcurrentHashMap.java:964)@b@...@b@wrapper | <-- Wrapper Stopped
二、解决方法
因nexus2.4.0-09的版本无法支持jdk1.8高版本,需改为jdk1.7版本即可,可以修改系统环境JAVA_HOME配置为jdk1.7(如C:/saas/java/jdk1.7.0_80路径),或者修改bin/jsw/conf/wrapper.conf为wrapper.java.command的为具体jdk1.7版本路径如下所示
# Set the JVM executable @b@# (modify this to absolute path if you need a Java that is not on the OS path)@b@#wrapper.java.command=java@b@#wrapper.java.command=C:\saas\java\jdk1.8.0_11\bin\java.exe@b@wrapper.java.command=C:\saas\java\jdk1.7.0_80\bin\java.exe