2013年10月28日星期一

Seeking heroes help solve ah , one day the all .......

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 'sessionFactory1' defined in class path resource [config / applicationContext.xml]: ; Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Unable to read XML
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean (AbstractAutowireCapableBeanFactory.java: 1455)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java: 519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java: 456)
at org.springframework.beans.factory.support.AbstractBeanFactory $ 1.getObject (AbstractBeanFactory.java: 294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java: 225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java: 291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java: 193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons (DefaultListableBeanFactory.java: 567)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization (AbstractApplicationContext.java: 913)
at org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java: 464)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext (ContextLoader.java: 385)
at org.springframework.web.context.ContextLoader.initWebApplicationContext (ContextLoader.java: 284)
at org.springframework.web.context.ContextLoaderListener.contextInitialized (ContextLoaderListener.java: 111)
at org.apache.catalina.core.StandardContext.listenerStart (StandardContext.java: 4206)
at org.apache.catalina.core.StandardContext.start (StandardContext.java: 4705)
at org.apache.catalina.core.ContainerBase.addChildInternal (ContainerBase.java: 799)
at org.apache.catalina.core.ContainerBase.addChild (ContainerBase.java: 779)
at org.apache.catalina.core.StandardHost.addChild (StandardHost.java: 601)
at org.apache.catalina.startup.HostConfig.deployDirectory (HostConfig.java: 1079)
at org.apache.catalina.startup.HostConfig.deployDirectories (HostConfig.java: 1002)
at org.apache.catalina.startup.HostConfig.deployApps (HostConfig.java: 506)
at org.apache.catalina.startup.HostConfig.start (HostConfig.java: 1317)
at org.apache.catalina.startup.HostConfig.lifecycleEvent (HostConfig.java: 324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent (LifecycleSupport.java: 142)
at org.apache.catalina.core.ContainerBase.start (ContainerBase.java: 1065)
at org.apache.catalina.core.StandardHost.start (StandardHost.java: 840)
at org.apache.catalina.core.ContainerBase.start (ContainerBase.java: 1057)
at org.apache.catalina.core.StandardEngine.start (StandardEngine.java: 463)
at org.apache.catalina.core.StandardService.start (StandardService.java: 525)
at org.apache.catalina.core.StandardServer.start (StandardServer.java: 754)
at org.apache.catalina.startup.Catalina.start (Catalina.java: 595)
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: 289)
at org.apache.catalina.startup.Bootstrap.main (Bootstrap.java: 414)
Caused by: org.hibernate.InvalidMappingException: Unable to read XML
at org.hibernate.internal.util.xml.MappingReader.readMappingDocument (MappingReader.java: 109)
at org.hibernate.cfg.Configuration.add (Configuration.java: 478)
at org.hibernate.cfg.Configuration.add (Configuration.java: 474)
at org.hibernate.cfg.Configuration.add (Configuration.java: 647)
at org.hibernate.cfg.Configuration.addInputStream (Configuration.java: 685)
at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet (LocalSessionFactoryBean.java: 272)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods (AbstractAutowireCapableBeanFactory.java: 1514)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean (AbstractAutowireCapableBeanFactory.java: 1452)
... 36 more
Caused by: org.dom4j.DocumentException: http://www.jboss.org/dtd/hibernate/hibernate-mapping-3.0.dtd% 20 Nested exception: http: / / www.jboss.org/dtd/hibernate/hibernate-mapping-3.0.dtd% 20
at org.dom4j.io.SAXReader.read (SAXReader.java: 484)
at org.hibernate.internal.util.xml.MappingReader.readMappingDocument (MappingReader.java: 78)
... 43 more
------ Solution ---------------------------- ----------------
your configuration file is automatically generated tool bar ? http://www.jboss.org/dtd/hibernate/hibernate-mapping-3.0.dtd % 20

red stuff is a space inside look at the configuration file is not there for a space , removed.
------ Solution ---------------------------------------- ----
you generate a configuration file in the .
------ For reference only -------------------------------------- -
config / applicationContext.xml can not read the file. Have you checked under the file. Which is not that something was wrong .
------ For reference only -------------------------------------- -
you bean sessionFactory1 wrong bar . To see what is wrong with this naming .
------ For reference only -------------------------------------- -
first floor of positive solutions . So familiar to% 20 .
------ For reference only -------------------------------------- -
  This reply was moderator deleted at 2013-10-29 08:26:19

------ For reference only ---------------------------------- -----
org.hibernate.InvalidMappingException: Unable to read XML
to see this again. . .
------ For reference only -------------------------------------- -


Yes, ah, I was myeclipse configuration is automatically generated , http://www.jboss.org/dtd/hibernate/hibernate-mapping-3.0.dtd % 20 This sentence where ah

没有评论:

发表评论