2016-09-14 341 views
1

當我開始我們的產品時,我遇到了這個異常。如果我將JDK切換到JDK7,則啓動正常。隨着IBM JDK8看到sun.io.UnknownCharacterException異常

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

+4

您是否在使用'UnknownCharacterException'?那真的是* full * stacktrace嗎? – Andreas

+0

嗨,安德烈亞斯,我用完整的堆棧跟蹤更新了我的問題。當我們嘗試使用IBM JDK8 SR3安裝我們的應用程序時,會發生此異常。使用JDK7它工作正常。如果我能夠找到解決問題的根源,您能否請建議? –

+2

顯然,類「com.xxxxxxxxx.yyyyyyyy.dmi.visibility.event.AFCDmiVisEventFactory」使用的是類「sun.io.UnknownCharacterException」,它不是標準Java API的一部分。只需修復... – Holger

回答

2

的IO代碼頁(字符集)從刪除IBM JDK 8.爲了解決問題,您必須在應用程序中使用NIO字符集。另外,請確保在應用程序中使用標準Java API(請注意,不建議在應用程序中使用像sun.io. *這樣的實現類,因爲它可以隨時在沒有任何事先通知的情況下進行修改/刪除)。

+0

嗨,我沒有看到我們的應用程序直接使用sun.io. *。它的一些內部罐子正在使用它。識別來源變得具有挑戰性,這就是我現在正在研究的內容。 –

+0

由於Holger在他的早期評論中已經更新,所以類com.xxxxxxxxx.yyyyyyyy.dmi.visibility.event.AFCDmiVisEventFa ctory使用類sun.io.UnknownCharacterException,它不是標準Java API的一部分。 –