Could not parse mapping document from input stream hibernate configuration exception

Source: Internet
Author: User
Tags addchild

December -, . 4: -: inafternoon Org.apache.catalina.core.StandardContext listenerstartsevere:exception sending context initializedEventTo listener instance ofclassorg.springframework.web.context.ContextLoaderListenerorg.springframework.beans.factory.BeanCreationException : Error creating Bean with name'sessionfactory'Definedinch classPath resource [Applicationcontext.xml]: Invocation of Init method failed; Nested exception isOrg.hibernate.InvalidMappingException:Could Not parse mapping document frominput stream at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean ( Abstractautowirecapablebeanfactory.java:1486) at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean ( Abstractautowirecapablebeanfactory.java:524) at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean ( Abstractautowirecapablebeanfactory.java:461) at org.springframework.beans.factory.support.abstractbeanfactory$1. GetObject (Abstractbeanfactory.java:295) at Org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton ( Defaultsingletonbeanregistry.java:223) at Org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (Abstractbeanfactory.java:292) at Org.springframework.beans.factory.support.AbstractBeanFactory.getBean (Abstractbeanfactory.java:194) at Org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons ( Defaultlistablebeanfactory.java:589) at Org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization ( Abstractapplicationcontext.java:932) at Org.springframework.context.support.AbstractApplicationContext.refresh (Abstractapplicationcontext.java: 479) at Org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext ( Contextloader.java:383) at Org.springframework.web.context.ContextLoader.initWebApplicationContext (Contextloader.java:283) at org.springframework.web.context.ContextLoaderListener.contextInitialized (Contextloaderlistener.java:  the) at Org.apache.catalina.core.StandardContext.listenerStart (Standardcontext.java:4992) at Org.apache.catalina.core.StandardContext.startInternal (Standardcontext.java:5490) at Org.apache.catalina.util.LifecycleBase.start (Lifecyclebase.java: Max) at Org.apache.catalina.core.ContainerBase.addChildInternal (Containerbase.java:901) at Org.apache.catalina.core.ContainerBase.addChild (Containerbase.java:877) at Org.apache.catalina.core.StandardHost.addChild (Standardhost.java:649) at Org.apache.catalina.startup.HostConfig.deployDirectory (Hostconfig.java:1247) at Org.apache.catalina.startup.hostconfig$deploydirectory.run (Hostconfig.java:1898) at Java.util.concurrent.executors$runnableadapter.call (Unknown Source) at Java.util.concurrent.futuretask$syn C.innerrun (Unknown source) at Java.util.concurrent.FutureTask.run (Unknown source) at Java.util.concurrent.ThreadPool Executor.runworker (Unknown source) at Java.util.concurrent.threadpoolexecutor$worker.run (Unknown source) at Java.lan G.thread.run (Unknown Source) caused by:org.hibernate.InvalidMappingException:Could not parse mapping document frominput stream at Org.hibernate.cfg.configuration$metadatasourcequeue.processhbmxml (Configuration.java:4009) at Org.hibernate.cfg.configuration$metadatasourcequeue.processhbmxmlqueue (Configuration.java:3998) at Org.hibernate.cfg.configuration$metadatasourcequeue.processmetadata (Configuration.java:3986) at Org.hibernate.cfg.Configuration.secondPassCompile (Configuration.java:1398) at Org.hibernate.cfg.Configuration.buildMappings (Configuration.java:1375) at Org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory ( Localsessionfactorybean.java:720) at Org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet ( Abstractsessionfactorybean.java:188) at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods ( Abstractautowirecapablebeanfactory.java:1545) at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean ( Abstractautowirecapablebeanfactory.java:1483)    ...  -morecaused By:org.hibernate.PropertyNotFoundException:field [id] not found on Cn.xx.shop.user.vo.User at Org.hib Ernate.property.DirectPropertyAccessor.getField (Directpropertyaccessor.java:182) at Org.hibernate.property.DirectPropertyAccessor.getField (Directpropertyaccessor.java:174) at Org.hibernate.property.DirectPropertyAccessor.getGetter (Directpropertyaccessor.java:197) at Org.hibernate.util.ReflectHelper.getter (Reflecthelper.java:241) at Org.hibernate.util.ReflectHelper.reflectedPropertyClass (Reflecthelper.java:229) at Org.hibernate.mapping.SimpleValue.setTypeUsingReflection (Simplevalue.java: the) at Org.hibernate.cfg.HbmBinder.bindSimpleId (Hbmbinder.java:454) at Org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues (Hbmbinder.java:387) at Org.hibernate.cfg.HbmBinder.bindRootClass (Hbmbinder.java:326) at Org.hibernate.cfg.HbmBinder.bindRoot (Hbmbinder.java:177) at Org.hibernate.cfg.configuration$metadatasourcequeue.processhbmxml (Configuration.java:4006)    ...  theMore

The entity class does not match the map file ID column of the table.

Entity class mapping File database table fields. No match, check whether the name is the same.

Could not parse mapping document from input stream hibernate configuration exception

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.