Guestinfo. HBM (1) the markup declarations contained or pointed to by the document type declaration must be well-formed

Source: Internet
Author: User
Tags jboss

An error was reported when I started the SSH project today. I also asked to start it online. I checked the error message and found that the declaration header of the hibernate ing file had an error. Take a closer look:

HBM. the DTD header in XML is directly connected to www.hibernate.org, instead of SourceForge. colleagues who have used hibernate should know that, generally, you download hibernate from SourceForge, with an error in HBM. the xml configuration is as follows:

<?xml version="1.0" encoding="utf-8"?><!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN""http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">

The correct configuration is to change the above blue background red letter to: http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd

<?xml version="1.0" encoding="utf-8"?><!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"                                   "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

Additional: error message

08:12:39,591 ERROR [org.hibernate.util.XMLHelper] (MSC service thread 1-6) Error parsing XML: C:\Java\jboss-as-7.1.1.Final\standalone\deployments\qsmes.war\WEB-INF\classes\com\njutcm\qsmes\Domain\hbm\Guestinfo.hbm.xml(1) The markup declarations contained or pointed to by the document type declaration must be well-formed.08:12:39,607 ERROR [org.springframework.web.context.ContextLoader] (MSC service thread 1-6) Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sessionFactory‘ defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from file C:\Java\jboss-as-7.1.1.Final\standalone\deployments\qsmes.war\WEB-INF\classes\com\njutcm\qsmes\Domain\hbm\Guestinfo.hbm.xml    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455) [org.springframework.beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) [org.springframework.beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) [org.springframework.beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) [org.springframework.beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) [org.springframework.beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) [org.springframework.beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) [org.springframework.beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:591) [org.springframework.beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) [org.springframework.context-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:469) [org.springframework.context-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383) [org.springframework.web-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283) [org.springframework.web-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111) [org.springframework.web-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:]    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:]    at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]    at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from file C:\Java\jboss-as-7.1.1.Final\standalone\deployments\qsmes.war\WEB-INF\classes\com\njutcm\qsmes\Domain\hbm\Guestinfo.hbm.xml    at org.hibernate.cfg.Configuration.addFile(Configuration.java:325) [hibernate3.jar:3.2.6.ga]    at org.hibernate.cfg.Configuration.addDirectory(Configuration.java:668) [hibernate3.jar:3.2.6.ga]    at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:710) [org.springframework.orm-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:188) [org.springframework.orm-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514) [org.springframework.beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452) [org.springframework.beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]    ... 20 moreCaused by: org.dom4j.DocumentException: Error on line 1 of document http://10.10.0.248 : The markup declarations contained or pointed to by the document type declaration must be well-formed. Nested exception: The markup declarations contained or pointed to by the document type declaration must be well-formed.    at org.dom4j.io.SAXReader.read(SAXReader.java:482) [dom4j-1.6.1.jar:1.6.1]    at org.dom4j.io.SAXReader.read(SAXReader.java:264) [dom4j-1.6.1.jar:1.6.1]    at org.hibernate.cfg.Configuration.addFile(Configuration.java:311) [hibernate3.jar:3.2.6.ga]    ... 25 more08:12:39,639 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/qsmes]] (MSC service thread 1-6) 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 ‘sessionFactory‘ defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from file C:\Java\jboss-as-7.1.1.Final\standalone\deployments\qsmes.war\WEB-INF\classes\com\njutcm\qsmes\Domain\hbm\Guestinfo.hbm.xml    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455) [org.springframework.beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) [org.springframework.beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) [org.springframework.beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) [org.springframework.beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) [org.springframework.beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) [org.springframework.beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) [org.springframework.beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:591) [org.springframework.beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) [org.springframework.context-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:469) [org.springframework.context-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383) [org.springframework.web-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283) [org.springframework.web-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111) [org.springframework.web-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:]    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:]    at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]    at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from file C:\Java\jboss-as-7.1.1.Final\standalone\deployments\qsmes.war\WEB-INF\classes\com\njutcm\qsmes\Domain\hbm\Guestinfo.hbm.xml    at org.hibernate.cfg.Configuration.addFile(Configuration.java:325) [hibernate3.jar:3.2.6.ga]    at org.hibernate.cfg.Configuration.addDirectory(Configuration.java:668) [hibernate3.jar:3.2.6.ga]    at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:710) [org.springframework.orm-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:188) [org.springframework.orm-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514) [org.springframework.beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452) [org.springframework.beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]    ... 20 moreCaused by: org.dom4j.DocumentException: Error on line 1 of document http://10.10.0.248 : The markup declarations contained or pointed to by the document type declaration must be well-formed. Nested exception: The markup declarations contained or pointed to by the document type declaration must be well-formed.    at org.dom4j.io.SAXReader.read(SAXReader.java:482) [dom4j-1.6.1.jar:1.6.1]    at org.dom4j.io.SAXReader.read(SAXReader.java:264) [dom4j-1.6.1.jar:1.6.1]    at org.hibernate.cfg.Configuration.addFile(Configuration.java:311) [hibernate3.jar:3.2.6.ga]

Guestinfo. HBM (1) the markup declarations contained or pointed to by the document type declaration must be well-formed

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.