主题 : jeecms导入myeclipse之后出现问题
级别: 童生
UID: 34246
积分:35 加为好友
威望: 0 精华: 0
主题:3 回复:12
注册时间:2012-05-24
在线时长:0
1#   发表于:2012-05-24 16:06:59  IP:222.192.*.*
按照官网教程将源码导入到myeclipse中之后启动时报错?请问是什么原因引起的
报错如下:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0' defined in ServletContext resource [/WEB-INF/config/jeecms-servlet-front.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contentCountAct': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.jeecms.cms.service.ContentCountCache com.jeecms.cms.action.front.ContentCountAct.contentCountCache; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'contentCountCache': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void com.jeecms.cms.service.ContentCountCacheImpl.setCache(net.sf.ehcache.Ehcache); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ehContentCountCache' defined in ServletContext resource [/WEB-INF/config/cache-context.xml]: Cannot resolve reference to bean 'cacheManager' while setting bean property 'cacheManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cacheManager' defined in ServletContext resource [/WEB-INF/config/cache-context.xml]: Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [ehcache-application.xml] cannot be opened because it does not exist
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527) ~[spring.beans-3.0.5.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) ~[spring.beans-3.0.5.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) ~[spring.beans-3.0.5.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring.beans-3.0.5.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) ~[spring.beans-3.0.5.jar:3.0.5.RELEASE]


备注:数据库是用的mysql
jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://192.168.1.5:3306/jeecms_2012?characterEncoding=UTF-8
jdbc.username=root
jdbc.password=cqabj208
```````````````````
数据库是直接用的安装生成的
级别: 状元
UID: 33380
积分:50625 加为好友
威望: 21 精华: 3
主题:88 回复:30687
注册时间:2012-05-07
在线时长:0
2#   发表于:2012-05-24 16:08:53  IP:115.171.*.*
请描述下您的系统使用环境,如操作系统,JDK版本,tocmat版本,mysql版本等
功成由勤,业精于勤。
级别: 童生
UID: 34246
积分:35 加为好友
威望: 0 精华: 0
主题:3 回复:12
注册时间:2012-05-24
在线时长:0
3#   发表于:2012-05-24 16:11:12  IP:222.192.*.*
回复第2楼
win7  
jdk1.6.0_10
apache-tomcat-6.0.35
mysql 5.1.52
myeclipse 8.5
级别: 总版主
UID: 10736
积分:149788 加为好友
威望: 212 精华: 42
主题:297 回复:127675
注册时间:2010-09-08
在线时长:90.46
4#   发表于:2012-05-24 16:14:24  IP:115.171.*.*
把WEB-INF/classes下的4个配置文件放到src下
路漫漫其修远兮,吾将上下而求索!
级别: 童生
UID: 34246
积分:35 加为好友
威望: 0 精华: 0
主题:3 回复:12
注册时间:2012-05-24
在线时长:0
5#   发表于:2012-05-24 16:19:52  IP:222.192.*.*
回复第4楼
搞定了!谢谢版主
级别: 总版主
UID: 10736
积分:149788 加为好友
威望: 212 精华: 42
主题:297 回复:127675
注册时间:2010-09-08
在线时长:90.46
6#   发表于:2012-05-24 16:21:00  IP:115.171.*.*
路漫漫其修远兮,吾将上下而求索!
级别: 童生
UID: 34246
积分:35 加为好友
威望: 0 精华: 0
主题:3 回复:12
注册时间:2012-05-24
在线时长:0
7#   发表于:2012-05-24 16:22:14  IP:222.192.*.*
回复第6楼
建议把这个情况加到导入eclipse教程中去!
级别: 总版主
UID: 10736
积分:149788 加为好友
威望: 212 精华: 42
主题:297 回复:127675
注册时间:2010-09-08
在线时长:90.46
8#   发表于:2012-05-24 16:23:43  IP:115.171.*.*
eclipse是不需要把WEB-INF/classes下的4个配置文件放到src下
路漫漫其修远兮,吾将上下而求索!
级别: 童生
UID: 34246
积分:35 加为好友
威望: 0 精华: 0
主题:3 回复:12
注册时间:2012-05-24
在线时长:0
9#   发表于:2012-05-24 16:29:32  IP:222.192.*.*
回复第8楼
级别: 总版主
UID: 10736
积分:149788 加为好友
威望: 212 精华: 42
主题:297 回复:127675
注册时间:2010-09-08
在线时长:90.46
10#   发表于:2012-05-24 16:30:18  IP:115.171.*.*
路漫漫其修远兮,吾将上下而求索!
1 2 3 > >| 共3页