Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
yurloc opened this issue May 13, 2024 · 1 comment
Closed

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

yurloc opened this issue May 13, 2024 · 1 comment

Comments

@yurloc
Copy link
Contributor

yurloc commented May 13, 2024

Parent issue

Failing tests

  • org.drools.mvel.integrationtests.I18nTest#readDrlInEncodingLatin1

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
Copy link
Contributor Author

yurloc commented May 13, 2024

/take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🎯 Done
Development

No branches or pull requests

1 participant