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根目录下的
接近 2 年之前 回复
hzpangel
hzpangel   2016.09.25 09:35

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

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!
其他相关推荐
maven项目使用外部tomcat7并进行远程热部署
在maven项目开发中,一般推荐使用jetty进行开发调试,
centos中安装tomcat7,并实现web程序的热部署
安装前先检查jdk是否安装,如果没有安装,则先安装jdk [root@tomcat home]# java -version java version "1.6.0_33" OpenJDK Runtime Environment (IcedTea6 1.13.5) (rhel-1.13.5.1.el6_6-x86_64) OpenJDK 64-Bit Server VM (build 23.25-b
myeclipse进行tomcat7热部署
注意: tomcat的热部署需要用到maven不过在网上看了一些这方面的知识不过在网上看了一些这方面的知识,说是如果热部署多次的话会出现tomcat内存溢出的问题,所以最好是在开发中用吧,减少tomcat重启频率就可以了 1.修改tomcat的conf目录下的tomcat-users.xml在最后一行添加以下内容 2.在项目的pom.xml中添加tomcat插件
Tomcat7启用远程调试DEBUG功能
前言 工作上可能用的上这个功能,因为将项目放到服务器(测试,生产还是别开的好)后,有些问题需要DEBUG,没有断点非常不方便啊。 而且网上很多资料说的乱七八糟,图不对版的(自己贴的图和你自己写的东西都不一样!严重误导别人!!!) 自己踩完坑后MARK一下 Tomcat Windows下 进入目录下的bin目录,编辑打开startup.bat 在前面添加:S
eclipse+tomcat6/7的环境开发时热部署
这几天发现开发动态web项目的时候,使用的是springmvc,做二次ka
tomcat7插件结合jrebel进行热部署的一些探索
SZXZX
IDEA中-springMVC项目配置热部署
在配置好tomcat后,再配置两个参数
IDEA tomcat三步实现热部署
每次切换桌面<比如切换到浏览器>都会更新类和资源),这样我们在更改jsp文件后,只需切换到浏览器,自动就会进行更新了,感觉很爽 上面本人已通过对springMVC控制层进行更改及jsp更改尝试,亲测可行,至于spring的配置更改等等是否有效,还没有尝试,不敢妄言。
springMVC样例、jreloader实现tomcat热部署
使用一个spring MVC样例来说明jreloader的tomcat热部署
springmvc如何进行热部署开发
1.场景还原      在工程量大的情况下,tomcat运行部署一次会花费相当多的时间,这样太 浪费人力以及时间了;今天笔者将 讲解一下如何配置springmvc工程的热部署 2.实现方案 其实很简单! ①在tomcat配置中的deployment选择war explored形式部署 ②然后继续在tomcat配置页面选择Update classes and resources