ule子-NoClassDefFoundError:无法初始化类java.time.zone.ZoneRulesProvider [英] Mule - NoClassDefFoundError: Could not initialize class java.time.zone.ZoneRulesProvider

查看:466
本文介绍了ule子-NoClassDefFoundError:无法初始化类java.time.zone.ZoneRulesProvider的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试解决这个问题而没有运气,希望有人可以帮助我...

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

我创建了一个DateUtil.java类,该类放置在我的项目中的以下位置: src/main/java/util/DateUtil.java

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

我使用invoke组件调用"convertTime"方法,并且在本地笔记本电脑上一切正常,但是当部署到内部部署服务器时,我在日志中收到以下错误消息

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

根异常堆栈跟踪:

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类

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 :)

推荐答案

如注释中所述,您正在使用jre.1.8.0_131.请尝试使用JDK本身(而非JRE).

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下载.

这篇关于ule子-NoClassDefFoundError:无法初始化类java.time.zone.ZoneRulesProvider的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆