2016-04-22 54 views
0

在運行PricingRuleDTExample這個錯誤發生的從drools-examples聲明(或任何實例)有關Drools6找不到元素「KMODULE」

2016-04-22 12:55:57,476 [main] ERROR Unable to build index of kmodule.xml url=file:/C:/Users/xxxx/workspace/drools-examples/target/classes/META-INF/kmodule.xml 
org.xml.sax.SAXParseException; systemId: file:/C:/Users/xxxx/workspace/drools-examples/target/classes/META-INF/kmodule.xml; lineNumber: 4; columnNumber: 52; cvc-elt.1: Cannot find the declaration of element 'kmodule'. 

回答

0

問題是因爲kmodule.xml的前綴是:

<kmodule xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xmlns="http://www.drools.org/xsd/kmodule"> 

這是pre-drools6聲明。修復方法是將其更改爲

<kmodule xmlns="http://jboss.org/kie/6.0.0/kmodule">