Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  

org.hibernate.InvalidMappingException: Could not parse mapping document



Share on Google+Share on Google+

org.hibernate.InvalidMappingException: Could not parse mapping document
2 Answer(s)      9 years ago
Posted in : Hibernate
View Answers

April 29, 2008 at 7:34 PM


package roseindia;

public class Procedure {
private String username;
private String room;
private String address;
private String faname;
private int id;

public String getUsername() {
return username;
public void setUsername(String username) {
this.username = username;
public String getRoom() {
return room;
public void setRoom(String room) { = room;
public int getId() {
return id;
public void setId(int id) { = id;
public String getAddress() {
return address;
public void setAddress(String address) {
this.address = address;

public String getFaname(){
return faname;
public void setFaname(String faname){
this.faname = faname;



package roseindia;

import org.hibernate.*;
import org.hibernate.criterion.*;
import org.hibernate.cfg.*;

import java.util.*;

public class StoreprocedureExam {
public static void main(String arg[]){
Session session = null;
try {
SessionFactory sessionFactory = new Configuration().configure()
session = sessionFactory.openSession();
String SQL_QUERY ="from Procedure proced";
Query query = session.createQuery(SQL_QUERY);
for(Iterator it=query.iterate();it.hasNext();){
Procedure procedure=(Procedure);

System.out.println("Father name:"+procedure.getFaname());

catch (Exception e) {
finally {


April 29, 2008 at 7:36 PM

<class name="roseindia.Procedure" table="proced">
<id name="id" type="int" column="id" >
<generator class="assigned"/>

<property name="username">
<column name="username" />
<property name="room">
<column name="room"/>
<property name="address">
<column name="address"/>
<property name="faname">
<column name="faname"/>


<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"

<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/register</property>;
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">root</property>
<property name="hibernate.connection.pool_size">10</property>
<property name="show_sql">true</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="">update</property>
<!-- Mapping files -->
<mapping resource="contact.hbm.xml"/>



read for more information,


Related Tutorials/Questions & Answers:
org.hibernate.InvalidMappingException: Could not parse mapping document - Hibernate
. Exception occur:Could not parse mapping document from resource event... by: org.hibernate.InvalidMappingException: Could not parse mapping document from invalid Could not parse mapping document 
DOM Parser Example to Parse A DOM Document
DOM Parser Example to Parse A DOM Document In this tutorial, we will discuss about how to parse(retrieve data) DOM Document. The XML DOM views an XML document as a tree-structure. In this program, we read the XML file and print
how to parse xml document which contains elements with namespace using JDOM - XML
how to parse xml document which contains elements with namespace using JDOM  Hello, I am parsing XML file ,which has structure like... is inside so how can i parse this xml using JDOM,java. Thanks Shree  Hi
Use of <x:parse> tag of JSTL
:parse> tag of  Xml tag library of Jstl. This tag is used to parse the specified xml document. Standard Syntax : <%@ taglib prefix="x" uri="... some operation on the parsed xml document provided by jstl. scope
parse xml
parse xml   <STATES> <STATE sname="AndhraPradesh" >...; </STATE> How to parse the above xml. please help me   Here... docBuilder = docFactory.newDocumentBuilder(); Document doc = docBuilder.parse("c
parse in iphone
parse in iphone  <p>{ itemCount: 2, subtotal: "$15.50", items:[ { title: "The Big Book of Foo", description: "Bestselling book of Foo by A.N. Other", imageUrl: "/images/books/12345.gif
mapping - XML
mapping  how does the web.xml works and how does the mapping done will you explain me?  Hi Friend, The web.xml file provides... can perform the servlet-mapping like the following: HelloServlet
servlet mapping
servlet mapping  Defined servlet mapping in web.xml ?   <servlet> <servlet-name>Hello</servlet-name> <servlet...;/HelloWorld</url-pattern> </servlet-mapping> Given above servlet mapping
Mapping Application
Mapping Application The mapping is done within an action file called..., their corresponding action class and results returned from the Action class. Before mapping... can also specify the name of the method of an action class in mapping as <
Hibernate Mapping
In this tutorial we will discuss Hibernate mapping
xml document parsing
xml document parsing   Hi Guys, Xml document has been inserted into the database,how do i parse the xml document stored in database,so that xml document can be retrieved on to JSP file using jdbc/odbc connection. Please help me
php parse string into array
php parse string into array  How can i parse a string into array and convert an array into string
php parse string to time
php parse string to time  I am looking for a solution to parse a string into a formatted date time string
php parse ini string
php parse ini string  Need to know how to parse the ini file to extract values
php parse string for url
php parse string for url  Do i need a regex to parse a URL-type string in PHP
parse url iphone sdk
parse url iphone sdk  How can i parse two different URL's using NSXMLParser
parse map in java
parse map in java  What is a Parser? Can you give the source code to parse map in Java
php parse ini array
php parse ini array  I wanted to parse a variable inside a variable value. Can any one give the example
ActionMapping and is the Action Mapping specified
ActionMapping and is the Action Mapping specified  What is ActionMapping and is the Action Mapping specified
the Action Mapping specified
the Action Mapping specified  How is the Action Mapping specified
include' a HTML document in another document.
include' a HTML document in another document.  I'm trying to `include' a HTML document in another document...Is there a way to do
Hibernate Mapping
In this section, you will learn about Hibernate Mapping
php parse string as php
php parse string as php  Best way of parsing a string within a string
php parse ini file
php parse ini file  I need a simple and easy example to Parsing an ?advanced? INI file with PHP
php parse soap response
php parse soap response  What is soap and how can i convert a soap response to XML. Thanks in Advance
php parse string to float
php parse string to float  Is there any Regex or way to get float from a string
Could not parse configuration: hibernate.cfg.xml
Could not parse configuration: hibernate.cfg.xml  Hi, I am getting the error- log4j:WARN No appenders could be found for logger.... Exception in thread "main" org.hibernate.HibernateException: Could not parse
What is component mapping in Hibernate?
What is component mapping in Hibernate?  Hi, What is component mapping in Hibernate? thanks
What is Light Object Mapping?
What is Light Object Mapping?  Hi, What is Light Object Mapping? Thanks
php parse subdomain
php parse subdomain  Basically, looking for a example on how to let PHP to create subdomain automatically for each user? Is it possible to retrieve subdomain as a get variable
view mapping - Hibernate
view mapping  How can we do mapping in hibernate