[jboss-jira] [JBoss JIRA] (DROOLS-918) Janino java compiler issue

sam dai (JIRA) issues at jboss.org
Wed Sep 16 23:03:00 EDT 2015


sam dai created DROOLS-918:
------------------------------

             Summary: Janino java compiler issue
                 Key: DROOLS-918
                 URL: https://issues.jboss.org/browse/DROOLS-918
             Project: Drools
          Issue Type: Bug
          Components: core engine
    Affects Versions: 6.2.0.Final
            Reporter: sam dai
            Assignee: Mario Fusco


Recently I upgraded drools from version 6.0.0 Final to version 6.2.0 Final, I found some bpm process can't be deployed, the error message is as below.
{color:#d04437}java.lang.IllegalArgumentException: Errors while parsing knowledge base + errors added Unable to generate action invoker. Unknown variable or type "Process_org$u46$drools$u46$bpmn2$u46$90f495e7$u45$788b$u45$472c$u45$abb3$u45$b37125d5a81e_$u43$_2014$u45$06$u45$18_05$u58$40$u58$29_$u45$0700162982687"
A method named "action1" is not declared in any enclosing class nor any supertype, nor through a static import
Expression "Process_org$u46$drools$u46$bpmn2$u46$90f495e7$u45$788b$u45$472c$u45$abb3$u45$b37125d5a81e_$u43$_2014$u45$06$u45$18_05$u58$40$u58$29_$u45$0700162982687" is not an rvalue{color}

The java compiler is "JANINO" by setting the value of system property "drools.dialect.java.compiler" as "JANINO".  If I use ECLIPSE java compiler, will not have this issue. I debugged the code, found code of line 82 of org.drools.compiler.rule.builder.dialect.DialectUtil.java is changed from
{color:#205081}final String newName = prefix + "_" + NON_ALPHA_REGEX.matcher(name).replaceAll("_");{color}
to 
{color:#205081}final String newName = prefix + "_" + normalizeRuleName( name );{color}
If I changed it back, bpm process can be deployed successfully.
Then I did more testing. for a name "org.drools.bpmn2.fc1291c5-c25c-4c6b-aba3-76efdcd16136 + 2014-03-07 13:06:29 -0800", 
if I use script "normalizeRuleName( name )", the value will be "org$u46$drools$u46$bpmn2$u46$fc1291c5$u45$c25c$u45$4c6b$u45$aba3$u45$76efdcd16136_$u43$_2014$u45$03$u45$07_13$u58$06$u58$29_$u45$0800", 
if use script "NON_ALPHA_REGEX.matcher(name).replaceAll("_");", the value will be 
NON_ALPHA_REGEX.matcher(name).replaceAll("_");

So I wonder if this is a bug or I missed some configuration.









--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list