Found duplicate declaration for type exception after generating drl
from scorecards xls
---------------------------------------------------------------------------------------
Key: DROOLS-3410
URL:
https://issues.jboss.org/browse/DROOLS-3410
Project: Drools
Issue Type: Bug
Components: PMML, XLS Score Card Editor
Affects Versions: 6.5.0.Final
Reporter: Gordon Hu
Assignee: Lance Leverich
Priority: Major
Attachments: gem_phone_scoremodel.xls, gem_phone_scoremodel.xls,
phone_scorecard.drl, phone_scorecard.drl.html
After generating a drl from the attached scorecard model, attempt to load the drl file
with the following code:
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newByteArrayResource(drl2.getBytes()), ResourceType.DRL);
//kbuilder.add(ResourceFactory.newByteArrayResource(drl2.getBytes()));
for (KnowledgeBuilderError error : kbuilder.getErrors()) {
System.out.println(error.getMessage());
}
Assert.assertFalse(kbuilder.hasErrors());
StatelessKieSession session = kbuilder.newKnowledgeBase().newStatelessKieSession();
Drools compiler gave the following exception:
Found duplicate declaration for type com.xxxx.xxxx.xxxx, unable to reconcile
Unable to process type BaselineScore
Unable to process type ScoreRow
Unable to process type PhoneScoreScoreCardData
Unable to process type ScoreRank
Unable to process type PhoneScoreOutput
Unable to process type DataField
Unable to process type PhoneMatch