• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Could not parse configuration hibernate.cfg.xml

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
You are HERE! The other map is obviously wrong. Better confirm with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic