| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2435 人关注过本帖
标题:hibernate 哪里错了 版主指点
只看楼主 加入收藏
chenyiqing23
Rank: 2
等 级:论坛游民
帖 子:84
专家分:53
注 册:2007-12-27
结帖率:73.33%
收藏
 问题点数:0 回复次数:1 
hibernate 哪里错了 版主指点
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.

<hibernate-mapping>
    <class name="model.Authority" table="Authority">
        <id name="authority_id" column="authority_id" type="int">
            <generator class="increment"></generator>
        </id>
        
        <property name="authority_name" column="authority_name" type="string"></property>
    </class>
   
</hibernate-mapping>

aadd2013-12-8 1:57:06 org.hibernate.cfg.Environment <clinit>
信息: Hibernate 3.3.2.GA
2013-12-8 1:57:06 org.hibernate.cfg.Environment <clinit>
信息: hibernate.properties not found
2013-12-8 1:57:06 org.hibernate.cfg.Environment buildBytecodeProvider
信息: Bytecode provider name : javassist
2013-12-8 1:57:06 org.hibernate.cfg.Environment <clinit>
信息: using JDK 1.4 java.sql.Timestamp handling
2013-12-8 1:57:06 org.hibernate.cfg.Configuration configure
信息: configuring from resource: /hibernate.cfg.xml
2013-12-8 1:57:06 org.hibernate.cfg.Configuration getConfigurationInputStream
信息: Configuration resource: /hibernate.cfg.xml
2013-12-8 1:57:06 org.hibernate.cfg.Configuration addResource
信息: Reading mappings from resource : Authority.hbm.xml
org.hibernate.InvalidMappingException: Could not parse mapping document from resource Authority.hbm.xml
    at org.hibernate.cfg.Configuration.addResource(Configuration.java:616)
    at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1635)
    at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1603)
    at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1582)
    at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1556)
    at org.hibernate.cfg.Configuration.configure(Configuration.java:1476)
    at org.hibernate.cfg.Configuration.configure(Configuration.java:1462)
    at util.HibernateUtil.<clinit>(HibernateUtil.java:14)
    at impl.AuthorityImpl.listAllAuthorities(AuthorityImpl.java:45)
    at simpl.AuthoritySimpl.listAllAuthorities(AuthoritySimpl.java:24)
    at test.Test.main(Test.java:23)
Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from input stream
    at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:555)
    at org.hibernate.cfg.Configuration.addResource(Configuration.java:613)
    ... 10 more
Caused by: org.dom4j.DocumentException: Nested exception:
    at org.(SAXReader.java:484)
    at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:546)
    ... 11 more
Exception in thread "main" java.lang.NullPointerException
    at util.HibernateUtil.openSession(HibernateUtil.java:25)
    at impl.AuthorityImpl.listAllAuthorities(AuthorityImpl.java:45)
    at simpl.AuthoritySimpl.listAllAuthorities(AuthoritySimpl.java:24)
    at test.Test.main(Test.java:23)
搜索更多相关主题的帖子: hibernate property version PUBLIC 
2013-12-08 01:57
hhwz
Rank: 13Rank: 13Rank: 13Rank: 13
等 级:贵宾
威 望:87
帖 子:687
专家分:4502
注 册:2011-5-22
收藏
得分:0 
找不到Authority.hbm.xml这个文件
2013-12-16 14:59
快速回复:hibernate 哪里错了 版主指点
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.065182 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved