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
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 - 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
parse url iphone sdk
parse url iphone sdk  How can i parse two different URL's using NSXMLParser
php parse ini string
php parse ini string  Need to know how to parse the ini file to extract values
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
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 string for url
php parse string for url  Do i need a regex to parse a URL-type string in PHP
php parse string into array
php parse string into array  How can i parse a string into array and convert an array into string
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 <
php parse ini array
php parse ini array  I wanted to parse a variable inside a variable value. Can any one give the example
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 to float
php parse string to float  Is there any Regex or way to get float from a string
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 ini file
php parse ini file  I need a simple and easy example to Parsing an ?advanced? INI file with PHP
php parse string as php
php parse string as php  Best way of parsing a string within 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
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
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
php parse string to date
php parse string to date  In my app i have a date string in the following format: $date = "08/20/2009"; Can you suggest how can i separate each part of the date
php parse string as int
php parse string as int  While trying to pass string to int using int() i get the following error: Call to undefined function int() Why it is throwing an error
date_parse() in PHP date_parse function returns associative array... error. Description on Date Parse Format in PHP array date_parse ( string $date ) Parameters of date parse class PHP date - Date in format accepted
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
Hibernate Mapping
In this section, you will learn about Hibernate Mapping
Java Spring Hibernate Struts Training Hibernate envers revtype values Hibernate envers audit example Hibernate envers example Hibernate envers revinfo table revinfo table sql Hibernate maven dependency example What is the difference between JPA and Hibernate? How to turn off hbm2ddl? Hibernate values Hibernate table not mapped error - solution Hibernate error class is not mapped Hibernate Envers custom revinfo table Hibernate Envers - REVINFO table doesn't exist How to enable second level cache in Hibernate 5? How to enable second level cache in Hibernate 5? java.lang.IndexOutOfBoundsException: Remember that ordinal parameters are 1-based! org.hibernate.validator cannot be resolved error java.lang.ClassNotFoundException: org.hibernate.cache.TimestampsRegion java.lang.ClassNotFoundException: org.hibernate.cache.TimestampsRegion property hibernate.cache.region.factory_class is not given Hibernate example step by step in Eclipse with MySQL How to make Struts Hibernate and Spring Based Login/Registration Application? What is the use of Hibernate Native SQL? What is the use of Hibernate is used? How to integrate Struts and Hibernate in an application? How to create the program in Java for getting the forgotten Password Form? How to write create JPA Many-to-Many Relationship in Java? What is the DAO Layer in any application? What is Spring Struts Hibernate DAO Layer? How to write Example code for CRUD application in hibernate annotation? Where to update the Hibernate tools? Query conversion convert into hql how to convert sql into hql package org.hibernate.util does not exist C3P0 with Hibernate What do you understand by JPA? Hibernate Query Checker Jpa many to many relationship What do you understand by Hibernate in Java? What are criteria Queries in Hibernate? How to use Associations and Joins in Hibernate? Hibernate 4 Example with Eclipse How to learn Hibernate? What is Hibernate Framework? hibernate faq 15/03/14 hibernate 15/03/2014 Hibernate Criteria Wildcard how to add mulitiple projections this is a hibernate question


Advertisement null