各位大侠,我用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
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
Hibernate - JBoss Community
hibernate.sourceforge.net/你是不是hibernate相关的包不是本地引入的?
2、检查你的hibernate包中是否含有DTD文件
----->2.x的是在net/sf/hibernate/下
----->3.x的是在org/hibernate/下
文件头信息是不是
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >