Could not parse mapping document from file

Source: Internet
Author: User

Java.lang.ExceptionInInitializerErrorat Sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method) at Sun.reflect.NativeConstructorAccessorImpl.newInstance (nativeconstructoraccessorimpl.java:62) at Sun.reflect.DelegatingConstructorAccessorImpl.newInstance (delegatingconstructoraccessorimpl.java:45) at Java.lang.reflect.Constructor.newInstance (constructor.java:408) at Org.junit.runners.BlockJUnit4ClassRunner.createTest (blockjunit4classrunner.java:202) at Org.junit.runners.blockjunit4classrunner$1.runreflectivecall (blockjunit4classrunner.java:251) at Org.junit.internal.runners.model.ReflectiveCallable.run (reflectivecallable.java:15) at Org.junit.runners.BlockJUnit4ClassRunner.methodBlock (blockjunit4classrunner.java:248) at Org.junit.runners.BlockJUnit4ClassRunner.runChild (blockjunit4classrunner.java:76) at Org.junit.runners.BlockJUnit4ClassRunner.runChild (BLOCKJUNIT4CLASSRUNNER.JAVA:50) at Org.junit.runners.parentrunner$3.run (parentrunner.java:193) at Org.junit.runners.parentrunner$1.scheDule (parentrunner.java:52) at Org.junit.runners.ParentRunner.runChildren (parentrunner.java:191) at org.junit.runners.parentrunner.access$000 (parentrunner.java:42) at Org.junit.runners.parentrunner$2.evaluate ( parentrunner.java:184) at Org.junit.runners.ParentRunner.run (parentrunner.java:236) at Org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run (JUNIT4TESTREFERENCE.JAVA:50) at Org.eclipse.jdt.internal.junit.runner.TestExecution.run (testexecution.java:38) at Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (remotetestrunner.java:467) at Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests (remotetestrunner.java:683) at Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run (remotetestrunner.java:390) at Org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main (remotetestrunner.java:197) caused by: Org.springframework.beans.factory.BeanCreationException:Error creating Bean with Name ' sessionfactory ' defined in Class path Resource [spring/applicationcontext-db. xml]: Invocation of Init method failed; Nested exception is org.hibernate.InvalidMappingException:Could no parse mapping document from File E:\workspace\webwor Kspace\movetest\webroot\web-inf\classes\com\itjb\movie\domain\movie.hbm.xmlat Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean ( abstractautowirecapablebeanfactory.java:1412) 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:291) at Org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton ( defaultsingletonbeanregistry.java:222) at Org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (abstractbeanfactory.java:288) at Org.springfraMework.beans.factory.support.AbstractBeanFactory.getBean (abstractbeanfactory.java:190) at Org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons ( defaultlistablebeanfactory.java:546) at Org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization ( abstractapplicationcontext.java:872) at Org.springframework.context.support.AbstractApplicationContext.refresh ( abstractapplicationcontext.java:423) at org.springframework.context.support.classpathxmlapplicationcontext.< Init> (classpathxmlapplicationcontext.java:139) at Org.springframework.context.support.classpathxmlapplicationcontext.<init> ( classpathxmlapplicationcontext.java:83) at com.itjb.movie.test.springutils.<clinit> (SpringUtils.java:9) ... morecaused By:org.hibernate.InvalidMappingException:Could not parse mapping document from File E:\workspace\webworks Pace\movetest\webroot\web-inf\classes\com\itjb\movie\domain\movie.hbm.xmlat org.hibernate.cfg.ConfIguration.addfile (configuration.java:406) at Org.hibernate.cfg.Configuration.addDirectory (configuration.java:764 ) at Org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory (Localsessionfactorybean.java : 710) at Org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet ( abstractsessionfactorybean.java:211) at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods ( abstractautowirecapablebeanfactory.java:1469) at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean ( abstractautowirecapablebeanfactory.java:1409) ... Morecaused By:org.hibernate.PropertyNotFoundException:field [classify] not found on com.itjb.movie.domain.Movieat Org.hibernate.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:301) at Org.hibernate.cfg.HbmBinder.createProperty (hbmbinder.java:2267) at Org.hibernate.cfg.HbmBinder.createClassProperties (hbmbinder.java:2244) at Org.hibernate.cfg.HbmBinder.createClassProperties (hbmbinder.java:2134) at Org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues (hbmbinder.java:407) at Org.hibernate.cfg.HbmBinder.bindRootClass (hbmbinder.java:321) at Org.hibernate.cfg.HbmBinder.bindRoot ( hbmbinder.java:172) at Org.hibernate.cfg.Configuration.add (configuration.java:771) at Org.hibernate.cfg.Configuration.addFile (configuration.java:396) ... More

  

Problem:

Using int in a persisted class does not use Interger.

The persistence class adds one more attribute.

Could not parse mapping document from file

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.