• Post Reply Bookmark Topic Watch Topic
  • New Topic

Could not parse configuration hibernate.cfg.xml  RSS feed

 
Sameera Chathuranga
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This exception gives me some times in a web application on tomcat server, please help me to resolve this problem.
 
Vijitha Kumara
Bartender
Posts: 4001
42
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to CodeRanch, Sameera

Since you are new to the forums you may interested in reading about How To Ask Questions On JavaRanch.

Regarding the issue, this can be due to many reasons like incorrect schema declarations or wrong tags etc... Can you post the exact exception stack trace and probably the config file here?
 
Sameera Chathuranga
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sameera Chathuranga wrote:This exception gives me some times in a web application on tomcat server, please help me to resolve this problem.


this is the full error

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: org.hibernate.HibernateException: Could not parse configuration: /ormmapping/COLOMBOTODAY.cfg.xml
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:498)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
root cause

javax.servlet.ServletException: org.hibernate.HibernateException: Could not parse configuration: /ormmapping/COLOMBOTODAY.cfg.xml
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
org.apache.jsp.index_jsp._jspService(index_jsp.java:866)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
root cause

org.orm.PersistentException: org.hibernate.HibernateException: Could not parse configuration: /ormmapping/COLOMBOTODAY.cfg.xml
model.NewsFactory.listNewsByQuery(NewsFactory.java:91)
org.apache.jsp.index_jsp._jspService(index_jsp.java:201)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
root cause

org.hibernate.HibernateException: Could not parse configuration: /ormmapping/COLOMBOTODAY.cfg.xml
org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1494)
org.hibernate.cfg.Configuration.configure(Configuration.java:1428)
org.orm.PersistentManager.<init>(PersistentManager.java:64)
model.COLOMBOTODAYPersistentManager.<init>(COLOMBOTODAYPersistentManager.java:30)
model.COLOMBOTODAYPersistentManager.instance(COLOMBOTODAYPersistentManager.java:40)
model.NewsFactory.listNewsByQuery(NewsFactory.java:86)
org.apache.jsp.index_jsp._jspService(index_jsp.java:201)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
root cause

org.dom4j.DocumentException: Error on line 16 of document : The entity name must immediately follow the '&' in the entity reference. Nested exception: The entity name must immediately follow the '&' in the entity reference.
org.dom4j.io.SAXReader.read(SAXReader.java:482)
org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1484)
org.hibernate.cfg.Configuration.configure(Configuration.java:1428)
org.orm.PersistentManager.<init>(PersistentManager.java:64)
model.COLOMBOTODAYPersistentManager.<init>(COLOMBOTODAYPersistentManager.java:30)
model.COLOMBOTODAYPersistentManager.instance(COLOMBOTODAYPersistentManager.java:40)
model.NewsFactory.listNewsByQuery(NewsFactory.java:86)
org.apache.jsp.index_jsp._jspService(index_jsp.java:201)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.30 logs.

Apache Tomcat/5.5.30
 
Vijitha Kumara
Bartender
Posts: 4001
42
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
org.dom4j.DocumentException: Error on line 16 of document : The entity name must immediately follow the '&' in the entity reference. Nested exception: The entity name must immediately follow the '&' in the entity reference.

What do you have in line 16 of your xml document?
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!