[jboss-jira] [JBoss JIRA] (DROOLS-3410) Found duplicate declaration for type exception after generating drl from scorecards xls

Gordon Hu (Jira) issues at jboss.org
Fri Dec 7 09:03:00 EST 2018


     [ https://issues.jboss.org/browse/DROOLS-3410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gordon Hu updated DROOLS-3410:
------------------------------
    Description: 
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

  was:
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.efx.gem.rules.domain.score.PhoneScore, 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



> 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, 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



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the jboss-jira mailing list