使用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
最新回答
小傻子

2024-09-14 20:37:14

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

2024-09-14 20:56:47

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的配置文件没找到
真心可是半斤ぴ

2024-09-14 09:27:31

看下bean里面注入路径
ツ蓝翔老司机

2024-09-14 00:36:40

你看下是不是Spring配置出错了 你直接导入的 要看下数据库什么的配置 第一是配置要看是否完整等等问题