2010-8-19 15:34:22 org.apache.catalina.core.AprLifecycleListener init
信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\develop\Java\jdk1.6.0_11\bin;C:\develop\Tomcat\bin
2010-8-19 15:34:22 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2010-8-19 15:34:22 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 445 ms
2010-8-19 15:34:22 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2010-8-19 15:34:22 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.14
2010-8-19 15:34:23 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN No appenders could be found for logger (org.springframework.core.CollectionFactory).
log4j:WARN Please initialize the log4j system properly.
2010-8-19 15:34:33 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
2010-8-19 15:34:37 org.apache.catalina.core.StandardContext listenerStart
严重: 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.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
at net.sf.cglib.core.ClassEmitter.begin_class(ClassEmitter.java:77)
at net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:173)
at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:117)
at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:295)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:814)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:732)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
... 39 more
2010-8-19 15:34:37 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
2010-8-19 15:34:37 org.apache.catalina.core.StandardContext start
严重: Context [/ydq0301_s2sh_fileupload_db] startup failed due to previous errors
2010-8-19 15:34:37 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
2010-8-19 15:34:37 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2010-8-19 15:34:37 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2010-8-19 15:34:37 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/15 config=null
2010-8-19 15:34:37 org.apache.catalina.startup.Catalina start
信息: Server startup in 15461 ms
解决办法:
删除项目中重复的jar包和asm-2.3.2.jar
分享到:
相关推荐
对于Hibernate,错误`org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in resource`可能是因为缺少JTA(Java Transaction API)的支持,例如找...
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean ...
首先,异常信息"Error creating bean with name 'sessionFactory' defined in class path resource"通常表示Spring容器在创建sessionFactory bean时遇到了问题。sessionFactory是Hibernate用于创建session的工厂类,...
在SSH2中,Spring作为容器管理Struts2的Action和Hibernate的SessionFactory等组件。开发者可以通过Spring配置文件(如beans.xml)定义Bean的生命周期和依赖关系。此外,Spring还提供事务管理,确保数据库操作的一致...
<property name="sessionFactory" ref="sessionFactory"/> </bean> ``` 现在,当我们在Service层进行数据库操作时,可以利用Spring的声明式事务管理。例如: ```java @Service @Transactional public class ...
在Spring框架中,整合Hibernate是常见的操作,Spring通过其强大的依赖注入(DI)特性,能够帮助我们更好地管理和控制SessionFactory以及与Hibernate相关的操作。本示例将深入探讨如何使用Spring将SessionFactory注入...
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'SessionFactory' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Invocation of init...
@Bean(name = "sessionFactory1") public LocalSessionFactoryBean sessionFactory1(@Qualifier("dataSource1") DataSource ds) { // 设置配置... } // 配置SessionFactory2 @Bean(name = "sessionFactory2")...
例如,通过在Spring配置文件中定义SessionFactory bean,我们可以控制其初始化、关闭,以及事务管理等行为。 在Spring中,我们通常会使用`<bean>`标签来声明SessionFactory,如下所示: ```xml <bean id=...
在Java的持久化框架Hibernate中,`SessionFactory`是核心组件之一,它负责管理数据库会话并提供对象-关系映射(ORM)的功能。本篇文章将深入探讨`SessionFactory`的使用,以及如何创建和操作它。 `SessionFactory`...
另外,文档中提及了Spring框架在应用中可能遇到的一个错误提示:“BeanCreationException: Error creating bean with name 'sessionFactory'”。这通常是因为bean的配置或Spring与Hibernate配置冲突导致的。解决此类...
HibernateSessionFactory.java
本篇文章将深入探讨`HibernateSessionFactory`及其在Hibernate中的作用,以及如何使用它来实现增、删、查、改(CRUD)操作。 `SessionFactory`是Hibernate的核心组件,它是线程安全的,负责管理数据库连接和会话。`...
4. `spring-config.xml`和`beans.xml`: 这些是Spring框架的配置文件,可能包含SessionFactory和相关bean的配置,以及事务管理的设置,这些设置将直接影响到`getCurrentSession()`的行为。 5. `ehcache_hibernate.xml...
"table-to-bean"是一个这样的实践,它涉及到将数据库中的表结构映射到Java程序中的实体类,也就是所谓的Bean。下面我们将深入探讨这一主题。 1. **对象关系映射(ORM)**:ORM是一种技术,它允许程序员使用面向对象...
异常信息:“Error creating bean with name 'hibernateSessionFactory'” 这通常是因为在Spring容器初始化阶段,名为`hibernateSessionFactory`的Bean创建失败。问题可能出在: - **配置错误**:检查`WEB-INF/...
### Spring框架配置Bean的高级属性解析 在Spring框架中配置Bean是进行依赖注入的基础操作,而深入理解如何高效地配置Bean及其属性对于提高开发效率、优化项目结构具有重要意义。本文将详细解读标题“spring框架配置...
@Bean(name = "sessionFactory1") public LocalSessionFactoryBean sessionFactory1() { LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean(); sessionFactory.setDataSource(dataSource1)...