-
Apr 23rd, 2011, 05:15 PM
#1
Error running the spring-hibernate application
Hi,
I am getting an error while starting the application. It is a simple application which uses Spring on the web side and Hibernate to manage jdbc. Couldn't identify the error. Can anyone please help me?
Listing out the error log below:
- error log
554 [main] ERROR org.hibernate.util.XMLHelper - Error parsing XML: XML InputStream(6) Element type "hibernate-mapping" must be declared.
554 [main] ERROR org.hibernate.util.XMLHelper - Error parsing XML: XML InputStream(6) Attribute "default-cascade" must be declared for element type "hibernate-mapping".
554 [main] ERROR org.hibernate.util.XMLHelper - Error parsing XML: XML InputStream(6) Attribute "default-access" must be declared for element type "hibernate-mapping".
554 [main] ERROR org.hibernate.util.XMLHelper - Error parsing XML: XML InputStream(6) Attribute "default-lazy" must be declared for element type "hibernate-mapping".
554 [main] ERROR org.hibernate.util.XMLHelper - Error parsing XML: XML InputStream(6) Attribute "auto-import" must be declared for element type "hibernate-mapping".
572 [main] ERROR org.hibernate.util.XMLHelper - Error parsing XML: XML InputStream(7) Element type "class" must be declared.
572 [main] ERROR org.hibernate.util.XMLHelper - Error parsing XML: XML InputStream(7) Attribute "name" must be declared for element type "class".
573 [main] ERROR org.hibernate.util.XMLHelper - Error parsing XML: XML InputStream(7) Attribute "table" must be declared for element type "class".
576 [main] ERROR org.hibernate.util.XMLHelper - Error parsing XML: XML InputStream(9) Element type "id" must be declared.
576 [main] ERROR org.hibernate.util.XMLHelper - Error parsing XML: XML InputStream(9) Attribute "name" must be declared for element type "id".
576 [main] ERROR org.hibernate.util.XMLHelper - Error parsing XML: XML InputStream(9) Attribute "type" must be declared for element type "id".
576 [main] ERROR org.hibernate.util.XMLHelper - Error parsing XML: XML InputStream(9) Attribute "column" must be declared for element type "id".
576 [main] ERROR org.hibernate.util.XMLHelper - Error parsing XML: XML InputStream(10) Element type "generator" must be declared.
576 [main] ERROR org.hibernate.util.XMLHelper - Error parsing XML: XML InputStream(10) Attribute "class" must be declared for element type "generator".
577 [main] ERROR org.hibernate.util.XMLHelper - Error parsing XML: XML InputStream(12) Element type "property" must be declared.
577 [main] ERROR org.hibernate.util.XMLHelper - Error parsing XML: XML InputStream(12) Attribute "name" must be declared for element type "property".
577 [main] ERROR org.hibernate.util.XMLHelper - Error parsing XML: XML InputStream(12) Attribute "type" must be declared for element type "property".
577 [main] ERROR org.hibernate.util.XMLHelper - Error parsing XML: XML InputStream(13) Element type "column" must be declared.
577 [main] ERROR org.hibernate.util.XMLHelper - Error parsing XML: XML InputStream(13) Attribute "name" must be declared for element type "column".
577 [main] ERROR org.hibernate.util.XMLHelper - Error parsing XML: XML InputStream(15) Element type "property" must be declared.
577 [main] ERROR org.hibernate.util.XMLHelper - Error parsing XML: XML InputStream(15) Attribute "name" must be declared for element type "property".
577 [main] ERROR org.hibernate.util.XMLHelper - Error parsing XML: XML InputStream(15) Attribute "type" must be declared for element type "property".
578 [main] ERROR org.hibernate.util.XMLHelper - Error parsing XML: XML InputStream(16) Element type "column" must be declared.
578 [main] ERROR org.hibernate.util.XMLHelper - Error parsing XML: XML InputStream(16) Attribute "name" must be declared for element type "column".
23-Apr-2011 22:27:58 org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry destroySingletons
INFO: Destroying singletons in org.springframework.beans.factory.support.DefaultL istableBeanFactory@5adf48c4: defining beans [org.springframework.beans.factory.config.PropertyP laceholderConfigurer#0,sessionFactory,transactionM anager,hibernateTemplate,jdbcTemplate,InsValue,eco mProperties,dataSource]; root of factory hierarchy
23-Apr-2011 22:27:58 org.springframework.web.context.ContextLoader initWebApplicationContext
SEVERE: Context initialization failed
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext-dao.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: invalid mapping
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1338)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:473)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 64)
at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:261 )
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:423)
at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:728)
at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:380)
at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 45)
at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:3972)
at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4467)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:785)
at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:443)
at org.apache.catalina.core.StandardService.start(Sta ndardService.java:519)
at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalin a.java:581)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:414)
Caused by: org.hibernate.MappingException: invalid mapping
at org.hibernate.cfg.AnnotationConfiguration.addInput Stream(AnnotationConfiguration.java:777)
at org.hibernate.cfg.AnnotationConfiguration.addInput Stream(AnnotationConfiguration.java:64)
at org.springframework.orm.hibernate3.LocalSessionFac toryBean.buildSessionFactory(LocalSessionFactoryBe an.java:631)
at org.springframework.orm.hibernate3.AbstractSession FactoryBean.afterPropertiesSet(AbstractSessionFact oryBean.java:211)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1369)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1335)
... 30 more
Caused by: org.xml.sax.SAXParseException: Element type "hibernate-mapping" must be declared.
at org.apache.xerces.framework.XMLParser.reportError( XMLParser.java:1213)
at org.apache.xerces.validators.common.XMLValidator.r eportRecoverableXMLError(XMLValidator.java:1807)
at org.apache.xerces.validators.common.XMLValidator.v alidateElementAndAttributes(XMLValidator.java:3633 )
at org.apache.xerces.validators.common.XMLValidator.c allStartElement(XMLValidator.java:1229)
at org.apache.xerces.framework.XMLDocumentScanner$Con tentDispatcher.dispatch(XMLDocumentScanner.java:93 8)
at org.apache.xerces.framework.XMLDocumentScanner.par seSome(XMLDocumentScanner.java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLPar ser.java:1098)
at org.dom4j.io.SAXReader.read(SAXReader.java:465)
at org.hibernate.cfg.AnnotationConfiguration.addInput Stream(AnnotationConfiguration.java:773)
I tried all my luck. Can someone please tell help me? I am ready to put the code if needed.
Thanks in advance..!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules