org.dom4j.DocumentException: null Nested exception: null
at org.dom4j.io.SAXReader.read(SAXReader.java:484)
at org.jbpm.jpdl.xml.JpdlParser.parse(JpdlParser.java:57)
at org.jbpm.jpdl.xml.JpdlXmlReader.readProcessDefinition(JpdlXmlReader.java:138)
at org.jbpm.graph.def.ProcessDefinition.parseXmlInputStream(ProcessDefinition.java:172)
at org.jbpm.graph.def.ProcessDefinition.parseXmlResource(ProcessDefinition.java:153)
at cn.cc.servlet.JbpmTest.testJbpm(JbpmTest.java:18)
at cn.cc.servlet.JbpmTest.main(JbpmTest.java:35)
遇到這種問題,一般的原因都是找不到 XML的檔案造成的, 要不是 XML不存在,要不就是傳遞的XML地址出現了錯誤。
網上的例子:
org.dom4j.DocumentException: null Nested exception: null 真是奇怪,害我一直在想我到底那裡錯了,然後用ie開啟那個xml檔案,ie不報錯,竟然說找不到檔案。嗨……鬧得我真的以為是我那個xml檔案有錯,之後拿firefox試了下,卻可以開啟……鬱悶 後來發現,原來是沒有找到那個檔案……Java代碼的問題…… InputStream is = this.getClass().getResourceAsStream("../qingjia/qingjia.zip"); ZipInputStream zis = new ZipInputStream(is); ProcessDefinition pd = ProcessDefinition.parseParZipInputStream(zis); 就是加了“this.getClass().getResourceAsStream"之後就行了,改成這樣就行了 本文來自CSDN部落格,轉載請標明出處:http://blog.csdn.net/yy00915132/archive/2009/09/18/4567775.aspx