Invocation of init method failed; nested exception is org.hibernate.MappingException: Could not determine type for: org.springside.examples.miniweb.entity.account.User, at table: acct_company, for columns: [org.hibernate.mapping.Column(user)]把错误贴全,尤其是错误的堆栈信息
org.springside.examples.miniweb.entity.account.User, at table: acct_company, for columns: [org.hibernate.mapping.Column(user)]

解决方案 »

  1.   

    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.authenticationManager': Cannot resolve reference to bean 'org.springframework.security.authentication.dao.DaoAuthenticationProvider#0' while setting bean property 'providers' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.authentication.dao.DaoAuthenticationProvider#0': Cannot resolve reference to bean 'userDetailsService' while setting bean property 'userDetailsService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDetailsService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.springside.examples.miniweb.service.account.UserDetailsServiceImpl.setAccountManager(org.springside.examples.miniweb.service.account.AccountManager); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountManager': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.springside.examples.miniweb.service.account.AccountManager.setUserDao(org.springside.examples.miniweb.dao.account.UserDao); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.springside.modules.orm.hibernate.SimpleHibernateDao.setSessionFactory(org.hibernate.SessionFactory); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in URL [file:/D:/Java_Tools/apache-tomcat-6.0.36-windows-x86/apache-tomcat-6.0.36/webapps/mini-web/WEB-INF/classes/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: Could not determine type for: java.util.List, at table: acct_user, for columns: [org.hibernate.mapping.Column(company_list)]
      

  2.   

    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.authenticationManager': Cannot resolve reference to bean 'org.springframework.security.authentication.dao.DaoAuthenticationProvider#0' while setting bean property 'providers' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.authentication.dao.DaoAuthenticationProvider#0': Cannot resolve reference to bean 'userDetailsService' while setting bean property 'userDetailsService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDetailsService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.springside.examples.miniweb.service.account.UserDetailsServiceImpl.setAccountManager(org.springside.examples.miniweb.service.account.AccountManager); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountManager': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.springside.examples.miniweb.service.account.AccountManager.setUserDao(org.springside.examples.miniweb.dao.account.UserDao); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.springside.modules.orm.hibernate.SimpleHibernateDao.setSessionFactory(org.hibernate.SessionFactory); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in URL [file:/D:/Java_Tools/apache-tomcat-6.0.36-windows-x86/apache-tomcat-6.0.36/webapps/mini-web/WEB-INF/classes/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: Could not determine type for: java.util.List, at table: acct_user, for columns: [org.hibernate.mapping.Column(company_list)]
      

  3.   

    http://nvry.iteye.com/blog/1729436注解要么写在字段上,要么写在getXX上,千万千万不能混合使用,否则会报这个错误