日期:2014-05-17  浏览次数:20699 次

Error creating bean with name 'sessionFactory' defined in class path resource
Java code
2009-8-6 9:47:06 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: D:\Program Files\MyEclipse 6.0\bin;D:\Program Files\MyEclipse 6.0\myeclipse\eclipse\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_6.0.1.zmyeclipse601200710\tomcat\bin
2009-8-6 9:47:06 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2009-8-6 9:47:06 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 637 ms
2009-8-6 9:47:06 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2009-8-6 9:47:06 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.13
2009-8-6 9:47:08 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.
2009-8-6 9:47:10 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 class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingNotFoundException: resource: com/whda/entity/Immobility.hbm.xml not found
Caused by: org.hibernate.MappingNotFoundException: resource: com/whda/entity/Immobility.hbm.xml not found
    at org.hibernate.cfg.Configuration.addResource(Configuration.java:563)
    at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1587)
    at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1555)
    at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1534)
    at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1508)
    at org.hibernate.cfg.Configuration.configure(Configuration.java:1443)
    at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:634)
    at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1198)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1167)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preI