1. <i id='S62lE'><tr id='S62lE'><dt id='S62lE'><q id='S62lE'><span id='S62lE'><b id='S62lE'><form id='S62lE'><ins id='S62lE'></ins><ul id='S62lE'></ul><sub id='S62lE'></sub></form><legend id='S62lE'></legend><bdo id='S62lE'><pre id='S62lE'><center id='S62lE'></center></pre></bdo></b><th id='S62lE'></th></span></q></dt></tr></i><div id='S62lE'><tfoot id='S62lE'></tfoot><dl id='S62lE'><fieldset id='S62lE'></fieldset></dl></div>
      • <bdo id='S62lE'></bdo><ul id='S62lE'></ul>
      <legend id='S62lE'><style id='S62lE'><dir id='S62lE'><q id='S62lE'></q></dir></style></legend>

      <small id='S62lE'></small><noframes id='S62lE'>

        <tfoot id='S62lE'></tfoot>
      1. 如何修复错误“java.lang.ClassNotFoundException: sun.io

        时间:2023-09-30
      2. <i id='WpcbB'><tr id='WpcbB'><dt id='WpcbB'><q id='WpcbB'><span id='WpcbB'><b id='WpcbB'><form id='WpcbB'><ins id='WpcbB'></ins><ul id='WpcbB'></ul><sub id='WpcbB'></sub></form><legend id='WpcbB'></legend><bdo id='WpcbB'><pre id='WpcbB'><center id='WpcbB'></center></pre></bdo></b><th id='WpcbB'></th></span></q></dt></tr></i><div id='WpcbB'><tfoot id='WpcbB'></tfoot><dl id='WpcbB'><fieldset id='WpcbB'></fieldset></dl></div>
      3. <small id='WpcbB'></small><noframes id='WpcbB'>

            • <bdo id='WpcbB'></bdo><ul id='WpcbB'></ul>
                <tbody id='WpcbB'></tbody>

                  <tfoot id='WpcbB'></tfoot><legend id='WpcbB'><style id='WpcbB'><dir id='WpcbB'><q id='WpcbB'></q></dir></style></legend>

                  本文介绍了如何修复错误“java.lang.ClassNotFoundException: sun.io.ByteToCharConverter"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我有一个在 WebSphere 7.0 上的项目.目前我将它带到 EAP 6.4.Java 版本是 1.6.

                  I have a project which was on WebSphere 7.0. Currently I am carrying it to EAP 6.4. Java version is 1.6.

                  DB2 是我使用的数据库.我之前在 websphere 中使用的驱动程序是在 jboss 的模块下设置的.数据库连接正常.但是在 Executequery 方法运行后我得到了错误

                  DB2 is the database I use. And the same driver that I used earlier in websphere is set under modules of jboss. Database connection is OK. But after Executequery method run I get the error

                    JBWEB000289: Servlet InitServlet threw load() exception: 
                    java.lang.ClassNotFoundException: sun.io.ByteToCharConverter from 
                  

                  我用谷歌搜索了很多,我发现我尝试过的唯一解决方案是设置

                  I googled it a lot and the only solution I found that I tried is setting

                    -Ddb2.jcc.charsetDecoderEncoder=3
                  

                  我在运行时的 VM 参数下设置了这个,jboss eap 6.4.

                  I set this under VM arguments of runtime, jboss eap 6.4.

                  我还尝试将此道具设置为我在数据库执行之前设置的属性.

                  I also tried to set this prop to properties that I set before database execution.

                     props.setProperty("db2.jcc.charsetDecoderEncoder", "3");
                  

                  但问题仍然存在.

                  这是我收到的错误消息.它仍然存在.

                  This is the error message that I get. And it still exists.

                    JBWEB000289: Servlet InitServlet threw load() exception: 
                    java.lang.ClassNotFoundException: sun.io.ByteToCharConverter from
                  

                  这是完整的日志:

                      14:41:38,389 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/cantekWeb]] (ServerService Thread Pool -- 62) 
                      JBWEB000289: Servlet InitServlet threw load() exception: java.lang.ClassNotFoundException: sun.io.ByteToCharConverter from 
                      [Module "deployment.cantek.ear.cantekWeb.war:main" from Service Module Loader]
                          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.6.Final-redhat-1]
                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.6.Final-redhat-1]
                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.6.Final-redhat-1]
                          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.6.Final-redhat-1]
                          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.6.Final-redhat-1]
                          at com.ibm.db2.jcc.b.r.a(r.java:157) [db2jcc-0.0.1.jar:]
                          at com.ibm.db2.jcc.c.d.a(d.java:986) [db2jcc-0.0.1.jar:]
                          at com.ibm.db2.jcc.c.fb.a(fb.java:1723) [db2jcc-0.0.1.jar:]
                          at com.ibm.db2.jcc.c.fb.a(fb.java:1651) [db2jcc-0.0.1.jar:]
                          at com.ibm.db2.jcc.c.fb.n(fb.java:570) [db2jcc-0.0.1.jar:]
                          at com.ibm.db2.jcc.c.fb.j(fb.java:257) [db2jcc-0.0.1.jar:]
                          at com.ibm.db2.jcc.c.fb.c(fb.java:57) [db2jcc-0.0.1.jar:]
                          at com.ibm.db2.jcc.c.s.c(s.java:42) [db2jcc-0.0.1.jar:]
                          at com.ibm.db2.jcc.c.wb.h(wb.java:169) [db2jcc-0.0.1.jar:]
                          at com.ibm.db2.jcc.b.id.p(id.java:1246) [db2jcc-0.0.1.jar:]
                          at com.ibm.db2.jcc.b.jd.a(jd.java:2275) [db2jcc-0.0.1.jar:]
                          at com.ibm.db2.jcc.b.jd.V(jd.java:505) [db2jcc-0.0.1.jar:]
                          at com.ibm.db2.jcc.b.jd.executeQuery(jd.java:488) [db2jcc-0.0.1.jar:]
                          at com.cimmy.service.data.Talep.loadSikayetKonular(Talep.java:138) [classes:]
                          at com.cimmy.service.servlet.InitServlet.sikayetKonulari(InitServlet.java:472) [classes:]
                          at com.cimmy.service.servlet.InitServlet.load(InitServlet.java:412) [classes:]
                          at com.cimmy.service.servlet.InitServlet.init(InitServlet.java:220) [classes:]
                          at javax.servlet.GenericServlet.init(GenericServlet.java:242) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2]
                          at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1194) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
                          at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1100) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
                          at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3593) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
                          at org.apache.catalina.core.StandardContext.start(StandardContext.java:3802) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
                          at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:163) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
                          at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:61) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
                          at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:96) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
                          at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [rt.jar:1.8.0_211]
                          at java.util.concurrent.FutureTask.run(Unknown Source) [rt.jar:1.8.0_211]
                          at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.8.0_211]
                          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.8.0_211]
                          at java.lang.Thread.run(Unknown Source) [rt.jar:1.8.0_211]
                          at org.jboss.threads.JBossThread.run(JBossThread.java:122)
                  

                  推荐答案

                  我做了以上所有的更改,这些更改也是需要的.但我面临的真正问题与 JBoss EAP 6.4 JRE 设置有关.它使用的是 1.8,并且由于此版本中没有需要的类,因此引发了此错误.所以我对该设置进行了更改,并使其看起来像 1.7.之后这个问题就解决了.

                  I made all the above changes which are also needed. But the real problem I faced was related to JBoss EAP 6.4 JRE settings. It was using 1.8 and since this version does not have needed classes in it it was throwing this error. So I made changes on that setting and made it to look at 1.7. After that this problem is solved.

                  感谢您的帮助.

                  这篇关于如何修复错误“java.lang.ClassNotFoundException: sun.io.ByteToCharConverter"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何获取 SQL 连接的默认模式? 下一篇:如何使用 Java 创建多个模式连接?

                  相关文章

                  最新文章

                  <legend id='5neMT'><style id='5neMT'><dir id='5neMT'><q id='5neMT'></q></dir></style></legend>
                • <small id='5neMT'></small><noframes id='5neMT'>

                • <tfoot id='5neMT'></tfoot>
                      <bdo id='5neMT'></bdo><ul id='5neMT'></ul>

                      <i id='5neMT'><tr id='5neMT'><dt id='5neMT'><q id='5neMT'><span id='5neMT'><b id='5neMT'><form id='5neMT'><ins id='5neMT'></ins><ul id='5neMT'></ul><sub id='5neMT'></sub></form><legend id='5neMT'></legend><bdo id='5neMT'><pre id='5neMT'><center id='5neMT'></center></pre></bdo></b><th id='5neMT'></th></span></q></dt></tr></i><div id='5neMT'><tfoot id='5neMT'></tfoot><dl id='5neMT'><fieldset id='5neMT'></fieldset></dl></div>