当前位置: 代码迷 >> Java Web开发 >> Hibernat+Spring 有关问题
  详细解决方案

Hibernat+Spring 有关问题

热度:96   发布时间:2016-04-17 14:16:42.0
Hibernat+Spring 问题

org.springframework.beans.factory.BeanCreationException:   Error   creating   bean   with   name   'userTarget '   defined   in   class   path   resource   [applicationContext.xml]:   Can 't   resolve   reference   to   bean   'userDAO '   while   setting   property   'userDAO ';   nested   exception   is   org.springframework.beans.factory.BeanCreationException:   Error   creating   bean   with   name   'userDAO '   defined   in   class   path   resource   [applicationContext.xml]:   Instantiation   of   bean   failed;   nested   exception   is   java.lang.NoClassDefFoundError:   org/hibernate/SessionFactory
org.springframework.beans.factory.BeanCreationException:   Error   creating   bean   with   name   'userDAO '   defined   in   class   path   resource   [applicationContext.xml]:   Instantiation   of   bean   failed;   nested   exception   is   java.lang.NoClassDefFoundError:   org/hibernate/SessionFactory
java.lang.NoClassDefFoundError:   org/hibernate/SessionFactory
at   java.lang.Class.getDeclaredMethods0(Native   Method)
at   java.lang.Class.privateGetDeclaredMethods(Unknown   Source)
at   java.lang.Class.getDeclaredMethods(Unknown   Source)
at   java.beans.Introspector$1.run(Unknown   Source)
at   java.security.AccessController.doPrivileged(Native   Method)
at   java.beans.Introspector.getPublicDeclaredMethods(Unknown   Source)
at   java.beans.Introspector.getTargetMethodInfo(Unknown   Source)
at   java.beans.Introspector.getBeanInfo(Unknown   Source)
at   java.beans.Introspector.getBeanInfo(Unknown   Source)
at   java.beans.Introspector.getBeanInfo(Unknown   Source)
at   java.beans.Introspector. <init> (Unknown   Source)
at   java.beans.Introspector.getBeanInfo(Unknown   Source)
at   org.springframework.beans.CachedIntrospectionResults. <init> (CachedIntrospectionResults.java:140)
at   org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:82)
at   org.springframework.beans.BeanWrapperImpl.setIntrospectionClass(BeanWrapperImpl.java:310)
at   org.springframework.beans.BeanWrapperImpl.setWrappedInstance(BeanWrapperImpl.java:268)
at   org.springframework.beans.BeanWrapperImpl.setWrappedInstance(BeanWrapperImpl.java:250)
at   org.springframework.beans.BeanWrapperImpl. <init> (BeanWrapperImpl.java:203)
at   org.springframework.beans.factory.support.AbstractBeanFactory.createBeanWrapper(AbstractBeanFactory.java:558)
at   org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:317)
at   org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:257)
at   org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:223)
at   org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at   org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveReference(AbstractAutowireCapableBeanFactory.java:1021)
at   org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:944)
at   org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:885)
  相关解决方案