apache / incubator-kie-drools

Drools is a rule engine, DMN engine and complex event processing (CEP) engine for Java.
http://www.drools.org
5.85k stars 2.49k forks source link

[new-parser] InternalResource's encoding is ignored #5939

Closed yurloc closed 4 months ago

yurloc commented 4 months ago

Parent issue

Failing tests

Rule code snippet

N/A.

Error output

### parse : ANTLR4_PARSER_ENABLED = true
18:32:02.989 [main] ERROR o.d.c.k.b.impl.AbstractKieProject.buildKnowledgePackages:280 - Unable to build KieBaseModel:KieBaseModelName
Unable to Analyse Expression gar�on:
[Error: unable to resolve method using strict-mode: org.drools.mvel.compiler.I18nPerson.gar()]
[Near : {... gar�on ....}]
             ^
[Line: 10, Column: 8] : [Rule name='Use gar�on property']

Unable to analyze expression 'gar�on' : [Rule name='Use gar�on property']

Unable to Analyse Expression gar�on != null:
[Error: unable to resolve method using strict-mode: org.drools.mvel.compiler.I18nPerson.gar()]
[Near : {... gar�on != null ....}]
             ^
[Line: 10, Column: 8] : [Rule name='Use gar�on property']

18:32:02.989 [main] ERROR o.d.testcoverage.common.util.KieUtil.getKieBuilderFromKieFileSystem:165 - KieBuilder errors: [Message [id=1, kieBase=KieBaseModelName, level=ERROR, path=test_I18nPerson_latin1.drl.latin1, line=10, column=0
   text=Unable to Analyse Expression gar�on:
[Error: unable to resolve method using strict-mode: org.drools.mvel.compiler.I18nPerson.gar()]
[Near : {... gar�on ....}]
             ^
[Line: 10, Column: 8]], Message [id=2, kieBase=KieBaseModelName, level=ERROR, path=test_I18nPerson_latin1.drl.latin1, line=10, column=0
   text=Unable to analyze expression 'gar�on'], Message [id=3, kieBase=KieBaseModelName, level=ERROR, path=test_I18nPerson_latin1.drl.latin1, line=10, column=0
   text=Unable to Analyse Expression gar�on != null:
[Error: unable to resolve method using strict-mode: org.drools.mvel.compiler.I18nPerson.gar()]
[Near : {... gar�on != null ....}]
             ^
[Line: 10, Column: 8]]]

java.lang.AssertionError: [[Message [id=1, kieBase=KieBaseModelName, level=ERROR, path=test_I18nPerson_latin1.drl.latin1, line=10, column=0
   text=Unable to Analyse Expression gar�on:
[Error: unable to resolve method using strict-mode: org.drools.mvel.compiler.I18nPerson.gar()]
[Near : {... gar�on ....}]
             ^
[Line: 10, Column: 8]], Message [id=2, kieBase=KieBaseModelName, level=ERROR, path=test_I18nPerson_latin1.drl.latin1, line=10, column=0
   text=Unable to analyze expression 'gar�on'], Message [id=3, kieBase=KieBaseModelName, level=ERROR, path=test_I18nPerson_latin1.drl.latin1, line=10, column=0
   text=Unable to Analyse Expression gar�on != null:
[Error: unable to resolve method using strict-mode: org.drools.mvel.compiler.I18nPerson.gar()]
[Near : {... gar�on != null ....}]
             ^
[Line: 10, Column: 8]]]] 
Expecting empty but was: [Message [id=1, kieBase=KieBaseModelName, level=ERROR, path=test_I18nPerson_latin1.drl.latin1, line=10, column=0
   text=Unable to Analyse Expression gar�on:
[Error: unable to resolve method using strict-mode: org.drools.mvel.compiler.I18nPerson.gar()]
[Near : {... gar�on ....}]
             ^
[Line: 10, Column: 8]],
    Message [id=2, kieBase=KieBaseModelName, level=ERROR, path=test_I18nPerson_latin1.drl.latin1, line=10, column=0
   text=Unable to analyze expression 'gar�on'],
    Message [id=3, kieBase=KieBaseModelName, level=ERROR, path=test_I18nPerson_latin1.drl.latin1, line=10, column=0
   text=Unable to Analyse Expression gar�on != null:
[Error: unable to resolve method using strict-mode: org.drools.mvel.compiler.I18nPerson.gar()]
[Near : {... gar�on != null ....}]
             ^
[Line: 10, Column: 8]]]

    at org.drools.testcoverage.common.util.KieUtil.getKieBuilderFromKieFileSystem(KieUtil.java:169)
    at org.drools.testcoverage.common.util.KieUtil.getKieBuilderFromKieFileSystem(KieUtil.java:134)
    at org.drools.testcoverage.common.util.KieUtil.buildAndInstallKieModuleIntoRepo(KieUtil.java:78)
    at org.drools.testcoverage.common.util.KieUtil.buildAndInstallKieModuleIntoRepo(KieUtil.java:72)
    at org.drools.testcoverage.common.util.KieUtil.getKieModuleFromResources(KieUtil.java:249)
    at org.drools.testcoverage.common.util.KieUtil.getKieModuleFromResources(KieUtil.java:238)
    at org.drools.testcoverage.common.util.KieBaseUtil.getKieBaseFromKieModuleFromResources(KieBaseUtil.java:102)
    at org.drools.testcoverage.common.util.KieBaseUtil.getKieBaseFromKieModuleFromResources(KieBaseUtil.java:92)
    at org.drools.mvel.integrationtests.I18nTest.readDrlInEncodingLatin1(I18nTest.java:97)
yurloc commented 4 months ago

/take