Mule - NoClassDefFoundError: Could not initialize class java.time.zone.ZoneRulesProvider

我是研究僧i 提交于 2019-12-10 19:37:36

问题


I've been trying to solve this problem without luck, hopefully someone could help me out...

I created a DateUtil.java class which is placed within my project at: src/main/java/util/DateUtil.java

I call "convertTime" method with the invoke component and on my laptop locally everything works fine but when deployed to an on-premise server I get the following error on the logs

Root Exception stack trace:

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 uses the following Java Classes

import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;

Thanks in advance for your help :)


回答1:


As you noted in the comments, you are using jre.1.8.0_131. Please try using the JDK itself (not JRE).

JDK 1.8 Downloads.



来源:https://stackoverflow.com/questions/45493099/mule-noclassdeffounderror-could-not-initialize-class-java-time-zone-zonerules

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!