Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-3410

Found duplicate declaration for type exception after generating drl from scorecards xls

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • 6.5.0.Final
    • PMML, XLS Score Card Editor
    • None
    • Hide

      Write a test case with the following:
      ScorecardCompiler scorecardCompiler = new ScorecardCompiler(ScorecardCompiler.DrlType.EXTERNAL_OBJECT_MODEL);
      boolean compileResult = scorecardCompiler.compileFromExcel(this.getClass().getResourceAsStream("/gem_address_scorecard.xls"), "address_scorecard");
      PMML pmmlDocument = scorecardCompiler.getPMMLDocument();

      drl = scorecardCompiler.getDRL();

      And then the above code get the error:

      Show
      Write a test case with the following: ScorecardCompiler scorecardCompiler = new ScorecardCompiler(ScorecardCompiler.DrlType.EXTERNAL_OBJECT_MODEL); boolean compileResult = scorecardCompiler.compileFromExcel(this.getClass().getResourceAsStream("/gem_address_scorecard.xls"), "address_scorecard"); PMML pmmlDocument = scorecardCompiler.getPMMLDocument(); drl = scorecardCompiler.getDRL(); And then the above code get the error:
    • NEW
    • VERIFIED

      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

              lleveric Lance Leverich (Inactive)
              drwho_jira Gordon Hu (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: