`

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

    博客分类:
  • DB2
阅读更多

要在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.MalformedInputException
        at 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.重新启动该服务器
 

 

分享到:
评论

相关推荐

    Caused by: java.net.UnknownHostException: openapi.alipay.com

    Caused by: java.net.UnknownHostException: openapi.alipay.com

    Mybatis报错: org.apache.ibatis.exceptions.PersistenceException解决办法

    在使用Mybatis框架时,你可能会遇到`org.apache.ibatis.exceptions.PersistenceException`这样的异常。这个异常通常表示在执行数据库查询操作时遇到了问题。本篇将详细分析这个问题并提供解决方法。 ### 问题概述 ...

    使用的ognl的chm

    在Java开发中,尤其是Web应用框架如Struts2和Hibernate中,OGNL被广泛使用。它允许开发者以简洁的方式访问和操作对象的属性,甚至包括深层次的对象图导航。 **OGNL的基础概念:** 1. **表达式**:OGNL的核心是其...

    ibatis-2.3.4.726.jar,ibatis-2.3.0.677.jar,ibatis-2.3.3.720.jar下载

    iBATIS,全称为“Infrastructure for Binding Applications To SQL Maps”,是一个优秀的开源持久层框架,它允许Java开发者将SQL语句与Java代码分离,提供了一种简单但强大的在Java应用中映射SQL和结果集的方式。...

    IBatis.DataMapper.1.6.2.bin.zip

    - "Ibatis.DataMapper.1.6.2.bin":这是一个单独的1.6.2版本的DataMapper组件,可能是开发或升级过程中需要的特定文件。 5. **实际应用与最佳实践** - 配置管理:正确配置数据库连接信息、事务管理及日志记录等是...

    ibatis-sqlmap-2.3.4.726-sources.jar.zip_birth84v_cutting1v2_ibat

    《深入解析iBatis-SQLMap 2.3.4.726源码》 在Java开发领域,iBatis作为一个优秀的持久层框架,深受广大开发者喜爱。它将SQL语句与Java代码分离,提高了代码的可读性和可维护性。本篇将围绕iBatis-SQLMap 2.3.4.726...

    ibatis2.X升级mybatis3.X之曲径通幽处

    在IT行业中,数据库持久化是应用开发中的关键环节,而框架的选择往往决定了开发效率和项目的维护性。Ibatis和Mybatis都是广泛使用的Java ORM(对象关系映射)框架,它们帮助开发者将数据库操作与业务逻辑解耦。本篇...

    iBatis2学习笔记

    6.iBatis2学习笔记:一对多映射(双向).doc 7.iBatis2学习笔记:多对多映射(双向) .doc 8.iBatis2学习笔记:总结与思考.doc 9.iBatis2实体状态图解.doc 10.iBatis insert操作陷阱.doc 每章都有小例子。 呵呵,希望...

    ibatis-2.3.3.720.jar

    ibatis-2.3.3.720.jar

    iBATIS插件及教程+DEMO.rar

    iBATIS插件及教程+DEMO.rar iBATIS插件及教程+DEMO.rar iBATIS插件及教程+DEMO.rar iBATIS插件及教程+DEMO.rar iBATIS插件及教程+DEMO.rar

    ibatis2.3.4.8.jar 和 ibatis-2.3.4.726.jar两个版本的下载

    在本主题中,我们将深入探讨Ibatis的两个特定版本:ibatis2.3.4.8.jar和ibatis-2.3.4.726.jar。 Ibatis的核心概念包括映射器(Mapper)、SQL映射文件和SqlSession。映射器是Ibatis的主要组件,它定义了数据库操作与...

    IBatis.net-IBatis.DataAccess.1.9.2/IBatis.DataMapper.1.6.2

    本篇将深入探讨IBatis.Net的核心组件——IBatis.DataAccess.1.9.2和IBatis.DataMapper.1.6.2,以及它们在数据访问中的关键作用。 **一、IBatis.DataAccess** IBatis.DataAccess是IBatis.net框架的一部分,主要负责...

    最稳定Ibatis包 ibatis-2.3.0.677.rar

    Ibatis,一个强大的Java持久层框架,以其轻量级、高度灵活的特点在众多开发者中备受...对于初学者,文档的详细内容是学习和理解Ibatis的关键,而对经验丰富的开发者来说,稳定的2.3.0.677版本则是项目中的可靠选择。

    Spring高版本对ibatis的支持

    &lt;bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean"&gt; &lt;value&gt;classpath:SqlMapConfig.xml &lt;bean id="dao" class="org.springframework.orm.ibatis....

    Ibatis.Net 的Ibatis.Net.Domain和IBatisNet.Common组件

    6. **异常处理**:封装了数据库操作可能抛出的异常,提供统一的错误处理机制。 这两个组件的结合使用,使得开发者可以更加专注于业务逻辑,而不必过多地关心数据访问的细节。通过Ibatis.Net.Domain,业务对象可以...

    整合后的ibatis-2.3.0.677.jar

    使用Ibatis时,首先需要在项目中引入ibatis-2.3.0.677.jar,并配置相应的配置文件(如`sqlMapConfig.xml`),然后创建Mapper接口和对应的XML映射文件,最后在业务逻辑中通过SqlSession执行SQL语句。这个版本的Ibatis...

    ibatis-2.3.0.677.zip

    iBATIS,作为Java开发中的一个持久层框架,它的出现极大地简化了数据库操作与应用程序的集成。这个开源项目由Clinton Begin在2001年创立,最初是为了解决密码软件开发中的问题,但随着时间的发展,它逐渐演变成了一...

    ibatis的3个jar包.rar

    Ibatis,一个轻量级的Java持久层框架,以其简单易用、高度可配置的特点,在企业级应用开发中广泛使用。这个"ibatis的3个jar包.rar"压缩文件包含了Ibatis框架运行所需的核心组件,分别是`ibatis-sqlmap-2.jar`、`...

Global site tag (gtag.js) - Google Analytics