首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Exception >

org.springframework.beans.factory.BeanCreationException: Error creating bean wit

2014-01-26 
异常如下 javax.servlet.ServletException: Error creating bean with name sessionFactory defined in

异常如下
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)
org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping. <init> (EntityEntityModeToTuplizerMapping.java:56)
org.hibernate.tuple.entity.EntityMetamodel. <init> (EntityMetamodel.java:295)
org.hibernate.persister.entity.AbstractEntityPersister. <init> (AbstractEntityPersister.java:434)
org.hibernate.persister.entity.SingleTableEntityPersister. <init> (SingleTableEntityPersister.java:109)
org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
org.hibernate.impl.SessionFactoryImpl. <init> (SessionFactoryImpl.java:226)
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:825)
org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:751)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1202)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172)         

热点排行