首页 > 代码库 > Spring的注入问题
Spring的注入问题
作下笔记,Spring的注入问题[多个实例问题]
解决方案如下:
1 package student.life.support.platform.service.impl; 2 3 import javax.annotation.Resource; 4 5 import org.springframework.stereotype.Service; 6 7 import student.life.support.platform.dao.BaseDao; 8 import student.life.support.platform.model.User; 9 import student.life.support.platform.service.UserService; 10 11 @Service 12 public class UserServiceImpl extends BaseServiceImpl<User> implements UserService { 13 public UserServiceImpl(){ 14 System.out.println(getClass()); 15 } 16 17 @Resource 18 private BaseDao<User> baseDao; 19 20 @Resource 21 public void setBaseDao(BaseDao<User> baseDao) { 22 System.out.println("注入baseDao实例对象"); 23 super.setBaseDao(baseDao); 24 } 25 26 } 27 28 注入的时候错了,注入了baseDao,实际上要注入的是BaseDao的实现类的子类,即BaseDaoImpl的子类,而不是baseDao本身。 29 30 奇葩的struts2: 31 32 package student.life.support.platform.model; 33 // default package 34 35 import java.sql.Timestamp; 36 import java.util.HashSet; 37 import java.util.Set; 38 import javax.persistence.CascadeType; 39 import javax.persistence.Column; 40 import javax.persistence.Entity; 41 import javax.persistence.FetchType; 42 import javax.persistence.GeneratedValue; 43 import javax.persistence.Id; 44 import javax.persistence.JoinColumn; 45 import javax.persistence.ManyToOne; 46 import javax.persistence.OneToMany; 47 import javax.persistence.Table; 48 49 import org.hibernate.annotations.Generated; 50 import org.hibernate.annotations.GenericGenerator; 51 52 /** 53 * User entity. @author MyEclipse Persistence Tools 54 */ 55 @Entity 56 @Table(name = "user", catalog = "studentlifesupportplatform") 57 public class User implements java.io.Serializable { 58 59 // Fields 60 61 private String id; 62 private Role role; 63 private String username; 64 private String studentNum; 65 private String address; 66 private Integer age; 67 private String nickname; 68 private String sex; 69 private String qq; 70 private String phonenumber; 71 private String fixedTelephone; 72 private String password; 73 private Timestamp registerDate; 74 private String imgUrl; 75 private String email; 76 private String question; 77 private String answer; 78 private Timestamp totalOnlineDate; 79 private Set<OperatingHistory> operatingHistories = new HashSet<OperatingHistory>( 80 0); 81 private Set<HelpInfoBoard> helpInfoBoards = new HashSet<HelpInfoBoard>(0); 82 private Set<ReplyInfo> replyInfos = new HashSet<ReplyInfo>(0); 83 private Set<HelpInfo> helpInfos = new HashSet<HelpInfo>(0); 84 private Set<Credit> credits = new HashSet<Credit>(0); 85 86 @Override 87 public String toString() { 88 System.out.println("id:" + id); 89 System.out.println("role:" + role); 90 System.out.println("username:" + username); 91 System.out.println("studentNum:" + studentNum); 92 System.out.println("address:" + address); 93 94 return ""; 95 } 96 97 // Constructors 98 99 /** default constructor */ 100 public User() { 101 } 102 103 /** minimal constructor */ 104 public User(String id) { 105 this.id = id; 106 } 107 108 /** full constructor */ 109 public User(String id, Role role, String username, String studentNum, 110 String address, Integer age, String nickname, String sex, 111 String qq, String phonenumber, String fixedTelephone, 112 String password, Timestamp registerDate, String imgUrl, 113 String email, String question, String answer, 114 Timestamp totalOnlineDate, 115 Set<OperatingHistory> operatingHistories, 116 Set<HelpInfoBoard> helpInfoBoards, Set<ReplyInfo> replyInfos, 117 Set<HelpInfo> helpInfos, Set<Credit> credits) { 118 this.id = id; 119 this.role = role; 120 this.username = username; 121 this.studentNum = studentNum; 122 this.address = address; 123 this.age = age; 124 this.nickname = nickname; 125 this.sex = sex; 126 this.qq = qq; 127 this.phonenumber = phonenumber; 128 this.fixedTelephone = fixedTelephone; 129 this.password = password; 130 this.registerDate = registerDate; 131 this.imgUrl = imgUrl; 132 this.email = email; 133 this.question = question; 134 this.answer = answer; 135 this.totalOnlineDate = totalOnlineDate; 136 this.operatingHistories = operatingHistories; 137 this.helpInfoBoards = helpInfoBoards; 138 this.replyInfos = replyInfos; 139 this.helpInfos = helpInfos; 140 this.credits = credits; 141 } 142 143 // Property accessors 144 @GenericGenerator(name = "generator", strategy = "uuid") 145 @Id 146 @GeneratedValue(generator = "generator") 147 @Column(name = "id", unique = true, nullable = false, length = 32) 148 public String getId() { 149 return this.id; 150 } 151 152 public void setId(String id) { 153 this.id = id; 154 } 155 156 @ManyToOne(fetch = FetchType.LAZY) 157 @JoinColumn(name = "role_id") 158 public Role getRole() { 159 return this.role; 160 } 161 162 public void setRole(Role role) { 163 this.role = role; 164 } 165 166 @Column(name = "username", length = 32) 167 public String getUsername() { 168 return this.username; 169 } 170 171 public void setUsername(String username) { 172 this.username = username; 173 } 174 175 @Column(name = "student_num", length = 32) 176 public String getStudentNum() { 177 return this.studentNum; 178 } 179 180 public void setStudentNum(String studentNum) { 181 this.studentNum = studentNum; 182 } 183 184 @Column(name = "address", length = 64) 185 public String getAddress() { 186 return this.address; 187 } 188 189 public void setAddress(String address) { 190 System.out.println("拦截:" + address); 191 this.address = address; 192 } 193 194 @Column(name = "age") 195 public Integer getAge() { 196 return this.age; 197 } 198 199 public void setAge(Integer age) { 200 this.age = age; 201 } 202 203 @Column(name = "nickname", length = 16) 204 public String getNickname() { 205 return this.nickname; 206 } 207 208 public void setNickname(String nickname) { 209 this.nickname = nickname; 210 } 211 212 @Column(name = "sex", length = 4) 213 public String getSex() { 214 return this.sex; 215 } 216 217 public void setSex(String sex) { 218 this.sex = sex; 219 } 220 221 @Column(name = "qq", length = 16) 222 public String getQq() { 223 return this.qq; 224 } 225 226 public void setQq(String qq) { 227 this.qq = qq; 228 } 229 230 @Column(name = "phonenumber", length = 20) 231 public String getPhonenumber() { 232 return this.phonenumber; 233 } 234 235 public void setPhonenumber(String phonenumber) { 236 this.phonenumber = phonenumber; 237 } 238 239 @Column(name = "fixed_telephone", length = 16) 240 public String getFixedTelephone() { 241 return this.fixedTelephone; 242 } 243 244 public void setFixedTelephone(String fixedTelephone) { 245 this.fixedTelephone = fixedTelephone; 246 } 247 248 @Column(name = "password", length = 64) 249 public String getPassword() { 250 return this.password; 251 } 252 253 public void setPassword(String password) { 254 this.password = password; 255 } 256 257 @Column(name = "register_date", length = 19) 258 public Timestamp getRegisterDate() { 259 return this.registerDate; 260 } 261 262 public void setRegisterDate(Timestamp registerDate) { 263 this.registerDate = registerDate; 264 } 265 266 @Column(name = "img_url", length = 128) 267 public String getImgUrl() { 268 return this.imgUrl; 269 } 270 271 public void setImgUrl(String imgUrl) { 272 this.imgUrl = imgUrl; 273 } 274 275 @Column(name = "email", length = 64) 276 public String getEmail() { 277 return this.email; 278 } 279 280 public void setEmail(String email) { 281 this.email = email; 282 } 283 284 @Column(name = "question", length = 64) 285 public String getQuestion() { 286 return this.question; 287 } 288 289 public void setQuestion(String question) { 290 this.question = question; 291 } 292 293 @Column(name = "answer", length = 64) 294 public String getAnswer() { 295 return this.answer; 296 } 297 298 public void setAnswer(String answer) { 299 this.answer = answer; 300 } 301 302 @Column(name = "total_online_date", length = 19) 303 public Timestamp getTotalOnlineDate() { 304 return this.totalOnlineDate; 305 } 306 307 public void setTotalOnlineDate(Timestamp totalOnlineDate) { 308 this.totalOnlineDate = totalOnlineDate; 309 } 310 311 @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "user") 312 public Set<OperatingHistory> getOperatingHistories() { 313 return this.operatingHistories; 314 } 315 316 public void setOperatingHistories(Set<OperatingHistory> operatingHistories) { 317 this.operatingHistories = operatingHistories; 318 } 319 320 @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "user") 321 public Set<HelpInfoBoard> getHelpInfoBoards() { 322 return this.helpInfoBoards; 323 } 324 325 public void setHelpInfoBoards(Set<HelpInfoBoard> helpInfoBoards) { 326 this.helpInfoBoards = helpInfoBoards; 327 } 328 329 @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "user") 330 public Set<ReplyInfo> getReplyInfos() { 331 return this.replyInfos; 332 } 333 334 public void setReplyInfos(Set<ReplyInfo> replyInfos) { 335 this.replyInfos = replyInfos; 336 } 337 338 @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "user") 339 public Set<HelpInfo> getHelpInfos() { 340 return this.helpInfos; 341 } 342 343 public void setHelpInfos(Set<HelpInfo> helpInfos) { 344 this.helpInfos = helpInfos; 345 } 346 347 @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "user") 348 public Set<Credit> getCredits() { 349 return this.credits; 350 } 351 352 public void setCredits(Set<Credit> credits) { 353 this.credits = credits; 354 } 355 356 } 357 358 public class UserAction extends BaseAction { 359 private User user;//PO不用加注解 360 361 @Resource 362 private UserService userService; 363 364 public String go(){ 365 System.out.println("GO GO GO"); 366 367 return SUCCESS; 368 } 369 370 371 public String save(){ 372 System.out.println("SAVE....."); 373 374 System.out.println(user); 375 String id = (String) userService.save(user); 376 System.out.println("id = " + id); 377 378 return SUCCESS; 379 } 380 381 public void setUser(User user) { 382 this.user = user; 383 } 384 385 /*public User getUser() { 386 return user; 387 }*/ 388 } 389 390 如果没有加进getUser方法,则通过struts2底层发反射生成的User对象中只有username属性有被赋值,其他属性则是null值,即使通过链接请求传参到后台,User对象的属性(除了username)都是null;为了彻底理解这个东东,就要去看struts2的源码了。 391 392 393 java.lang.IllegalArgumentException: id to load is required for loading 394 主要是一些字段的值为null,然后传到dao层,调用了HibernateTemplate的方法的时候,就会报错了。注意参数的值,在调用HibernateTemplate的方法之前进行参数判断。 395 396
为了便于搜索到这个问题,把异常信息贴上来:
1 Specification title is null! Using ‘jrebel‘ instead. 2 null: Starting logging to file: D:\学习资料汇总\三大框架\三大框架需要的包\jrebel5.3.2\jrebel.log 3 2014-06-02 19:07:57 Test: 4 2014-06-02 19:07:57 Test: ############################################################# 5 2014-06-02 19:07:57 Test: 6 2014-06-02 19:07:57 Test: null Unknown (null) 7 2014-06-02 19:07:57 Test: (c) Copyright ZeroTurnaround OU, Estonia, Tartu. 8 2014-06-02 19:07:57 Test: 9 2014-06-02 19:07:57 Test: Over the last 30 days null prevented 10 2014-06-02 19:07:57 Test: at least 91 redeploys/restarts saving you about 0.1 hours. 11 2014-06-02 19:07:57 Test: 12 2014-06-02 19:07:57 Test: Over the last 143 days null prevented 13 2014-06-02 19:07:57 Test: at least 449 redeploys/restarts saving you about 0.4 hours. 14 2014-06-02 19:07:57 Test: 15 2014-06-02 19:07:57 Test: This product is licensed to www.sdandroid.com 16 2014-06-02 19:07:57 Test: for unlimited number of developer seats on site. 17 2014-06-02 19:07:57 Test: ####### Cracked by sdandroid (blog@sdandroid.com) ###### 18 2014-06-02 19:07:57 Test: 19 2014-06-02 19:07:57 Test: The following plugins are disabled at the moment: 20 2014-06-02 19:07:57 Test: * ADF Core plugin (set -Drebel.adf_core_plugin=true to enable) 21 2014-06-02 19:07:57 Test: * ADF Faces plugin (set -Drebel.adf_faces_plugin=true to enable) 22 2014-06-02 19:07:57 Test: * Axis2 plugin (set -Drebel.axis2_plugin=true to enable) 23 2014-06-02 19:07:57 Test: * Camel plugin (set -Drebel.camel_plugin=true to enable) 24 2014-06-02 19:07:57 Test: * Click plugin (set -Drebel.click_plugin=true to enable) 25 2014-06-02 19:07:57 Test: * Deltaspike plugin (set -Drebel.deltaspike_plugin=true to enable) 26 2014-06-02 19:07:57 Test: * Eclipse RCP Plugin (set -Drebel.eclipse_plugin=true to enable) 27 2014-06-02 19:07:57 Test: * JRuby Plugin (set -Drebel.jruby_plugin=true to enable) 28 2014-06-02 19:07:57 Test: * Jersey plugin (set -Drebel.jersey_plugin=true to enable) 29 2014-06-02 19:07:57 Test: * Log4j2 plugin (set -Drebel.log4j2_plugin=true to enable) 30 2014-06-02 19:07:57 Test: * Mustache Plugin (set -Drebel.mustache_plugin=true to enable) 31 2014-06-02 19:07:57 Test: * RESTlet plugin (set -Drebel.restlet_plugin=true to enable) 32 2014-06-02 19:07:57 Test: * Seam-Wicket plugin (set -Drebel.seam_wicket_plugin=true to enable) 33 2014-06-02 19:07:57 Test: * Spring Data Plugin (set -Drebel.spring_data_plugin=true to enable) 34 2014-06-02 19:07:57 Test: * Thymeleaf Plugin (set -Drebel.thymeleaf_plugin=true to enable) 35 2014-06-02 19:07:57 Test: * VRaptor plugin (set -Drebel.vraptor_plugin=true to enable) 36 2014-06-02 19:07:57 Test: * Vaadin CDI utils plugin (set -Drebel.vaadin_cdiutils_plugin=true to enable) 37 2014-06-02 19:07:57 Test: * WebObjects plugin (set -Drebel.webobjects_plugin=true to enable) 38 2014-06-02 19:07:57 Test: 39 2014-06-02 19:07:57 Test: ############################################################# 40 2014-06-02 19:07:57 Test: 41 2014-6-2 19:07:57 org.apache.catalina.core.AprLifecycleListener init 42 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\SoftwareDeveloping\jdk1.6.0_35\bin;D:\SoftwareDeveloping\tomcat7.0.35\bin 43 2014-6-2 19:07:58 org.apache.coyote.AbstractProtocol init 44 信息: Initializing ProtocolHandler ["http-bio-8080"] 45 2014-6-2 19:07:58 org.apache.coyote.AbstractProtocol init 46 信息: Initializing ProtocolHandler ["ajp-bio-8009"] 47 2014-6-2 19:07:58 org.apache.catalina.startup.Catalina load 48 信息: Initialization processed in 731 ms 49 2014-6-2 19:07:58 org.apache.catalina.core.StandardService startInternal 50 信息: Starting service Catalina 51 2014-6-2 19:07:58 org.apache.catalina.core.StandardEngine startInternal 52 信息: Starting Servlet Engine: Apache Tomcat/7.0.35 53 2014-6-2 19:07:58 org.apache.catalina.startup.HostConfig deployDirectory 54 信息: Deploying web application directory D:\SoftwareDeveloping\tomcat7.0.35\webapps\docs 55 2014-6-2 19:07:58 org.apache.catalina.startup.HostConfig deployDirectory 56 信息: Deploying web application directory D:\SoftwareDeveloping\tomcat7.0.35\webapps\examples 57 2014-6-2 19:07:59 org.apache.catalina.core.ApplicationContext log 58 信息: ContextListener: contextInitialized() 59 2014-6-2 19:07:59 org.apache.catalina.core.ApplicationContext log 60 信息: SessionListener: contextInitialized() 61 2014-6-2 19:07:59 org.apache.catalina.core.ApplicationContext log 62 信息: ContextListener: attributeAdded(‘org.apache.jasper.compiler.TldLocationsCache‘, ‘org.apache.jasper.compiler.TldLocationsCache@58e862c‘) 63 2014-6-2 19:07:59 org.apache.catalina.startup.HostConfig deployDirectory 64 信息: Deploying web application directory D:\SoftwareDeveloping\tomcat7.0.35\webapps\host-manager 65 2014-6-2 19:07:59 org.apache.catalina.startup.HostConfig deployDirectory 66 信息: Deploying web application directory D:\SoftwareDeveloping\tomcat7.0.35\webapps\manager 67 2014-6-2 19:07:59 org.apache.catalina.startup.HostConfig deployDirectory 68 信息: Deploying web application directory D:\SoftwareDeveloping\tomcat7.0.35\webapps\Parameters 69 2014-6-2 19:08:01 org.apache.catalina.startup.TaglibUriRule body 70 信息: TLD skipped. URI: http://java.sun.com/jstl/core_rt is already defined 71 2014-6-2 19:08:01 org.apache.catalina.startup.TaglibUriRule body 72 信息: TLD skipped. URI: http://java.sun.com/jstl/core is already defined 73 2014-6-2 19:08:01 org.apache.catalina.startup.TaglibUriRule body 74 信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/core is already defined 75 2014-6-2 19:08:01 org.apache.catalina.startup.TaglibUriRule body 76 信息: TLD skipped. URI: http://java.sun.com/jstl/fmt_rt is already defined 77 2014-6-2 19:08:01 org.apache.catalina.startup.TaglibUriRule body 78 信息: TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined 79 2014-6-2 19:08:01 org.apache.catalina.startup.TaglibUriRule body 80 信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/fmt is already defined 81 2014-6-2 19:08:01 org.apache.catalina.startup.TaglibUriRule body 82 信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/functions is already defined 83 2014-6-2 19:08:01 org.apache.catalina.startup.TaglibUriRule body 84 信息: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/permittedTaglibs is already defined 85 2014-6-2 19:08:01 org.apache.catalina.startup.TaglibUriRule body 86 信息: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined 87 2014-6-2 19:08:01 org.apache.catalina.startup.TaglibUriRule body 88 信息: TLD skipped. URI: http://java.sun.com/jstl/sql_rt is already defined 89 2014-6-2 19:08:01 org.apache.catalina.startup.TaglibUriRule body 90 信息: TLD skipped. URI: http://java.sun.com/jstl/sql is already defined 91 2014-6-2 19:08:01 org.apache.catalina.startup.TaglibUriRule body 92 信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/sql is already defined 93 2014-6-2 19:08:01 org.apache.catalina.startup.TaglibUriRule body 94 信息: TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined 95 2014-6-2 19:08:01 org.apache.catalina.startup.TaglibUriRule body 96 信息: TLD skipped. URI: http://java.sun.com/jstl/xml is already defined 97 2014-6-2 19:08:01 org.apache.catalina.startup.TaglibUriRule body 98 信息: TLD skipped. URI: http://java.sun.com/jsp/jstl/xml is already defined 99 2014-6-2 19:08:02 com.sun.faces.config.ConfigureListener contextInitialized 100 信息: 初始化上下文 ‘/Parameters‘ 的 Mojarra 2.0.3 (FCS b03) 101 2014-6-2 19:08:02 com.sun.faces.spi.InjectionProviderFactory createInstance 102 信息: JSF1048:有 PostConstruct/PreDestroy 注释。标有这些注释的 ManagedBeans 方法将表示注释已处理。 103 2014-6-2 19:08:03 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info 104 信息: Parsing configuration file [struts-default.xml] 105 2014-6-2 19:08:03 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info 106 信息: Parsing configuration file [struts-plugin.xml] 107 2014-6-2 19:08:03 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info 108 信息: Parsing configuration file [struts.xml] 109 2014-6-2 19:08:03 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info 110 信息: Overriding property struts.i18n.reload - old value: false new value: true 111 2014-6-2 19:08:03 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info 112 信息: Overriding property struts.configuration.xml.reload - old value: false new value: true 113 2014-6-2 19:08:04 org.apache.catalina.startup.HostConfig deployDirectory 114 信息: Deploying web application directory D:\SoftwareDeveloping\tomcat7.0.35\webapps\ROOT 115 2014-06-02 19:08:04 Test: Directory ‘F:\Workplace\Myeclipse\StudentLifeSupportPlatformSystem\WebRoot\WEB-INF\classes‘ will be monitored for changes. 116 2014-06-02 19:08:04 Test: Directory ‘F:\Workplace\Myeclipse\StudentLifeSupportPlatformSystem\WebRoot‘ will be monitored for changes. 117 2014-6-2 19:08:04 org.apache.catalina.startup.HostConfig deployDirectory 118 信息: Deploying web application directory D:\SoftwareDeveloping\tomcat7.0.35\webapps\StudentLifeSupportPlatformSystem 119 2014-06-02 19:08:07 Test: Monitoring Log4j configuration in ‘file:/F:/Workplace/Myeclipse/StudentLifeSupportPlatformSystem/WebRoot/WEB-INF/classes/log4j.properties‘. 120 2014-6-2 19:08:07 org.apache.catalina.core.ApplicationContext log 121 信息: Initializing Spring root WebApplicationContext 122 INFO org.springframework.web.context.ContextLoader 123 Root WebApplicationContext: initialization started 124 INFO org.springframework.web.context.support.XmlWebApplicationContext 125 Refreshing org.springframework.web.context.support.XmlWebApplicationContext@5515e852: display name [Root WebApplicationContext]; startup date [Mon Jun 02 19:08:07 CST 2014]; root of context hierarchy 126 2014-06-02 19:08:07 Test: Monitoring Spring bean definitions in ‘F:\Workplace\Myeclipse\StudentLifeSupportPlatformSystem\WebRoot\WEB-INF\classes\beans.xml‘. 127 INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader 128 Loading XML bean definitions from class path resource [beans.xml] 129 INFO org.springframework.web.context.support.XmlWebApplicationContext 130 Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@5515e852]: org.springframework.beans.factory.support.DefaultListableBeanFactory@5bfc96bf 131 INFO org.springframework.beans.factory.support.DefaultListableBeanFactory 132 Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5bfc96bf: defining beans [sessionFactory,hibernateTemplate,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,creditDaoImpl,helpInfoBoardDaoImpl,helpInfoDaoImpl,operatingHistoryDaoImpl,replyInfoDaoImpl,roleDaoImpl,userDaoImpl,creditServiceImpl,helpInfoBoardServiceImpl,helpInfoServiceImpl,operatingHistoryServiceImpl,replyInfoServiceImpl,roleServiceImpl,userServiceImpl,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,transactionManager,transactionAdvice,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0]; root of factory hierarchy 133 INFO org.hibernate.cfg.annotations.Version 134 Hibernate Annotations 3.4.0.GA 135 INFO org.hibernate.cfg.Environment 136 Hibernate 3.3.2.GA 137 INFO org.hibernate.cfg.Environment 138 hibernate.properties not found 139 INFO org.hibernate.cfg.Environment 140 Bytecode provider name : javassist 141 INFO org.hibernate.cfg.Environment 142 using JDK 1.4 java.sql.Timestamp handling 143 INFO org.hibernate.annotations.common.Version 144 Hibernate Commons Annotations 3.1.0.GA 145 INFO org.hibernate.cfg.Configuration 146 configuring from url: file:/F:/Workplace/Myeclipse/StudentLifeSupportPlatformSystem/WebRoot/WEB-INF/classes/hibernate.cfg.xml 147 INFO org.hibernate.cfg.Configuration 148 Configured SessionFactory: null 149 INFO org.hibernate.cfg.AnnotationBinder 150 Binding entity from annotated class: student.life.support.platform.model.Credit 151 INFO org.hibernate.cfg.annotations.EntityBinder 152 Bind entity student.life.support.platform.model.Credit on table credit 153 INFO org.hibernate.cfg.AnnotationBinder 154 Binding entity from annotated class: student.life.support.platform.model.HelpInfo 155 INFO org.hibernate.cfg.annotations.EntityBinder 156 Bind entity student.life.support.platform.model.HelpInfo on table help_info 157 INFO org.hibernate.cfg.AnnotationBinder 158 Binding entity from annotated class: student.life.support.platform.model.HelpInfoBoard 159 INFO org.hibernate.cfg.annotations.EntityBinder 160 Bind entity student.life.support.platform.model.HelpInfoBoard on table help_info_board 161 INFO org.hibernate.cfg.AnnotationBinder 162 Binding entity from annotated class: student.life.support.platform.model.OperatingHistory 163 INFO org.hibernate.cfg.annotations.EntityBinder 164 Bind entity student.life.support.platform.model.OperatingHistory on table operating_history 165 INFO org.hibernate.cfg.AnnotationBinder 166 Binding entity from annotated class: student.life.support.platform.model.ReplyInfo 167 INFO org.hibernate.cfg.annotations.EntityBinder 168 Bind entity student.life.support.platform.model.ReplyInfo on table reply_info 169 INFO org.hibernate.cfg.AnnotationBinder 170 Binding entity from annotated class: student.life.support.platform.model.Role 171 INFO org.hibernate.cfg.annotations.EntityBinder 172 Bind entity student.life.support.platform.model.Role on table role 173 INFO org.hibernate.cfg.AnnotationBinder 174 Binding entity from annotated class: student.life.support.platform.model.User 175 INFO org.hibernate.cfg.annotations.EntityBinder 176 Bind entity student.life.support.platform.model.User on table user 177 INFO org.hibernate.cfg.annotations.CollectionBinder 178 Mapping collection: student.life.support.platform.model.HelpInfoBoard.helpInfos -> help_info 179 INFO org.hibernate.cfg.annotations.CollectionBinder 180 Mapping collection: student.life.support.platform.model.Role.users -> user 181 INFO org.hibernate.cfg.annotations.CollectionBinder 182 Mapping collection: student.life.support.platform.model.User.credits -> credit 183 INFO org.hibernate.cfg.annotations.CollectionBinder 184 Mapping collection: student.life.support.platform.model.User.helpInfoBoards -> help_info_board 185 INFO org.hibernate.cfg.annotations.CollectionBinder 186 Mapping collection: student.life.support.platform.model.User.helpInfos -> help_info 187 INFO org.hibernate.cfg.annotations.CollectionBinder 188 Mapping collection: student.life.support.platform.model.User.operatingHistories -> operating_history 189 INFO org.hibernate.cfg.annotations.CollectionBinder 190 Mapping collection: student.life.support.platform.model.User.replyInfos -> reply_info 191 INFO org.hibernate.validator.Version 192 Hibernate Validator 3.1.0.GA 193 INFO org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean 194 Building new Hibernate SessionFactory 195 INFO org.hibernate.cfg.search.HibernateSearchEventListenerRegister 196 Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled. 197 INFO org.hibernate.connection.ConnectionProviderFactory 198 Initializing connection provider: org.hibernate.connection.C3P0ConnectionProvider 199 INFO org.hibernate.connection.C3P0ConnectionProvider 200 C3P0 using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost:3306/studentlifesupportplatform 201 INFO org.hibernate.connection.C3P0ConnectionProvider 202 Connection properties: {user=root, password=****} 203 INFO org.hibernate.connection.C3P0ConnectionProvider 204 autocommit mode: false 205 INFO com.mchange.v2.log.MLog 206 MLog clients using log4j logging. 207 INFO com.mchange.v2.c3p0.C3P0Registry 208 Initializing c3p0-0.9.0.2 [built 26-September-2005 12:55:26 -0400; debug? true; trace: 10] 209 INFO com.mchange.v2.c3p0.PoolBackedDataSource 210 Initializing c3p0 pool... com.mchange.v2.c3p0.PoolBackedDataSource@7fd2443b [ connectionPoolDataSource -> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@3902274f [ acquireIncrement -> 5, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 3902274f, idleConnectionTestPeriod -> 120, initialPoolSize -> 5, maxIdleTime -> 300, maxPoolSize -> 60, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 5, nestedDataSource -> com.mchange.v2.c3p0.DriverManagerDataSource@36befe4 [ description -> null, driverClass -> null, factoryClassLocation -> null, identityToken -> 36befe4, jdbcUrl -> jdbc:mysql://localhost:3306/studentlifesupportplatform, properties -> {user=******, password=******} ], preferredTestQuery -> null, propertyCycle -> 300, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, usesTraditionalReflectiveProxies -> false ], factoryClassLocation -> null, identityToken -> 7fd2443b, numHelperThreads -> 3 ] 211 INFO org.hibernate.cfg.SettingsFactory 212 RDBMS: MySQL, version: 5.5.16 213 INFO org.hibernate.cfg.SettingsFactory 214 JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.1.17 ( Revision: ${bzr.revision-id} ) 215 INFO org.hibernate.dialect.Dialect 216 Using dialect: org.hibernate.dialect.MySQLDialect 217 INFO org.hibernate.transaction.TransactionFactoryFactory 218 Transaction strategy: org.springframework.orm.hibernate3.SpringTransactionFactory 219 INFO org.hibernate.transaction.TransactionManagerLookupFactory 220 No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended) 221 INFO org.hibernate.cfg.SettingsFactory 222 Automatic flush during beforeCompletion(): disabled 223 INFO org.hibernate.cfg.SettingsFactory 224 Automatic session close at end of transaction: disabled 225 INFO org.hibernate.cfg.SettingsFactory 226 JDBC batch size: 15 227 INFO org.hibernate.cfg.SettingsFactory 228 JDBC batch updates for versioned data: disabled 229 INFO org.hibernate.cfg.SettingsFactory 230 Scrollable result sets: enabled 231 INFO org.hibernate.cfg.SettingsFactory 232 JDBC3 getGeneratedKeys(): enabled 233 INFO org.hibernate.cfg.SettingsFactory 234 Connection release mode: auto 235 INFO org.hibernate.cfg.SettingsFactory 236 Maximum outer join fetch depth: 2 237 INFO org.hibernate.cfg.SettingsFactory 238 Default batch fetch size: 1 239 INFO org.hibernate.cfg.SettingsFactory 240 Generate SQL with comments: disabled 241 INFO org.hibernate.cfg.SettingsFactory 242 Order SQL updates by primary key: disabled 243 INFO org.hibernate.cfg.SettingsFactory 244 Order SQL inserts for batching: disabled 245 INFO org.hibernate.cfg.SettingsFactory 246 Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory 247 INFO org.hibernate.hql.ast.ASTQueryTranslatorFactory 248 Using ASTQueryTranslatorFactory 249 INFO org.hibernate.cfg.SettingsFactory 250 Query language substitutions: {} 251 INFO org.hibernate.cfg.SettingsFactory 252 JPA-QL strict compliance: disabled 253 INFO org.hibernate.cfg.SettingsFactory 254 Second-level cache: enabled 255 INFO org.hibernate.cfg.SettingsFactory 256 Query cache: disabled 257 INFO org.hibernate.cfg.SettingsFactory 258 Cache region factory : org.hibernate.cache.impl.NoCachingRegionFactory 259 INFO org.hibernate.cfg.SettingsFactory 260 Optimize cache for minimal puts: disabled 261 INFO org.hibernate.cfg.SettingsFactory 262 Structured second-level cache entries: disabled 263 INFO org.hibernate.cfg.SettingsFactory 264 Echoing all SQL to stdout 265 INFO org.hibernate.cfg.SettingsFactory 266 Statistics: disabled 267 INFO org.hibernate.cfg.SettingsFactory 268 Deleted entity synthetic identifier rollback: disabled 269 INFO org.hibernate.cfg.SettingsFactory 270 Default entity-mode: pojo 271 INFO org.hibernate.cfg.SettingsFactory 272 Named query checking : enabled 273 INFO org.hibernate.impl.SessionFactoryImpl 274 building session factory 275 INFO org.hibernate.impl.SessionFactoryObjectFactory 276 Not binding factory to JNDI, no JNDI name configured 277 INFO org.hibernate.tool.hbm2ddl.SchemaUpdate 278 Running hbm2ddl schema update 279 INFO org.hibernate.tool.hbm2ddl.SchemaUpdate 280 fetching database metadata 281 INFO org.hibernate.tool.hbm2ddl.SchemaUpdate 282 updating schema 283 INFO org.hibernate.tool.hbm2ddl.TableMetadata 284 table found: studentlifesupportplatform.credit 285 INFO org.hibernate.tool.hbm2ddl.TableMetadata 286 columns: [id, user_integral, user_id, credit_rank] 287 INFO org.hibernate.tool.hbm2ddl.TableMetadata 288 foreign keys: [credit_ibfk_1] 289 INFO org.hibernate.tool.hbm2ddl.TableMetadata 290 indexes: [primary, user_id] 291 INFO org.hibernate.tool.hbm2ddl.TableMetadata 292 table found: studentlifesupportplatform.help_info 293 INFO org.hibernate.tool.hbm2ddl.TableMetadata 294 columns: [content, id, user_qq, title, reward_integral, user_phone, accept_help, user_id, place, board_id, date_time, help_type] 295 INFO org.hibernate.tool.hbm2ddl.TableMetadata 296 foreign keys: [help_info_ibfk_2, help_info_ibfk_1] 297 INFO org.hibernate.tool.hbm2ddl.TableMetadata 298 indexes: [primary, user_id, board_id] 299 INFO org.hibernate.tool.hbm2ddl.TableMetadata 300 table found: studentlifesupportplatform.help_info_board 301 INFO org.hibernate.tool.hbm2ddl.TableMetadata 302 columns: [img_url, id, user_id, board_description, date_time, board_name] 303 INFO org.hibernate.tool.hbm2ddl.TableMetadata 304 foreign keys: [help_info_board_ibfk_1] 305 INFO org.hibernate.tool.hbm2ddl.TableMetadata 306 indexes: [primary, user_id] 307 INFO org.hibernate.tool.hbm2ddl.TableMetadata 308 table found: studentlifesupportplatform.operating_history 309 INFO org.hibernate.tool.hbm2ddl.TableMetadata 310 columns: [id, operate_url, operate_content, operate_date, user_id, operate_page, ip] 311 INFO org.hibernate.tool.hbm2ddl.TableMetadata 312 foreign keys: [operating_history_ibfk_1] 313 INFO org.hibernate.tool.hbm2ddl.TableMetadata 314 indexes: [primary, user_id] 315 INFO org.hibernate.tool.hbm2ddl.TableMetadata 316 table found: studentlifesupportplatform.reply_info 317 INFO org.hibernate.tool.hbm2ddl.TableMetadata 318 columns: [content, data_time, id, user_id, help_info_id, ip] 319 INFO org.hibernate.tool.hbm2ddl.TableMetadata 320 foreign keys: [reply_info_ibfk_1] 321 INFO org.hibernate.tool.hbm2ddl.TableMetadata 322 indexes: [primary, user_id] 323 INFO org.hibernate.tool.hbm2ddl.TableMetadata 324 table found: studentlifesupportplatform.role 325 INFO org.hibernate.tool.hbm2ddl.TableMetadata 326 columns: [id, role_permissions, role_type] 327 INFO org.hibernate.tool.hbm2ddl.TableMetadata 328 foreign keys: [] 329 INFO org.hibernate.tool.hbm2ddl.TableMetadata 330 indexes: [primary] 331 INFO org.hibernate.tool.hbm2ddl.TableMetadata 332 table found: studentlifesupportplatform.user 333 INFO org.hibernate.tool.hbm2ddl.TableMetadata 334 columns: [img_url, fixed_telephone, phonenumber, total_online_date, sex, student_num, role_id, nickname, answer, password, id, username, email, address, register_date, age, question, qq] 335 INFO org.hibernate.tool.hbm2ddl.TableMetadata 336 foreign keys: [user_ibfk_1] 337 INFO org.hibernate.tool.hbm2ddl.TableMetadata 338 indexes: [role_id, primary] 339 INFO org.hibernate.tool.hbm2ddl.SchemaUpdate 340 schema update complete 341 class student.life.support.platform.service.impl.UserServiceImpl 342 INFO org.springframework.beans.factory.support.DefaultListableBeanFactory 343 Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5bfc96bf: defining beans [sessionFactory,hibernateTemplate,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,creditDaoImpl,helpInfoBoardDaoImpl,helpInfoDaoImpl,operatingHistoryDaoImpl,replyInfoDaoImpl,roleDaoImpl,userDaoImpl,creditServiceImpl,helpInfoBoardServiceImpl,helpInfoServiceImpl,operatingHistoryServiceImpl,replyInfoServiceImpl,roleServiceImpl,userServiceImpl,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,transactionManager,transactionAdvice,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0]; root of factory hierarchy 344 INFO org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean 345 Closing Hibernate SessionFactory 346 INFO org.hibernate.impl.SessionFactoryImpl 347 closing 348 ERROR org.springframework.web.context.ContextLoader 349 Context initialization failed 350 org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘userServiceImpl‘: Injection of resource fields failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [student.life.support.platform.dao.BaseDao] is defined: expected single matching bean but found 7: [creditDaoImpl, helpInfoBoardDaoImpl, helpInfoDaoImpl, operatingHistoryDaoImpl, replyInfoDaoImpl, roleDaoImpl, userDaoImpl] 351 at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessAfterInstantiation(CommonAnnotationBeanPostProcessor.java:292) 352 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:959) 353 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) 354 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) 355 at java.security.AccessController.doPrivileged(Native Method) 356 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) 357 at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) 358 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) 359 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) 360 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) 361 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) 362 at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) 363 at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) 364 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) 365 at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) 366 at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) 367 at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) 368 at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4797) 369 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5291) 370 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 371 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) 372 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) 373 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633) 374 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114) 375 at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1673) 376 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) 377 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) 378 at java.util.concurrent.FutureTask.run(FutureTask.java:138) 379 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) 380 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) 381 at java.lang.Thread.run(Thread.java:662) 382 Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [student.life.support.platform.dao.BaseDao] is defined: expected single matching bean but found 7: [creditDaoImpl, helpInfoBoardDaoImpl, helpInfoDaoImpl, operatingHistoryDaoImpl, replyInfoDaoImpl, roleDaoImpl, userDaoImpl] 383 at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:621) 384 at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:431) 385 at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:409) 386 at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:537) 387 at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:180) 388 at org.springframework.beans.factory.annotation.InjectionMetadata.injectFields(InjectionMetadata.java:105) 389 at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessAfterInstantiation(CommonAnnotationBeanPostProcessor.java:289) 390 ... 30 more 391 2014-6-2 19:08:11 org.apache.catalina.core.StandardContext listenerStart 392 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener 393 org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘userServiceImpl‘: Injection of resource fields failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [student.life.support.platform.dao.BaseDao] is defined: expected single matching bean but found 7: [creditDaoImpl, helpInfoBoardDaoImpl, helpInfoDaoImpl, operatingHistoryDaoImpl, replyInfoDaoImpl, roleDaoImpl, userDaoImpl] 394 at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessAfterInstantiation(CommonAnnotationBeanPostProcessor.java:292) 395 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:959) 396 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) 397 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) 398 at java.security.AccessController.doPrivileged(Native Method) 399 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) 400 at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) 401 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) 402 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) 403 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) 404 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) 405 at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) 406 at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) 407 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) 408 at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) 409 at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) 410 at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) 411 at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4797) 412 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5291) 413 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 414 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) 415 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) 416 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633) 417 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1114) 418 at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1673) 419 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) 420 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) 421 at java.util.concurrent.FutureTask.run(FutureTask.java:138) 422 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) 423 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) 424 at java.lang.Thread.run(Thread.java:662) 425 Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [student.life.support.platform.dao.BaseDao] is defined: expected single matching bean but found 7: [creditDaoImpl, helpInfoBoardDaoImpl, helpInfoDaoImpl, operatingHistoryDaoImpl, replyInfoDaoImpl, roleDaoImpl, userDaoImpl] 426 at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:621) 427 at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:431) 428 at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:409) 429 at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:537) 430 at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:180) 431 at org.springframework.beans.factory.annotation.InjectionMetadata.injectFields(InjectionMetadata.java:105) 432 at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessAfterInstantiation(CommonAnnotationBeanPostProcessor.java:289) 433 ... 30 more 434 2014-6-2 19:08:11 com.sun.faces.config.ConfigureListener contextInitialized 435 信息: 初始化上下文 ‘/StudentLifeSupportPlatformSystem‘ 的 Mojarra 2.0.3 (FCS b03) 436 2014-6-2 19:08:12 com.sun.faces.spi.InjectionProviderFactory createInstance 437 信息: JSF1048:有 PostConstruct/PreDestroy 注释。标有这些注释的 ManagedBeans 方法将表示注释已处理。 438 2014-6-2 19:08:12 org.apache.catalina.core.StandardContext startInternal 439 严重: Error listenerStart 440 2014-6-2 19:08:12 org.apache.catalina.core.StandardContext startInternal 441 严重: Context [/StudentLifeSupportPlatformSystem] startup failed due to previous errors 442 2014-6-2 19:08:12 org.apache.catalina.core.ApplicationContext log 443 信息: Closing Spring root WebApplicationContext 444 2014-6-2 19:08:12 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc 445 严重: The web application [/StudentLifeSupportPlatformSystem] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. 446 2014-6-2 19:08:12 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks 447 严重: The web application [/StudentLifeSupportPlatformSystem] created a ThreadLocal with key of type [com.sun.faces.util.Util$1] (value [com.sun.faces.util.Util$1@3dbe12fe]) and a value of type [java.util.HashMap] (value [{com.sun.faces.patternCache={ = }}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 448 2014-6-2 19:08:12 org.apache.coyote.AbstractProtocol start 449 信息: Starting ProtocolHandler ["http-bio-8080"] 450 2014-6-2 19:08:12 org.apache.coyote.AbstractProtocol start 451 信息: Starting ProtocolHandler ["ajp-bio-8009"] 452 2014-6-2 19:08:12 org.apache.catalina.startup.Catalina start 453 信息: Server startup in 14684 ms
欢迎讨论交流, 我的主页:http://www.cnblogs.com/GDUT/
我的邮箱:zone.technology.exchange@gmail.com
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。