各位大侠,我用java语言,运用SSH做的一个小的oa系统,在myeclipse开发环境中做的,数据库是mysql,tomcat6.0.30服务器,B/S模式,联网的时候运行正常,但是不联网就不行。部署的时候报错:
org.dom4j.DocumentException: hibernate.sourceforge.net Nested exception: hibernate.sourceforge.netNested exception:  
java.net.UnknownHostException: hibernate.sourceforge.netorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: org.dom4j.DocumentException: hibernate.sourceforge.net Nested exception: hibernate.sourceforge.net
Caused by: org.hibernate.MappingException: org.dom4j.DocumentException: hibernate.sourceforge.net Nested exception: hibernate.sourceforge.netCaused by: org.dom4j.DocumentException: hibernate.sourceforge.net Nested exception: hibernate.sourceforge.net

解决方案 »

  1.   

    hibernate.sourceforge.net是hibernate的官网:

    Hibernate - JBoss Community
    hibernate.sourceforge.net/
    你是不是hibernate相关的包不是本地引入的?
      

  2.   

    是本地引入啊,都放在lib文件夹下呢
      

  3.   

    1、请检查你是否导入了多个hibernate包
    2、检查你的hibernate包中是否含有DTD文件
    ----->2.x的是在net/sf/hibernate/下
    ----->3.x的是在org/hibernate/下
      

  4.   

    有一个hibernate.configuration-3.0.dtd和一个hibernate-mapping-3.0.dtd
      

  5.   

    那就仔细检查下你的"xxxx.hbm.xml"
    文件头信息是不是
    <?xml version="1.0"?>
    <!DOCTYPE hibernate-mapping PUBLIC
        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
      

  6.   

    你数据库的配置写死成你本地的IP了吧? 改成172.0.0.1或者localhost试试