当我尝试加载从记分卡xls生成的drl时,我正在为一个异常而苦苦挣扎:
ScorecardCompiler scorecardCompiler = new ScorecardCompiler(ScorecardCompiler.DrlType.EXTERNAL_OBJECT_MODEL);
boolean compileResult = scorecardCompiler.compileFromExcel(this.getClass().getResourceAsStream(""), "*****_score");
PMML pmmlDocument = scorecardCompiler.getPMMLDocument();
drl = scorecardCompiler.getDRL();
System.out.println(drl2); KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); kbuilder.add(ResourceFactory.newByteArrayResource(drl2.getBytes()),ResourceType.DRL); 如果(kbuilder.hasErrors()){ Assert.fail(“意外的Drools编译错误:” + kbuilder.getErrors()。toString()); }
例外是:
“发现类型为com.xxx.xxx.xxx的重复声明,无法协调“
有人知道为什么我会收到该异常以及如何解决该异常吗? 我们正在使用Drools版本6.5.0.Final 谢谢,G