Caused by: org.dom4j.DocumentException: Connection timed out: connect Nested exc

 

01 org.hibernate.InvalidMappingException: Could not parse mapping document from resourcecn/edu/hbmy/model/Document.hbm.xml
02     at org.hibernate.cfg.Configuration.addResource(Configuration.java:569)
03     at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1584)
04     at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1552)
05     at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1531)
06     at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1505)
07     at org.hibernate.cfg.Configuration.configure(Configuration.java:1425)
08     at org.jbpm.db.hibernate.HibernateHelper.createConfiguration(HibernateHelper.java:91)
09     at org.jbpm.persistence.db.DbPersistenceServiceFactory.getConfiguration(DbPersistenceServiceFactory.java:69)
10     at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91)
11     at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:94)
12     at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:98)
13     at org.jbpm.JbpmContext.getSession(JbpmContext.java:506)
14     at cn.edu.hbmy.action.CreateProcessInstance.testCreateDocumet(CreateProcessInstance.java:26)
15     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
16     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
17     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
18     at java.lang.reflect.Method.invoke(Method.java:597)
19     at junit.framework.TestCase.runTest(TestCase.java:154)
20     at junit.framework.TestCase.runBare(TestCase.java:127)
21     at junit.framework.TestResult$1.protect(TestResult.java:106)
22     at junit.framework.TestResult.runProtected(TestResult.java:124)
23     at junit.framework.TestResult.run(TestResult.java:109)
24     at junit.framework.TestCase.run(TestCase.java:118)
25     at junit.framework.TestSuite.runTest(TestSuite.java:208)
26     at junit.framework.TestSuite.run(TestSuite.java:203)
27     at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
28     at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
29     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
30     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
31     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
32     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
33 Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from input stream
34     at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:508)
35     at org.hibernate.cfg.Configuration.addResource(Configuration.java:566)
36     ... 30 more
37 Caused by: org.dom4j.DocumentException: Connection timed out: connect Nested exception: Connection timed out:connect
38     at org.dom4j.io.SAXReader.read(SAXReader.java:484)
39     at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:499)
40     ... 31 more
 

错误原因:

把<!DOCTYPE hibernate-mapping PUBLIC

        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"

        "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">

修改为:

 

<!DOCTYPE hibernate-mapping PUBLIC 

    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"

    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值