[jboss-jira] [JBoss JIRA] (DROOLS-74) DroolsCompilerAntTask doesn't recognize BPMN files

RH Bugzilla Integration (JIRA) jira-events at lists.jboss.org
Mon Mar 11 02:38:42 EDT 2013


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

RH Bugzilla Integration updated DROOLS-74:
------------------------------------------

        Bugzilla Update: Perform
    Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=920004

    
> DroolsCompilerAntTask doesn't recognize BPMN files
> --------------------------------------------------
>
>                 Key: DROOLS-74
>                 URL: https://issues.jboss.org/browse/DROOLS-74
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 5.5
>            Reporter: Toshiya Kobayashi
>            Assignee: Mark Proctor
>         Attachments: DROOLS-74_DroolsCompilerAntTask.zip
>
>
> DroolsCompilerAntTask doesn't recognize BPMN files and treats it as DRL so fails to build a PKG.
> {noformat}
> [tkobayas at tkobayas 00790324_DroolsCompilerAntTask_revised]$ ant -verbose
> Apache Ant version 1.7.1 compiled on June 27 2008
> Buildfile: build.xml
> Detected Java version: 1.6 in: /usr/java/jdk1.6.0_38/jre
> Detected OS: Linux
> parsing buildfile /home/tkobayas/usr/support/00790324_DroolsCompilerAntTask_revised/build.xml with URI = file:/home/tkobayas/usr/support/00790324_DroolsCompilerAntTask_revised/build.xml
> Project base dir set to: /home/tkobayas/usr/support/00790324_DroolsCompilerAntTask_revised
> [antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found.
> Build sequence for target(s) `buildPackage' is [buildPackage]
> Complete build sequence is [buildPackage, ]
> buildPackage:
>      [echo] Building Package...
>  [compiler] SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
>  [compiler] SLF4J: Defaulting to no-operation (NOP) logger implementation
>  [compiler] SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
>  [compiler] [1,0]: [ERR 107] Line 1:0 mismatched input '<' expecting one of the following tokens: '[package, import, global, declare, function, rule, query]'.
>  [compiler] [0,0]: Parser returned a null Package
>  [compiler] [1,0]: [ERR 107] Line 1:0 mismatched input '<' expecting one of the following tokens: '[package, import, global, declare, function, rule, query]'.
>  [compiler] [0,0]: Parser returned a null Package
>  [compiler] 
> BUILD FAILED
> /home/tkobayas/usr/support/00790324_DroolsCompilerAntTask_revised/build.xml:32: RuleBaseTask failed: [1,0]: [ERR 107] Line 1:0 mismatched input '<' expecting one of the following tokens: '[package, import, global, declare, function, rule, query]'.
> [0,0]: Parser returned a null Package
> [1,0]: [ERR 107] Line 1:0 mismatched input '<' expecting one of the following tokens: '[package, import, global, declare, function, rule, query]'.
> [0,0]: Parser returned a null Package
> 	at org.drools.contrib.DroolsCompilerAntTask.execute(DroolsCompilerAntTask.java:159)
> 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
> 	at org.apache.tools.ant.Task.perform(Task.java:348)
> 	at org.apache.tools.ant.Target.execute(Target.java:357)
> 	at org.apache.tools.ant.Target.performTasks(Target.java:385)
> 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
> 	at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
> 	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
> 	at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
> 	at org.apache.tools.ant.Main.runBuild(Main.java:758)
> 	at org.apache.tools.ant.Main.startAnt(Main.java:217)
> 	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
> 	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
> Caused by: org.drools.rule.InvalidRulePackage: [1,0]: [ERR 107] Line 1:0 mismatched input '<' expecting one of the following tokens: '[package, import, global, declare, function, rule, query]'.
> [0,0]: Parser returned a null Package
> [1,0]: [ERR 107] Line 1:0 mismatched input '<' expecting one of the following tokens: '[package, import, global, declare, function, rule, query]'.
> [0,0]: Parser returned a null Package
> 	at org.drools.rule.Package.checkValidity(Package.java:445)
> 	at org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:515)
> 	at org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:472)
> 	at org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:468)
> 	at org.drools.contrib.DroolsCompilerAntTask.createWithPackageBuilder(DroolsCompilerAntTask.java:289)
> 	at org.drools.contrib.DroolsCompilerAntTask.execute(DroolsCompilerAntTask.java:156)
> 	... 17 more
> {noformat}
> {code:java}
>     private void compileAndAddFile(KnowledgeBuilder kbuilder, String fileName)
>             throws FileNotFoundException, DroolsParserException, IOException {
>         FileReader fileReader = new FileReader(new File(this.srcdir, fileName));
>         if (fileName.endsWith(DroolsCompilerAntTask.BRLFILEEXTENSION)) {
>             kbuilder.add(ResourceFactory.newReaderResource(fileReader),
>                     ResourceType.BRL);
>         } else if (fileName
>                 .endsWith(DroolsCompilerAntTask.RULEFLOWMODELFILEEXTENSION)
>                 || fileName
>                 .endsWith(DroolsCompilerAntTask.RULEFLOWFILEEXTENSION)) {
>             kbuilder.add(ResourceFactory.newReaderResource(fileReader),
>                     ResourceType.DRF);
>         } else if (fileName.endsWith(DroolsCompilerAntTask.XMLFILEEXTENSION)) {
>             kbuilder.add(ResourceFactory.newReaderResource(fileReader),
>                     ResourceType.XDRL);
>         } else if (fileName.endsWith(DroolsCompilerAntTask.XLSFILEEXTENSION)) {
>             DecisionTableConfiguration dtableconfiguration = KnowledgeBuilderFactory
>                     .newDecisionTableConfiguration();
>             dtableconfiguration.setInputType(DecisionTableInputType.XLS);
>             kbuilder.add(ResourceFactory.newReaderResource(fileReader),
>                     ResourceType.DTABLE, dtableconfiguration);
>             // } else if
>             // (fileName.endsWith(DroolsCompilerAntTask.DSLFILEEXTENSION)) {
>             //
>             // kbuilder.add(ResourceFactory.newReaderResource(fileReader),
>             // ResourceType.DSL);
>         } else if (fileName.endsWith(DroolsCompilerAntTask.DSLRFILEEXTENSION)) {
>             // Get the DSL too.
>             String[] dsls = resolveDSLFilesToArray();
>             for (int i = 0; i < dsls.length; i++) {
>                 kbuilder.add(ResourceFactory.newFileResource(new File(
>                         this.srcdir, dsls[i])), ResourceType.DSL);
>             }
>             kbuilder.add(ResourceFactory.newReaderResource(fileReader),
>                     ResourceType.DSLR);
>         } else {
>             kbuilder.add(ResourceFactory.newReaderResource(fileReader),
>                     ResourceType.DRL);
>         }
>     }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list