使用eclipse导入 Java Web 项目,一运行总是报错

三月 17, 2014 2:54:46 下午 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClient' defined in class path resource [spring-configs/applicationContext.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [ibatis-configs/iBatis-mysql-configuration.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: java.io.IOException: Could not find resource com/test/core/dao/userInfo.mysql.ibatis.xml
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
Caused by: org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [ibatis-configs/iBatis-mysql-configuration.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: java.io.IOException: Could not find resource com/test/core/dao/userInfo.mysql.ibatis.xml

兄弟 那是肯定的 不要以为一个无误的项目你能直接用 那是人家在之前的环境不断调试的结果 只有自己从头到尾作 你的人家拿去也不行 我曾经试过
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener 你的配置文件检查下 监听这些 包的导入等等追问

我们公司里经常导入别人的项目啊

追答

温馨提示:答案为网友推荐,仅供参考
第1个回答  2014-03-17
java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: java.io.IOException: Could not find resource com/test/core/dao/userInfo.mysql.ibatis.xml

这部写着呢吗,你ibaits的配置文件没找到本回答被提问者采纳
第2个回答  2019-09-10
看下bean里面注入路径
第3个回答  2014-03-17
你看下是不是Spring配置出错了 你直接导入的 要看下数据库什么的配置 第一是配置要看是否完整等等问题