gpt4 book ai didi

java - 使用 IBM JDK8 看到 sun.io.UnknownCharacterException 异常

转载 作者:行者123 更新时间:2023-11-30 02:48:17 24 4
gpt4 key购买 nike

当我启动我们的产品时,我遇到了这个异常。如果我将 JDK 切换到 JDK7,它可以正常启动。

Caused by: java.lang.ClassNotFoundException: sun.io.UnknownCharacterException
at java.net.URLClassLoader.findClass(URLClassLoader.java:607)
at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:846)
at java.lang.ClassLoader.loadClass(ClassLoader.java:825)
at java.lang.ClassLoader.loadClass(ClassLoader.java:805)

完整堆栈跟踪:

com.xxxxxxxxx.yyyyyyyy.install.module_loader.ServiceInstallException: InstallSI.ModuleLoader()->Failed while loading package: /home/contbld2/cruisecontrol/main/bin/sandbox/install/middleware/d_platform_ifc_1030400.jar
at com.xxxxxxxxx.yyyyyyyy.install.InstallSI.MiddlewareModuleLoader(InstallSI.java:1767)
at com.xxxxxxxxx.yyyyyyyy.install.InstallSI.PerformInstall(InstallSI.java:920)
at com.xxxxxxxxx.yyyyyyyy.install.InstallSI.main(InstallSI.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:508)
at com.xxxxxxxxx.yyyyyyyy.install.InstallSIBootstrapper.instanciateAndRun(InstallSIBootstrapper.java:376)
at com.xxxxxxxxx.yyyyyyyy.install.InstallSIBootstrapper.instanciateAndRun(InstallSIBootstrapper.java:380)
at com.xxxxxxxxx.yyyyyyyy.install.InstallSIBootstrapper.doIt(InstallSIBootstrapper.java:192)
at com.xxxxxxxxx.yyyyyyyy.install.InstallSIBootstrapper.main(InstallSIBootstrapper.java:80)
<BR>
Caused by: java.lang.Exception: java.lang.reflect.InvocationTargetException
at com.xxxxxxxxx.yyyyyyyy.install.InstallSI.MiddlewareModuleLoader(InstallSI.java:1743)
... 10 more
<BR>
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:508)
at com.xxxxxxxxx.yyyyyyyy.install.InstallSI.MiddlewareModuleLoader(InstallSI.java:1740)
... 10 more
<BR>
Caused by: java.lang.NoClassDefFoundError: sun.io.UnknownCharacterException
at com.xxxxxxxxx.yyyyyyyy.dmi.visibility.event.AFCDmiVisEventFactory.fireAdminAuditEvent(AFCDmiVisEventFactory.java:631)
at com.xxxxxxxxx.yyyyyyyy.services.SDI.save(SDI.java:1144)
at com.xxxxxxxxx.yyyyyyyy.ui.ServiceDefinition.loadDb(ServiceDefinition.java:999)
at com.xxxxxxxxx.yyyyyyyy.ui.ServiceDefinition.loadDb(ServiceDefinition.java:919)
at com.xxxxxxxxx.yyyyyyyy.ui.ServiceDefinition.work(ServiceDefinition.java:1135)
at com.xxxxxxxxx.yyyyyyyy.install.utils.SIICallableImpl.ServiceDefinition(SIICallableImpl.java:47)
at com.xxxxxxxxx.yyyyyyyy.install.module_loader.ServiceInstall.processSDI(ServiceInstall.java:1434)
at com.xxxxxxxxx.yyyyyyyy.install.module_loader.ServiceInstall.doServiceCommonTasks(ServiceInstall.java:1207)
at com.xxxxxxxxx.yyyyyyyy.install.module_loader.ServiceInstall.installService(ServiceInstall.java:994)
at com.xxxxxxxxx.yyyyyyyy.install.module_loader.ServiceInstall.install(ServiceInstall.java:522)
at com.xxxxxxxxx.yyyyyyyy.install.module_loader.ServiceInstall.install(ServiceInstall.java:253)
at com.xxxxxxxxx.yyyyyyyy.install.module_loader.ServiceInstall.installComponents(ServiceInstall.java:611)
at com.xxxxxxxxx.yyyyyyyy.install.module_loader.ServiceInstall.install(ServiceInstall.java:560)
at com.xxxxxxxxx.yyyyyyyy.install.module_loader.ServiceInstall.install(ServiceInstall.java:253)
at com.xxxxxxxxx.yyyyyyyy.install.module_loader.ServiceInstall.installComponents(ServiceInstall.java:611)
at com.xxxxxxxxx.yyyyyyyy.install.module_loader.ServiceInstall.install(ServiceInstall.java:560)
at com.xxxxxxxxx.yyyyyyyy.install.module_loader.ServiceInstall.install(ServiceInstall.java:232)
at com.xxxxxxxxx.yyyyyyyy.install.module_loader.ServiceInstall.installWithLoader(ServiceInstall.java:282)
... 15 more
<BR>
Caused by: java.lang.ClassNotFoundException: sun.io.UnknownCharacterException
at java.net.URLClassLoader.findClass(URLClassLoader.java:607)
at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:846)
at java.lang.ClassLoader.loadClass(ClassLoader.java:825)
at java.lang.ClassLoader.loadClass(ClassLoader.java:805)
... 33 more

可能与此类似,但我在所有数据库中都看到此问题: Connect to DB2 database in eclipse via jdbc

最佳答案

IO 代码页(字符集)已从 IBM JDK 8 中删除。您必须在应用程序中使用 NIO 字符集才能解决该问题。另外,请确保在应用程序中使用标准 Java API(请注意,不建议在应用程序中使用像 sun.io.* 这样的实现类,因为它可以随时修改/删除,恕不另行通知)。

关于java - 使用 IBM JDK8 看到 sun.io.UnknownCharacterException 异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39499152/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com