经验啊,WAS6中ibatis解析异常Cause: sun.io.MalformedInputException

本文主要是介绍经验啊,WAS6中ibatis解析异常Cause: sun.io.MalformedInputException,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

要在websphere上部署一个应用,websphere版本6.0
应用中用到了ibatis作为数据访问层,ibatis的xml文件中有一些中文注释,像这样的<!--   注释  -->,两边都空有两个空格
war包在本机tomcat 5.0上部署和访问都没有错误,但是部署在websphere上就报错,错误信息如下:

[08-12-27 9:09:21:375 CST] 0000003e SystemErr     R org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.abchina.csas.sch.service.impl.SchManagerServiceImpl#2409fc51' defined in ServletContext resource [/WEB-INF/classes/spring/applicationContext-sch.xml]: Can't resolve reference to bean 'schManagerDAO' while setting property 'schManagerDAO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schManagerDAO' defined in ServletContext resource [/WEB-INF/classes/spring/applicationContext-sch.xml]: Can't resolve reference to bean 'schSqlMapClient' while setting property 'sqlMapClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schSqlMapClient' defined in ServletContext resource [/WEB-INF/classes/spring/applicationContext-resources.xml]: Initialization of bean failed; nested exception is com.ibatis.common.exception.NestedRuntimeException: Error occurred.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: sun.io.MalformedInputException
Caused by: sun.io.MalformedInputException
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: sun.io.MalformedInputException
Caused by: sun.io.MalformedInputException
Caused by: com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: sun.io.MalformedInputException
Caused by: sun.io.MalformedInputException
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: sun.io.MalformedInputException
Caused by: sun.io.MalformedInputException
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schManagerDAO' defined in ServletContext resource [/WEB-INF/classes/spring/applicationContext-sch.xml]: Can't resolve reference to bean 'schSqlMapClient' while setting property 'sqlMapClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schSqlMapClient' defined in ServletContext resource [/WEB-INF/classes/spring/applicationContext-resources.xml]: Initialization of bean failed; nested exception is com.ibatis.common.exception.NestedRuntimeException: Error occurred.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: sun.io.MalformedInputException
Caused by: sun.io.MalformedInputException
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: sun.io.MalformedInputException
Caused by: sun.io.MalformedInputException
Caused by: com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: sun.io.MalformedInputException
Caused by: sun.io.MalformedInputException
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: sun.io.MalformedInputException
Caused by: sun.io.MalformedInputException
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schSqlMapClient' defined in ServletContext resource [/WEB-INF/classes/spring/applicationContext-resources.xml]: Initialization of bean failed; nested exception is com.ibatis.common.exception.NestedRuntimeException: Error occurred.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: sun.io.MalformedInputException
Caused by: sun.io.MalformedInputException
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: sun.io.MalformedInputException
Caused by: sun.io.MalformedInputException
Caused by: com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: sun.io.MalformedInputException
Caused by: sun.io.MalformedInputException
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: sun.io.MalformedInputException
Caused by: sun.io.MalformedInputException
com.ibatis.common.exception.NestedRuntimeException: Error occurred.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: sun.io.MalformedInputException
Caused by: sun.io.MalformedInputException
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: sun.io.MalformedInputException
Caused by: sun.io.MalformedInputException
Caused by: com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: sun.io.MalformedInputException
Caused by: sun.io.MalformedInputException
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: sun.io.MalformedInputException
Caused by: sun.io.MalformedInputException
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: sun.io.MalformedInputException
Caused by: sun.io.MalformedInputException
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: sun.io.MalformedInputException
Caused by: sun.io.MalformedInputException
Caused by: com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: sun.io.MalformedInputException
Caused by: sun.io.MalformedInputException
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: sun.io.MalformedInputException
Caused by: sun.io.MalformedInputExceptionat com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:81)at com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(SqlMapClientBuilder.java:62)at org.springframework.orm.ibatis.SqlMapClientFactoryBean.afterPropertiesSet(SqlMapClientFactoryBean.java:258)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1059)

 

解决办法:

MalformedInputException造成的原因就是IBM JDK重写了IO通道。原来1.4当中就有过类似的问题,原来解决方法是:
1.打开管理控制台,找到并选择运行这个JSP的应用服务器
2.依次选择进程定义,java虚拟机,一般JVM自变量
3.添加-Dibm.stream.nio=true
4.确定,保存
5.重新启动该服务器
 

 

这篇关于经验啊,WAS6中ibatis解析异常Cause: sun.io.MalformedInputException的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/851566

相关文章

Python中配置文件的全面解析与使用

《Python中配置文件的全面解析与使用》在Python开发中,配置文件扮演着举足轻重的角色,它们允许开发者在不修改代码的情况下调整应用程序的行为,下面我们就来看看常见Python配置文件格式的使用吧... 目录一、INI配置文件二、YAML配置文件三、jsON配置文件四、TOML配置文件五、XML配置文件

Spring中@Lazy注解的使用技巧与实例解析

《Spring中@Lazy注解的使用技巧与实例解析》@Lazy注解在Spring框架中用于延迟Bean的初始化,优化应用启动性能,它不仅适用于@Bean和@Component,还可以用于注入点,通过将... 目录一、@Lazy注解的作用(一)延迟Bean的初始化(二)与@Autowired结合使用二、实例解

解决java.lang.NullPointerException问题(空指针异常)

《解决java.lang.NullPointerException问题(空指针异常)》本文详细介绍了Java中的NullPointerException异常及其常见原因,包括对象引用为null、数组元... 目录Java.lang.NullPointerException(空指针异常)NullPointer

C语言中自动与强制转换全解析

《C语言中自动与强制转换全解析》在编写C程序时,类型转换是确保数据正确性和一致性的关键环节,无论是隐式转换还是显式转换,都各有特点和应用场景,本文将详细探讨C语言中的类型转换机制,帮助您更好地理解并在... 目录类型转换的重要性自动类型转换(隐式转换)强制类型转换(显式转换)常见错误与注意事项总结与建议类型

MySQL 缓存机制与架构解析(最新推荐)

《MySQL缓存机制与架构解析(最新推荐)》本文详细介绍了MySQL的缓存机制和整体架构,包括一级缓存(InnoDBBufferPool)和二级缓存(QueryCache),文章还探讨了SQL... 目录一、mysql缓存机制概述二、MySQL整体架构三、SQL查询执行全流程四、MySQL 8.0为何移除查

在Rust中要用Struct和Enum组织数据的原因解析

《在Rust中要用Struct和Enum组织数据的原因解析》在Rust中,Struct和Enum是组织数据的核心工具,Struct用于将相关字段封装为单一实体,便于管理和扩展,Enum用于明确定义所有... 目录为什么在Rust中要用Struct和Enum组织数据?一、使用struct组织数据:将相关字段绑

使用Java实现一个解析CURL脚本小工具

《使用Java实现一个解析CURL脚本小工具》文章介绍了如何使用Java实现一个解析CURL脚本的工具,该工具可以将CURL脚本中的Header解析为KVMap结构,获取URL路径、请求类型,解析UR... 目录使用示例实现原理具体实现CurlParserUtilCurlEntityICurlHandler

深入解析Spring TransactionTemplate 高级用法(示例代码)

《深入解析SpringTransactionTemplate高级用法(示例代码)》TransactionTemplate是Spring框架中一个强大的工具,它允许开发者以编程方式控制事务,通过... 目录1. TransactionTemplate 的核心概念2. 核心接口和类3. TransactionT

数据库使用之union、union all、各种join的用法区别解析

《数据库使用之union、unionall、各种join的用法区别解析》:本文主要介绍SQL中的Union和UnionAll的区别,包括去重与否以及使用时的注意事项,还详细解释了Join关键字,... 目录一、Union 和Union All1、区别:2、注意点:3、具体举例二、Join关键字的区别&php

Spring IOC控制反转的实现解析

《SpringIOC控制反转的实现解析》:本文主要介绍SpringIOC控制反转的实现,IOC是Spring的核心思想之一,它通过将对象的创建、依赖注入和生命周期管理交给容器来实现解耦,使开发者... 目录1. IOC的基本概念1.1 什么是IOC1.2 IOC与DI的关系2. IOC的设计目标3. IOC