sun.io.MalformedInputException IBM Websphere 中间件异常

Easter79
• 阅读 691

sun.io.MalformedInputException  IBM Websphere 中间件异常

[13-12-2 18:09:21:923 CST] 00000015 WebApp        E   Exception caught while initializing context
org.springframework.beans.factory.BeanDefinitionStoreException: Unable to determine validation mode for [file [/opt/IBM/WebSphere/AppServer/profiles/Appserver02/installedApps/Appserver02/sinoom_v1_0_0_war.ear/sinoom_v1.0.0.war/WEB-INF/classes/spring/applicationContext-quartz.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)
    at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:314)
    at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:364)
    at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:250)
    at java.io.InputStreamReader.read(InputStreamReader.java:212)
    at java.io.BufferedReader.fill(BufferedReader.java:157)
    at java.io.BufferedReader.readLine(BufferedReader.java:320)
    at java.io.BufferedReader.readLine(BufferedReader.java:383)
    at org.springframework.util.xml.XmlValidationModeDetector.detectValidationMode(XmlValidationModeDetector.java:79)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.detectValidationMode(XmlBeanDefinitionReader.java:468)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.getValidationModeForResource(XmlBeanDefinitionReader.java:438)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:404)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:357)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)
    at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:123)
    at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:91)
    at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:94)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:294)
    at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
    at com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:641)
    at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:298)
    at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:289)
    at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:90)
    at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:157)
    at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:665)
    at com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:618)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:335)
    at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:551)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1301)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1138)
    at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:569)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:817)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:950)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(ApplicationMgrImpl.java:2120)
    at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:342)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)

此问题为xml配置文件编码问题,一般出现的websphere、weblogic等中间件上。
1、解决方法将xml文件的编码格式,注意是文件,改成GB18030。此外还要将内部编码格式encoding="GB18030"。
这里说明一下修改方法:
1)、创建一个xml文件,将其文件格式改为GB18030
2)、将原来出问题的编码格式的文件所有内容copy到记事本中,注意是记事本,而不是其他编辑器。
3)、将xml中编码格式改为encoding="GB18030"

2、如果上边的第一种方法解决不了,我们可以将xml配置文件里的所有中文字符删掉,再试试。

3、有的人认为是ibm io的问题,他们是这样解决问题的。
这个问题产生的原因是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)、重新启动该服务器

参考文档

http://blog.csdn.net/xiangnideshen/article/details/7469400

http://www.cnblogs.com/keer/archive/2007/07/11/814225.html

点赞
收藏
评论区
推荐文章
blmius blmius
2年前
MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1
文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s
Jacquelyn38 Jacquelyn38
2年前
2020年前端实用代码段,为你的工作保驾护航
有空的时候,自己总结了几个代码段,在开发中也经常使用,谢谢。1、使用解构获取json数据let jsonData  id: 1,status: "OK",data: 'a', 'b';let  id, status, data: number   jsonData;console.log(id, status, number )
皕杰报表之UUID
​在我们用皕杰报表工具设计填报报表时,如何在新增行里自动增加id呢?能新增整数排序id吗?目前可以在新增行里自动增加id,但只能用uuid函数增加UUID编码,不能新增整数排序id。uuid函数说明:获取一个UUID,可以在填报表中用来创建数据ID语法:uuid()或uuid(sep)参数说明:sep布尔值,生成的uuid中是否包含分隔符'',缺省为
Stella981 Stella981
2年前
Android So动态加载 优雅实现与原理分析
背景:漫品Android客户端集成适配转换功能(基于目标识别(So库35M)和人脸识别库(5M)),导致apk体积50M左右,为优化客户端体验,决定实现So文件动态加载.!(https://oscimg.oschina.net/oscnet/00d1ff90e4b34869664fef59e3ec3fdd20b.png)点击上方“蓝字”关注我
Wesley13 Wesley13
2年前
mysql设置时区
mysql设置时区mysql\_query("SETtime\_zone'8:00'")ordie('时区设置失败,请联系管理员!');中国在东8区所以加8方法二:selectcount(user\_id)asdevice,CONVERT\_TZ(FROM\_UNIXTIME(reg\_time),'08:00','0
Wesley13 Wesley13
2年前
00:Java简单了解
浅谈Java之概述Java是SUN(StanfordUniversityNetwork),斯坦福大学网络公司)1995年推出的一门高级编程语言。Java是一种面向Internet的编程语言。随着Java技术在web方面的不断成熟,已经成为Web应用程序的首选开发语言。Java是简单易学,完全面向对象,安全可靠,与平台无关的编程语言。
Stella981 Stella981
2年前
Django中Admin中的一些参数配置
设置在列表中显示的字段,id为django模型默认的主键list_display('id','name','sex','profession','email','qq','phone','status','create_time')设置在列表可编辑字段list_editable
Wesley13 Wesley13
2年前
35岁是技术人的天花板吗?
35岁是技术人的天花板吗?我非常不认同“35岁现象”,人类没有那么脆弱,人类的智力不会说是35岁之后就停止发展,更不是说35岁之后就没有机会了。马云35岁还在教书,任正非35岁还在工厂上班。为什么技术人员到35岁就应该退役了呢?所以35岁根本就不是一个问题,我今年已经37岁了,我发现我才刚刚找到自己的节奏,刚刚上路。
Wesley13 Wesley13
2年前
MySQL部分从库上面因为大量的临时表tmp_table造成慢查询
背景描述Time:20190124T00:08:14.70572408:00User@Host:@Id:Schema:sentrymetaLast_errno:0Killed:0Query_time:0.315758Lock_
Python进阶者 Python进阶者
4个月前
Excel中这日期老是出来00:00:00,怎么用Pandas把这个去除
大家好,我是皮皮。一、前言前几天在Python白银交流群【上海新年人】问了一个Pandas数据筛选的问题。问题如下:这日期老是出来00:00:00,怎么把这个去除。二、实现过程后来【论草莓如何成为冻干莓】给了一个思路和代码如下:pd.toexcel之前把这
Easter79
Easter79
Lv1
今生可爱与温柔,每一样都不能少。
文章
2.8k
粉丝
5
获赞
1.2k