org.dom4j.DocumentException: null Nested exception: null

來源:互聯網
上載者:User

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.