org.hibernate.InvalidMappingException solution

2011-08-17  来源:本站原创  分类:Database  人气:105 

Hibernate3 to run when:
org.hibernate.MappingNotFoundException: resource: com / ... / test.hbm.xml

Description of the error profiles can be found, but some issues. What specific issues need to slow the investigation.
1 to determine the correct jar file to import, it is best to use Hibernate3 directly inside the specified Jar;

2. Hibernate.cfg.xml to determine if there were errors, which

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
                "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
                "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
        <session-factory name="sessionFactory">

Inside the name = "sessionFactory", if not explicitly called, need to remove, or cause sessionFactory failed to initialize.

3 Confirm the inside of the mapping resource references hibernate.cfg.xml file exists and the correct encoding format.

相关文章
  • org.hibernate.InvalidMappingException solution 2011-08-17

    Hibernate3 to run when: org.hibernate.MappingNotFoundException: resource: com / ... / test.hbm.xml Description of the error profiles can be found, but some issues. What specific issues need to slow the investigation. 1 to determine the correct jar fi

  • org.hibernate.InvalidMappingException: Could not parse mapping document from res 2010-05-25

    We help take a look! proxool.xml <? Xml version = "1.0" encoding = "utf-8"?> <something-else-entirely> <proxool> <alias> proxoolPool </ alias> <! - Proxool can only be generated by their own connection

  • Hibernate error solution 2009-10-29

    Problem 1: java.lang.IllegalArgumentException: argument type mismatch Wrong reasons: jsp page, form types and form Tag Library form enctype attribute values do not match. Solution: Set the correct value of the enctype attribute. Problem 2: double imp

  • flex, hibernate (lazy) solution 2010-06-08

    Recently engaged in flex + java, with a spring and hibernate, through blazeds communication. But I found impossible hibernate blazeds delay loading, more hateful to communicate when the time, all the associated object relations are forced to load, an

  • Spring's Hibernate integration solution BeanCreationException 2009-10-08

    Phenomenon: Serious: 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 'userService'

  • Flex integration as well as Hibernate's Lazy problems Spring.Hibernate ultimate solution 2010-05-21

    Original article from my blog: ( http://emavaj.blog.163.com ) If the Flex with Spring + Hibernate communication, then the Lazy Hibernate is to bring Blazeds error of the relationship ... because cglib proxy Even if you use Fetch to crawl out of the d

  • Flex and Hibernate integration Spring.Hibernate ultimate solution of the problem Lazy 2010-05-21

    Original article from my blog: ( http://emavaj.blog.163.com ) If the Flex with Spring + Hibernate communication, then the Lazy Hibernate is to bring Blazeds error of the relationship ... because cglib proxy Even if you use Fetch to crawl out of the d

  • hibernate error solution to illegal access to loading collection 2010-05-09

    In the beginning there No row with the given identifier exists an error, but later found empty table manually remove the associated table of the then forget this error illegal access to loading collection, Google for a long time, was little changed s

  • hibernate error and solution development 2009-10-20

    hibernate error and solution development <! - Attachment -> <! - Attachment end -> Keywords: hibernate error solution 1, Exception in thread "main" java.lang.NoClassDefFoundError: org / apache / commons / logging / LogFactory at net.

  • hibernate composite-id 2010-04-02

    Encounter the following problems: In the browser display getSession (). Save (...) sentence has been reported nullException. First of all, the problem is definitely not getSession reference to the use of the Internet are so used, getSession () and th

  • Introduction to Hibernate Learning (2): Hibernate documentation involved 2010-08-29

    There are several necessary documents: pojo.java pojo.hbm.xml hibernate.cfg.xml (or hibernate.perperty) pojo.java: This class is a JavaBean. Why does it have a JavaBean? Because each database table and it must have a corresponding object, this object

  • Hibernate上路_22-从表自动创建Java类 2013-11-22

    1.数据库准备: CREATE DATABASE db_hibernate CHARACTER SET utf8; USE db_hibernate; -- 注释:用户表 CREATE TABLE tb_user( u_id INT PRIMARY KEY AUTO_INCREMENT, #ID:整型,主键,自动增长 u_name VARCHAR(20), #姓名:字符串,最长20 u_phone INT #电话:整型 ); -- 注释:订单表 CREATE TABLE tb_order( o_

  • hibernate对象关系映射 2015-03-11

    (一).Hibernate中持久化类的访问者有两个: Java应用程序 hibernate(何时调用get.set方法?) 注意:Java应用程序不能访问持久化类的private方法,而hibernate没有这个限制,它可以访问各种级别的方法.(例如提供私有的getXxx和setXxx方法,解决数据库字段跟domain属性不一致的问题而不影响设计). public class User { private Long id; private String name; private String

  • Named query not known: GraphSession.findLatestProc 2009-05-08

    org.hibernate.MappingException: Named query not known: GraphSession.findLatestProcessDefinitionQuery at org.hibernate.impl.AbstractSessionImpl.getNamedQuery (AbstractSessionImpl.java: 70) at org.hibernate.impl.SessionImpl.getNamedQuery (SessionImpl.j

  • A very minor exception java.lang.reflect.InvocationTargetException 2010-09-05

    Today, the process of doing a project, the sudden emergence of such a mistake type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception java.lang.reflect.Invocation

  • Use Hibernate3 as JDBC Framework 2010-08-01

    Posted: 2006.03.10 04:27 Source: CSDN of: There's been a certain amount of noise recently surrounding simple JDBC frameworks like iBATIS. I've liked the idea of iBATIS myself, for use in applications which don't need an object-oriented domain model,

  • Pen questions part of the framework with new technology 2010-12-05

    Popular frameworks and new technologies Talk about your understanding of Struts. A: 1. Struts MVC pattern is designed by Web layer framework, in fact, it is a big servlet, the Servlet called ActionServlet, or a subclass of ActionServlet. We will meet

  • eclipse3.4 about hibernate tools BUG solution 2009-03-30

    Publication and its connecting people: sys53 http://sys53.javaeye.com/ If you violate the copyright, please contact me promptly. eclipse3.4 about hibernate tools when used in error java.lang.NoClassDefFoundError: org / eclipse / ui / internal / util

  • Solution struts2, hibernate integration with jsonpulugin an exception when 2009-09-27

    Recent struts2, hibernate integration encountered an exception jsonpulugin, baidu and google in the search for a long time, many people have encountered similar problems, but there is no satisfactory answer. Read the source code for two days, and fin

  • Struts2 + Spring + Hibernate to build the whole solution! 2008-07-14

    Struts2 + Spring + Hibernate to build the whole solution! Struts2 + Spring + Hibernate is the latest popular J2EE framework. This article is my summary of the experiences to build this framework, there are a lot of people will always encounter this f