`
imshare
  • 浏览: 321817 次
  • 性别: Icon_minigender_1
  • 来自: 宜昌
社区版块
存档分类
最新评论

sun.io.MalformedInputException

阅读更多
问题描述:
[2011-05-25 14:22:24] [ERROR] [main] (ups.system.banktx.server.BankPreInitialization.contextInitialized(BankPreInitialization.java)) - 银行前置系统初始化异常
org.springframework.beans.factory.BeanDefinitionStoreException: Unable to determine validation mode for [file [F:\workspace\6.5\config\product\bankpre\rmiserver_product.xml]]:

an error occurred whilst reading from the InputStream.; nested exception is sun.io.MalformedInputException
Caused by: sun.io.MalformedInputException
at sun.io.ByteToCharGB18030.convert(ByteToCharGB18030.java:171)


注意:ByteToCharEUC这部分可能会由于所选定的字符集的不同而不同,比如ByteToCharGB18030。

解答:
这个问题产生的原因是IBM在JDK 1.4版本中为了追求对io通道的高效率改变了JDK 1.3中对io通道中异常处理的策略。IBM JDK 1.4中对于io通道的异常处理更加严格,因此系统中会报上面的错误。
解决这一问题的办法是不使用IBM JDK 1.4中默认的io通道,而使用nio通道。具体的做法如下:
1.打开管理控制台,找到并选择运行这个JSP的应用服务器
2.依次选择进程定义,java虚拟机,一般JVM自变量
3.添加-Dibm.stream.nio=true
4.确定,保存
5.重新启动该服务器

我是在Main方法中运行报错,则解决办法应该为
1.选择Run --> Open Run Dialog
2.Argument中的 VM argument中加入-Dibm.stream.nio=true
3.Apply
4.重新运行即可
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics