当前位置: 代码迷 >> Java Web开发 >> sessionFactory的有关问题Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invo
  详细解决方案

sessionFactory的有关问题Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invo

热度:990   发布时间:2016-04-17 13:10:19.0
sessionFactory的问题Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invo
异常如下
javax.servlet.ServletException:   Error   creating   bean   with   name   'sessionFactory '   defined   in   class   path   resource   [applicationContext.xml]:   Invocation   of   init   method   failed;   nested   exception   is   java.lang.NoClassDefFoundError
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root   cause  

org.springframework.beans.factory.BeanCreationException:   Error   creating   bean   with   name   'sessionFactory '   defined   in   class   path   resource   [applicationContext.xml]:   Invocation   of   init   method   failed;   nested   exception   is   java.lang.NoClassDefFoundError
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1175)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:428)
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284)
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
org.springframework.context.support.ClassPathXmlApplicationContext. <init> (ClassPathXmlApplicationContext.java:91)
org.springframework.context.support.ClassPathXmlApplicationContext. <init> (ClassPathXmlApplicationContext.java:75)
org.springframework.context.support.ClassPathXmlApplicationContext. <init> (ClassPathXmlApplicationContext.java:65)
com.privilege.action.RolesListAction.execute(RolesListAction.java:52)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root   cause  

java.lang.NoClassDefFoundError
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:117)
org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
org.hibernate.tuple.entity.AbstractEntityTuplizer. <init> (AbstractEntityTuplizer.java:135)
org.hibernate.tuple.entity.PojoEntityTuplizer. <init> (PojoEntityTuplizer.java:55)
  相关解决方案