2 cai772088996 cai772088996 于 2016.05.02 20:59 提问

SSH集成一个配置文件报错:BeanCreationException

错误中涉及到的database.xml文件---》

图片说明

异常信息如下----》

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [database.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/hibernate/cache/CacheProvider
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:532)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:589)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5068)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5584)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1572)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1562)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NoClassDefFoundError: org/hibernate/cache/CacheProvider
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2442)
at java.lang.Class.privateGetPublicMethods(Class.java:2562)
at java.lang.Class.getMethods(Class.java:1427)
at org.springframework.beans.ExtendedBeanInfoFactory.supports(ExtendedBeanInfoFactory.java:53)
at org.springframework.beans.ExtendedBeanInfoFactory.getBeanInfo(ExtendedBeanInfoFactory.java:44)
at org.springframework.beans.CachedIntrospectionResults.(CachedIntrospectionResults.java:239)
at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:155)
at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:323)
at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptorInternal(BeanWrapperImpl.java:353)
at org.springframework.beans.BeanWrapperImpl.isWritableProperty(BeanWrapperImpl.java:429)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1132)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
... 21 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.cache.CacheProvider
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1858)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1701)
... 35 more

1个回答

devmiao
devmiao   Ds   Rxr 2016.05.02 23:54
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!
其他相关推荐
SSH整合中碰到的一个问题 BeanCreationException
今天下午在搞一个简单的用户注册和登录程序,使用SSH框架搭建。我使用的是Struts1.2 Spring2.0和Hibernate3.0。<br /> 在Struts的execute的方法中来进行数据验证,这个地方加入Spring的依赖注入。<br /> 问题就出在这里:<br /> ApplicationContext context = null;<br /> context = new ClassPathXmlApplicationContext("applicationContext
BeanCreationException
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [applicationContext-jpa.xml]: Invocation of init method fai
莫名其妙的BeanCreationException异常
前言 根据部门技术要求,同时提高系统的稳定性和易维护性,需要对现有系统进行技术升级改造,在技术改造的过程中难免会遇到一些问题,令我印象比较深刻的就是文章标题所说的BeanCreationException异常,这个看似比较常见的异常出现的原因却和常见的配置文件错误以及包冲突不太一样,本文针对解决这个异常问题做一个简单的总结。 背景 当时项目启动之初,为了使项目能够尽快上线,把部门原有项目...
关于BeanCreationException的异常处理
在运行Tomcat服务器之后,项目的控制台就打印了这些异常和错误,刚接触SSM,故对未来遇见的异常做个记录,并将解决过程贴上,为同道中人做个标记吧 严重: StandardWrapper.Throwable org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'card
报错BeanCreationException之ExceptionInInitializerError
当在静态初始化块中出现了异常的时候,JVM会抛出 java.lang.ExceptionInInitializerError异常。如果你了解Java中的静态变量,你会知道它们是在类加载的时候进行初始化的。 如果在这个静态变量初始化的过程中出现了异常,那么就会抛出 java.lang.ExceptionInInitializerError异常。任何异常都可能会引发这种情况,比如说,java
安装dubbo-admin报错 URIType BeanCreationException
用jdk1.8+tomcat安装dubbo-admin的时候,启动tomcat 报错如下 参见tomcat/logs/dubbo-governance.log 里面的报错信息 ERROR context.ContextLoader - Context initialization failed org.springframework.beans.factory.BeanCreationExce
BeanCreationException解决
使用了mybatis的mapper配置完成操作然后不小心就抛出了这个异常, 2018-02-01 12:09:51.738 [localhost-startStop-1] ERROR o.s.web.context.ContextLoader - Context initialization failed org.springframework.beans.factory.BeanCreati
ssh配置文件ssh配置文件
ssh配置文件ssh配置文件ssh配置文件ssh配置文件
BeanCreationException报错启动不起来(jar包冲突)
一月 23, 2015 3:46:13 下午 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on th
启动tomcat,出现BeanCreationException以及NUllPointerException
信誓旦旦决定在CSDN上写bolg记录自己平时遇到的bug,结果那天之后居然就没再写过了,正好最近遇到个特别头疼的bug,就趁着中秋放假,把它记录下来吧。 问题描述:前一天还运行正常的一个maven项目,第二天启动的时候出现了如下错误: 控制台打印信息如下: Caused by: org.springframework.beans.factory.BeanCreationException: