2 penggng1 penggng1 于 2015.06.11 12:53 提问

BeanCreationException

严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.hibernate.cfg.annotations.reflection.XMLContext$Default.getDelimitedIdentifier()Ljava/lang/Boolean;
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:736)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4729)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:586)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1750)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoSuchMethodError: org.hibernate.cfg.annotations.reflection.XMLContext$Default.getDelimitedIdentifier()Ljava/lang/Boolean;
at org.hibernate.cfg.annotations.reflection.JPAMetadataProvider.getDefaults(JPAMetadataProvider.java:90)
at org.hibernate.annotations.common.reflection.java.JavaReflectionManager.getDefaults(JavaReflectionManager.java:252)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1388)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1846)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1930)
at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:372)
at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:454)
at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:439)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1633)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1570)
... 25 more

1个回答

u013147600
u013147600   2015.06.11 15:12

你去看看是不是 没有配置 监听 或是 少了什么包

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!
其他相关推荐
启动tomcat,出现BeanCreationException以及NUllPointerException
信誓旦旦决定在CSDN上写bolg记录自己平时遇到的bug,结果那天之后居然就没再写过了,正好最近遇到个特别头疼的bug,就趁着中秋放假,把它记录下来吧。 问题描述:前一天还运行正常的一个maven项目,第二天启动的时候出现了如下错误: 控制台打印信息如下: Caused by: org.springframework.beans.factory.BeanCreationException:
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
莫名其妙的BeanCreationException异常
前言 根据部门技术要求,同时提高系统的稳定性和易维护性,需要对现有系统进行技术升级改造,在技术改造的过程中难免会遇到一些问题,令我印象比较深刻的就是文章标题所说的BeanCreationException异常,这个看似比较常见的异常出现的原因却和常见的配置文件错误以及包冲突不太一样,本文针对解决这个异常问题做一个简单的总结。 背景 当时项目启动之初,为了使项目能够尽快上线,把部门原有项目...
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
关于BeanCreationException的异常处理
在运行Tomcat服务器之后,项目的控制台就打印了这些异常和错误,刚接触SSM,故对未来遇见的异常做个记录,并将解决过程贴上,为同道中人做个标记吧 严重: StandardWrapper.Throwable org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'card
BeanCreationException异常,注入Bean异常
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘XXX’注入bean异常,出现这个异常就是找不到对应的JavaBean了,能够导致JavaBean注入失败的原因常见有以下几种:对应的 bean 没有添加注解;对应的 bean 添加注解错误,例如将 Spring 的@Ser...
Intellij IDEA中Spring配置aop增强事务 出现BeanCreationException异常处理方法
项目缺少aspects依赖 解决办法:在pom.xml文件配置依赖<dependency> <groupId>org.springframework</groupId> <artifactId>spring-aspects</artifactId> <version>4.2.1.RELEASE</version> </dependency>
Spring Boot异常:BeanCreationException:Injection of autowired dependencies failed;
问题描述: 在使用spring boot框架实现事务控制demo时,启动项目报错如下: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'queryTypeController': Injection of autowired dependencies failed
单点登录(五)-----遇到问题-----cas server 源码部署tomcat运行报错BeanCreationException:Error creating bean with name 's
我们在上一篇文章已经解决了把下载好的cas server源码部署到tomcat缺少子项目编辑文件或者jar包导致找不到class报错的问题单点登录(四)-----遇到问题-----cas server 源码部署tomcat运行报错ClassNotFoundException: org.jasig.cas.CasEnvironmentCo但是运行时还是报错了BeanCreationException
spring抛出BeanCreationException之@Autowired,@Qualifier
如果多个mvn项目中,有相同的javaBean,再spring中的@Autowired,自动注册时,jdk不同版本会报错,特别是jdk1.8,会抛出BeanCreationException异常,如上图。 这时需要结合@Qualifier使用, 这样Spring会找到id为baseService的bean进行装配。