java项目启动Tomcat报错!!!

lzy_java 2014-05-04 11:14:54
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
...全文
188 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
wocjy 2014-05-04
  • 打赏
  • 举报
回复
usersqlmap.xml中/sqlMap这个地方有问题好像是语法错误吧 最后一句话说类pd没找到 看看 你哪里定义了这个pd类
lzy_java 2014-05-04
  • 打赏
  • 举报
回复
有高人吗啊啊啊啊啊啊啊啊啊啊
lzy_java 2014-05-04
  • 打赏
  • 举报
回复
快疯了,到底怎么回事
lzy_java 2014-05-04
  • 打赏
  • 举报
回复
这项目是组长svn上下载来的,他们的运行都没事,代码都一样也没改过,我的启动tomcat就这样,一直是这错。
S117 2014-05-04
  • 打赏
  • 举报
回复
有个类没找到,pd是什么类?
乃刀的青春 2014-05-04
  • 打赏
  • 举报
回复
xml配置错误。自己查看注入的配置
lzy_java 2014-05-04
  • 打赏
  • 举报
回复
引用 7 楼 weidu23 的回复:

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的配置是否有错!
非常感谢
lzy_java 2014-05-04
  • 打赏
  • 举报
回复
引用 2 楼 longtian1213 的回复:
有个类没找到,pd是什么类?
我也是新手,应该就是这个pd的问题了
lzy_java 2014-05-04
  • 打赏
  • 举报
回复
最后解决的是在usersqlmap.xml这个配置文件中添加了一句:<typeAlias alias="pd" type="com.sdjt.util.page.PageData"/>,这样就正常运行了。但我同事他的机器上就不用添加这样一段代码,不过问题解决了 ,谢谢!
weidu23 2014-05-04
  • 打赏
  • 举报
回复

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的配置是否有错!

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧