日期:2014-05-17  浏览次数:20991 次

java项目启动Tomcat报错!!!
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tokenService': Injection of resource fields failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tokenDao': Injection of resource fields failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClientTemplate' defined in ServletContext resource [/WEB-INF/applicationContext/applicationContext.xml]: Cannot resolve reference to bean 'sqlMapClient' while setting bean property 'sqlMapClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClient' defined in ServletContext resource [/WEB-INF/applicationContext/applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: file [D:\Users\workspace\demo2\WebRoot\WEB-INF\classes\com\sql_xml\system\usersqlmap.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/insert'.  Cause: com.ibatis.sqlmap.client.SqlMapException: Error.  Could not initialize class.  Cause: java.lang.ClassNotFoundException: pd
------解决方案--------------------
xml配置错误。自己查看注入的配置
------解决方案--------------------
有个类没找到,pd是什么类?
------解决方案--------------------
usersqlmap.xml中/sqlMap这个地方有问题好像是语法错误吧 最后一句话说类pd没找到 看看 你哪里定义了这个pd类
------解决方案--------------------

Error creating bean with name 'sqlMapClient' defined in ServletContext resource [/WEB-INF/applicationContext/applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException

在Spring反射创建bean的时候,初始化方法调度失败 ...... 

Failed to parse mapping resource: file [D:\Users\workspace\demo2\WebRoot\WEB-INF\classes\com\sql_xml\system\usersqlmap.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing XML. 


在ibatis解析.xml文件时,发现xml文件的格式(或者其他内容)是错误的,无法解析usersqlmap.xml 。
--------------------------
综上所述,
我来猜测一下:
应该是你spring搭配ibatis的时候出问题了!看看spring-ibatis的配置是否有错!