问题描述
2014-12-3121:29:47org.apache.catalina.core.AprLifecycleListenerinit信息:TheApacheTomcatNativelibrarywhichallowsoptimalperformanceinproductionenvironmentswasnotfoundonthejava.library.path:G:Myeclipse10.7Commonbinarycom.sun.java.jdk.win32.x86_64_1.6.0.013bin;G:Myeclipse10.7Commonpluginscom.genuitec.eclipse.easie.tomcat.myeclipse_9.0.0.me201211011550tomcatbin2014-12-3121:29:47org.apache.coyote.http11.Http11Protocolinit信息:InitializingCoyoteHTTP/1.1onhttp-80802014-12-3121:29:47org.apache.catalina.startup.Catalinaload信息:Initializationprocessedin333ms2014-12-3121:29:47org.apache.catalina.core.StandardServicestart信息:StartingserviceCatalina2014-12-3121:29:47org.apache.catalina.core.StandardEnginestart信息:StartingServletEngine:ApacheTomcat/6.0.132014-12-3121:29:48org.apache.catalina.core.ApplicationContextlog信息:InitializingSpringrootWebApplicationContextlog4j:WARNNoappenderscouldbefoundforlogger(org.springframework.web.context.ContextLoader).log4j:WARNPleaseinitializethelog4jsystemproperly.2014-12-3121:29:49org.apache.catalina.core.StandardContextlistenerStart严重:Exceptionsendingcontextinitializedeventtolistenerinstanceofclassorg.springframework.web.context.ContextLoaderListenerorg.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'sessionFactory'definedinServletContextresource[/WEB-INF/classes/applicationContext.xml]:Invocationofinitmethodfailed;nestedexceptionisorg.hibernate.InvalidMappingException:Couldnotparsemappingdocumentfrominputstreamatorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)atorg.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)atorg.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)atorg.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)atorg.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:189)atorg.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)atorg.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)atorg.apache.catalina.core.StandardContext.start(StandardContext.java:4334)atorg.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)atorg.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)atorg.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)atorg.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)atorg.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)atorg.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)atorg.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)atorg.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)atorg.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)atorg.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)atorg.apache.catalina.core.StandardHost.start(StandardHost.java:719)atorg.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)atorg.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)atorg.apache.catalina.core.StandardService.start(StandardService.java:516)atorg.apache.catalina.core.StandardServer.start(StandardServer.java:710)atorg.apache.catalina.startup.Catalina.start(Catalina.java:566)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:597)atorg.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)atorg.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)Causedby:org.hibernate.InvalidMappingException:Couldnotparsemappingdocumentfrominputstreamatorg.hibernate.cfg.Configuration$MetadataSourceQueue.processHbmXml(Configuration.java:3409)atorg.hibernate.cfg.Configuration$MetadataSourceQueue.processHbmXmlQueue(Configuration.java:3398)atorg.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3386)atorg.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1341)atorg.hibernate.cfg.Configuration.buildMappings(Configuration.java:1307)atorg.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:717)atorg.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)...36moreCausedby:org.hibernate.DuplicateMappingException:Duplicateclass/entitymappingygr.login.useratorg.hibernate.cfg.Configuration$MappingsImpl.addClass(Configuration.java:2574)atorg.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:172)atorg.hibernate.cfg.Configuration$MetadataSourceQueue.processHbmXml(Configuration.java:3406)...44more2014-12-3121:29:49org.apache.catalina.core.StandardContextstart严重:ErrorlistenerStart2014-12-3121:29:49org.apache.catalina.core.StandardContextstart严重:Context[/ygr]startupfailedduetopreviouserrors2014-12-3121:29:49org.apache.catalina.core.ApplicationContextlog信息:ClosingSpringrootWebApplicationContextlog4j:ERRORLogMananger.repositorySelectorwasnulllikelyduetoerrorinclassreloading,usingNOPLoggerRepository.2014-12-3121:29:49org.apache.coyote.http11.Http11Protocolstart信息:StartingCoyoteHTTP/1.1onhttp-80802014-12-3121:29:49org.apache.jk.common.ChannelSocketinit信息:JK:ajp13listeningon/0.0.0.0:80092014-12-3121:29:49org.apache.jk.server.JkMainstart信息:JkrunningID=0time=0/16config=null2014-12-3121:29:49org.apache.catalina.startup.Catalinastart信息:Serverstartupin2743ms
解决方案
解决方案二:
/applicationContext.xm可能有配置的语法错误你在仔细检查一下
解决方案三:
Causedby:org.hibernate.DuplicateMappingException:Duplicateclass/entitymappingygr.login.user,你检查下你的hibernate配置文件看看
解决方案四:
Spring的sessionFactory初始化错误,再往下看是Hibernate的映射文件有问题