2 hzpangel hzpangel 于 2016.09.24 20:24 提问

tomcat7远程热部署springmvc+mybatis项目问题

在我本地测试是好用的,但是经过远程热部署到centos6.5系统中的tomcat中,但是终端一直报错,搞了几天了,好心累,求大神帮忙,感激不尽.错误提示如下:
[org.springframework.beans.factory.support.DefaultListableBeanFactory]-[DEBUG] Eagerly caching bean 'sqlSessionFactory' to allow for resolving potential circular references
2016-09-05 07:48:53,680 [http-bio-8080-exec-2] [org.springframework.beans.factory.support.DefaultListableBeanFactory]-[DEBUG] Returning cached instance of singleton bean 'dataSource'
2016-09-05 07:48:53,680 [http-bio-8080-exec-2] [org.springframework.beans.factory.support.DefaultListableBeanFactory]-[DEBUG] Invoking afterPropertiesSet() on bean with name 'sqlSessionFactory'
2016-09-05 07:48:53,681 [http-bio-8080-exec-2] [org.springframework.beans.factory.support.DefaultListableBeanFactory]-[WARN] Bean creation exception on FactoryBean type check: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'tbUserMapper' defined in URL [jar:file:/root/apache-tomcat-7.0.70/webapps/ROOT/WEB-INF/lib/taotao-manager-mapper-0.0.1-SNAPSHOT.jar!/com/taotao/mapper/TbUserMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory': : Error creating bean with name 'sqlSessionFactory' defined in file [/root/apache-tomcat-7.0.70/webapps/ROOT/WEB-INF/classes/spring/applicationContext-dao.xml]: Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [mybatis/sqlMapConfig.xml] cannot be opened because it does not exist; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in file [/root/apache-tomcat-7.0.70/webapps/ROOT/WEB-INF/classes/spring/applicationContext-dao.xml]: Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [mybatis/sqlMapConfig.xml] cannot be opened because it does not exist
2016-09-05 07:48:53,692 [http-bio-8080-exec-2] [org.springframework.beans.factory.support.DefaultListableBeanFactory]-[DEBUG] Creating shared instance of singleton bean 'sqlSessionFactory'
2016-09-05 07:48:53,692 [http-bio-8080-exec-2] [org.springframework.beans.factory.support.DefaultListableBeanFactory]-[DEBUG] Creating instance of bean 'sqlSessionFactory'
2016-09-05 07:48:53,692 [http-bio-8080-exec-2] [org.springframework.beans.factory.support.DefaultListableBeanFactory]-[DEBUG] Eagerly caching bean 'sqlSessionFactory' to allow for resolving potential circular references
2016-09-05 07:48:53,692 [http-bio-8080-exec-2] [org.springframework.beans.factory.support.DefaultListableBeanFactory]-[DEBUG] Returning cached instance of singleton bean 'dataSource'
2016-09-05 07:48:53,692 [http-bio-8080-exec-2] [org.springframework.beans.factory.support.DefaultListableBeanFactory]-[DEBUG] Invoking afterPropertiesSet() on bean with name 'sqlSessionFactory'
2016-09-05 07:48:53,693 [http-bio-8080-exec-2] [org.springframework.beans.factory.support.DefaultListableBeanFactory]-[WARN] Bean creation exception on FactoryBean type check: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'tbItemParamItemMapper' defined in URL [jar:file:/root/apache-tomcat-7.0.70/webapps/ROOT/WEB-INF/lib/taotao-manager-mapper-0.0.1-SNAPSHOT.jar!/com/taotao/mapper/TbItemParamItemMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory': : Error creating bean with name 'sqlSessionFactory' defined in file [/root/apache-tomcat-7.0.70/webapps/ROOT/WEB-INF/classes/spring/applicationContext-dao.xml]: Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [mybatis/sqlMapConfig.xml] cannot be opened because it does not exist; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in file [/root/apache-tomcat-7.0.70/webapps/ROOT/WEB-INF/classes/spring/applicationContext-dao.xml]: Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [mybatis/sqlMapConfig.xml] cannot be opened because it does not exist

2个回答

iamcaochong
iamcaochong   2016.09.24 20:57

java.io.FileNotFoundException: class path resource [mybatis/sqlMapConfig.xml] cannot be opened because it does not exist

最后一句提示该文件不存在,应该是这个文件的问题,你检查一下是不是文件路径错了

hzpangel
hzpangel 我检查了,在本地运行正常,一进行热部署后进报这个错误,我是直接部署到远程tomcat根目录下的
大约一年之前 回复
hzpangel
hzpangel   2016.09.25 09:35

项目结构,相关的参数都配置好了,权限也加上了,这到底是什么问题呢

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!