-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
6.x.x
-
None
Description of problem:
"Run As Java Application" honours Eclipse encoding settings, which you can configure at Workspace / Project / Run Configuration levels. But "Debug As Drools Application" picks up OS LOCALE regardless of Eclipse settings.
Steps to Reproduce:
1. export LANG=C
2. Start JBDS 7
3. Import attached multi-byte-rulename.zip
4. Confirm that your project encoding is UTF-8 ([Resource]->"Text file encoding")
5. "Run As Java Application" DroolsTest. Confirm that file.encoding is UTF-8
—
file.encoding : UTF-8
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Hello World
Goodbye cruel world
—
6. "Debug As Drools Application" DroolsTest
Actual results:
file.encoding is ANSI_X3.4-1968. Execution fails.
—
file.encoding : ANSI_X3.4-1968
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
java.lang.RuntimeException: Error while creating KieBase[Message [id=1, level=ERROR, path=rules/Sample.drl, line=20, column=0
text=Duplicate rule name: ???????????????]]
at org.drools.compiler.kie.builder.impl.KieContainerImpl.getKieBase(KieContainerImpl.java:337)
at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:486)
at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:457)
at com.sample.DroolsTest.main(DroolsTest.java:20)
—
Expected results:
file.encoding is UTF-8. Execution works. And you can debug DRL.
Additional info:
There are 2 workarounds.
- Set UTF-8 as OS LOCALE (e.g. export LANG=ja_JP.UTF-8) before launching JBDS
or - Set "-Dfile.encoding=UTF-8" in "VM arguments" section in "Arguments" tab in "Debug Configuration"