骡子 - NoClassDefFoundError的:无法初始化类java.time.zone.ZoneRulesProvider
问题描述:
我一直在试图解决没有运气这个问题,希望有人可以帮助我......骡子 - NoClassDefFoundError的:无法初始化类java.time.zone.ZoneRulesProvider
我创建了一个DateUtil.java类这是在把我的项目中: 的src/main/JAVA/UTIL/DateUtil.java
我称之为“convertTime”方法与调用组件和我的笔记本电脑在当地一切正常,但在部署到内部部署服务器我在日志中获得以下错误
根异常堆栈跟踪:
java.lang.NoClassDefFoundError: Could not initialize class java.time.zone.ZoneRulesProvider
at java.time.ZoneRegion.ofId(Unknown Source)
at java.time.ZoneId.of(Unknown Source)
at java.time.ZoneId.of(Unknown Source)
at util.DateUtil.convertTime(DateUtil.java:25)
DateUtil.class使用下面的Java类
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
在此先感谢您的帮助:)
'java.time'是可用于Java> = 8,这么一个愚蠢的问题:你使用的是什么版本? – 2017-08-03 19:40:12
jre1.8.0_131在本地服务器和本地,感谢您的帮助。 – Adalberto
不知道它是否会有所作为,但请尝试使用JDK,而不是JRE。 –