我已经安装了java11,然后我试图启动jenkins,但总是失败
-- Unit jenkins.service has begun starting up.
Running from: /usr/share/java/jenkins.war
java.lang.NoClassDefFoundError: Could not initialize class sun.util.calendar.ZoneInfoFile
at java.base/sun.util.calendar.ZoneInfo.getTimeZone(ZoneInfo.java:588)
at java.base/java.util.TimeZone.getTimeZone(TimeZone.java:577)
at java.base/java.util.TimeZone.setDefaultZone(TimeZone.java:682)
at java.base/java.util.TimeZone.getDefaultRef(TimeZone.java:653)
at java.base/java.util.TimeZone.getDefault(TimeZone.java:642)
at java.base/java.util.Calendar.defaultTimeZone(Calendar.java:1679)
at java.base/java.util.Calendar.getInstance(Calendar.java:1660)
at java.base/java.text.SimpleDateFormat.initializeCalendar(SimpleDateFormat.java:676)
at java.base/java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:620)
at java.base/java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:599)
at io.jenkins.lib.support_log_formatter.SupportLogFormatter.lambda$static$0(SupportLogFormatter.java:47)
at java.base/java.lang.ThreadLocal$SuppliedThreadLocal.initialValue(ThreadLocal.java:305)
at java.base/java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:195)
at java.base/java.lang.ThreadLocal.get(ThreadLocal.java:172)
at io.jenkins.lib.support_log_formatter.SupportLogFormatter.formatTime(SupportLogFormatter.java:53)
at io.jenkins.lib.support_log_formatter.SupportLogFormatter.format(SupportLogFormatter.java:63)
at java.logging/java.util.logging.StreamHandler.publish(StreamHandler.java:199)
at java.logging/java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:95)
start jenkins success
字符串
1条答案
按热度按时间jhiyze9q1#
很可能你缺少时区依赖性。检查文件$JAVA_HOME/jre/lib/tzdb.dat是否指向空文件或不存在文件。如果是,请安装
tzdata-java
包。yum install tzdata-java
应该可以。