最近写项目使用hibernate默认的dtd,在启动项目时经常会出现这个问题,hibernate报错,配置factory的id找不到,找不到mapping配置文件,

不能读取配置的xml文件

Could not parse mapping document from input stream

...............

Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from input stream

..............

Caused by: org.dom4j.DocumentException: www.hibernate.org Nested exception: www.hibernate.org

..............

查了很多资料,终于找到一个有效的解决办法:

  在POJO类对应的xxx.hbm.xml配置文件中,将"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">改为:

"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd",重新启动项目,即可解决问题。

Hibernate报错,关于配置的SessionFactory找不到问题的更多相关文章

  1. Hibernate报错:org.hibernate.ObjectNotFoundException: No row with the given identifier exists 解决办法

    报错信息: org.hibernate.event.internal.DefaultLoadEventListener onLoad INFO: HHH000327: Error performing ...

  2. Hibernate报错解决Error parsing JNDI name [],Need to specify class name

    能实现写数据,但是报错. 出错信息: 十月 21, 2016 3:46:18 下午 org.hibernate.Version logVersionINFO: HHH000412: Hibernate ...

  3. 常见Hibernate报错处理:出现“org.hibernate.QueryException: could not resolve property”和 is not mapped和could not locate named parameter错误的解决

    正确写法: @Override @SuppressWarnings("unchecked") public List<Device> queryOSDevice(Str ...

  4. Spring整合Hibernate报错:annotatedClasses is not writable or has an invalid setter method

    Spring 整合Hibernate时报错: org.springframework.beans.factory.BeanCreationException: Error creating bean ...

  5. hibernate报错Unknown integral data type for ids : java.lang.String

    package com.model; // Generated 2016-10-27 14:02:17 by Hibernate Tools 4.3.1.Final /** * CmDept gene ...

  6. 【hibernate 报错】No serializer found for class org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer 【get和load的区别】

    报错: HTTP Status 500 - Could not write content: No serializer found for class org.hibernate.proxy.poj ...

  7. Hibernate报错 ** is not mapping

    使用easyui+struts+hibernate 新增加一个页面功能时,总是报错,后来发现是数据库语句,不能写表名称,而是要写映射的数据库实体类名 1.struts文件修改增加action < ...

  8. Hibernate 报错org.hibernate.PropertyAccessException: IllegalArgumentException(已解决)

    无聊想搭建一个项目,练手,做点小功能就一个卡在这个问题上 org.hibernate.PropertyAccessException: IllegalArgumentException occurre ...

  9. hibernate报错

    报错二:java.lang.ExceptionInInitializerError java.lang.ExceptionInInitializerError at com.java1234.serv ...

随机推荐

  1. python 迭代器协议和生成器

    一.什么是迭代器协议 1.迭代器协议是指:对象必须提供一个next方法,执行该方法要么返回迭代中的下一项,要么就引起一个stoplteration异常,以终止迭代(只能往后走,不能往前退) 2.可迭代 ...

  2. c/c++ 头文件的血案

    头文件的血案 不小心在一个头文件里,加了函数的定义,结果导致编译时,提示这个函数被重复定义:( Quote.h #ifndef __QUOTE_H__ #define __QUOTE_H__ #inc ...

  3. TableML-GUI篇(C# 编译/解析 Excel/CSV工具)

    项目情况 本文接上篇TableML Excel编译/解析工具,本文主要介绍GUI工具的使用,及配置项,如果你想了解此工具更加详细的说明,请阅读上篇文章. 项目地址:https://github.com ...

  4. macos 远程 windows 10

    使用的工具:Parallels Client 免费,可以从windows store 免费下载: 只有这个最好用,希望能帮到你.和原生的windows 远程桌面功能很像:

  5. windows下安装MongoDB扩展和配置

    windows下安装MongoDB扩展和配置 1.下载mongoDB扩展,根据当前php版本进行下载 地址如下:http://pecl.php.net/package/mongo 我本地php版本是 ...

  6. MongoDB在Linux系统下的安装与启动

    Mongodb介绍 MongoDB是一个开源文档数据库,提供高性能,高可用性和自动扩展,官方文档:https://docs.mongodb.com/manual/introduction/ Mongo ...

  7. css_属性

    老师的博客:https://www.cnblogs.com/liwenzhou/p/7999532.htm css的属性 整体属性的:作用于全局 width:表示宽 height:表示长 color: ...

  8. 【Python使用】使用pip安装卸载Python包(含离线安装Python包)未完成???

    pip 是 Python 包管理工具,该工具提供了对Python包的查找.下载.安装.卸载的功能.Python 2.7.9 + 或 Python 3.4+ 以上版本都自带 pip 工具. pip使用( ...

  9. 文本分类实战(六)—— RCNN模型

    1 大纲概述 文本分类这个系列将会有十篇左右,包括基于word2vec预训练的文本分类,与及基于最新的预训练模型(ELMo,BERT等)的文本分类.总共有以下系列: word2vec预训练词向量 te ...

  10. B. Obtaining the String(模拟)

    比较水的模拟 思路:就是模拟题意 注意:把数组开大点,开始wa了几次就是这个原因 #include<iostream> #include<string> #include< ...