Closed AnneFaulhaber closed 4 years ago
@AnneODM could you provide me an how to reproduce and a material to reproduce this issue.
Hi Laurent,
you can recreate the issue I observe when creating an enum with a non-ascii character in a decision model service in DC Business Console. It is no longer possible to deploy it.
I.e. if I create an enum called MyEnum with the value "MySpecialØ", then I get the error:
ilog.rules.teamserver.brm.builder.IlrBuildException: While applying business to execution (B2X) model mapping
GBREX0021E: Cannot find attribute 'MySpecial��' in execution class 'myModel.MyEnum'
When export the decision model service from DC I can see that it creates the model.bom file incorrectly:
public final class MyEnum
extends java.lang.Enum
property "dmn.class" "true"
property "dmn.vocabulary.label" "MyEnum"
property "dmn.xmlType.name" "MyEnum"
{
domain {static "MySpecial��"}
public static final readonly myModel.MyEnum "MySpecial��"
property "dmn.vocabulary.label" "MySpecial��"
property "dmn.xmlEnumValue.value" "MySpecial��"
property update "true";
public static myModel.MyEnum valueOf(string arg);
public static myModel.MyEnum[] values()
property "dmn.proposal.weight" "+1";
}
This works fine in 8.10.3 version of the image but does not work in 8.10.4. This does only affect the docker images and not on-prem. I currently think this is because of the character encoding in the base image causing the model.bom to be incorrectly encoded.
You can see that in the web browser the enum is displayed correctly which makes me believe this is NOT
1: Create a new decision model service from Business Console.
2: Add an Enum, called MyEnum.
3: Add a value to the Enum, called "MySpecialØ" or "MySpecialÖ".
4: Set the input as decision datatypes so they "compile".
5: Deploy to the RES, and observe that it fails on 8.10.4.
6: Export from BC and check the model.bom file
The decision model does not support other locale than english
When issuing the docker run command the following warning is being reported:
docker run -e LICENSE=accept -p 9060:9060 -p 9443:9443 -m 2048M --memory-reservation 2048M -e SAMPLE=true ibmcom/odm > odm8104.txt ls: cannot access '/shared/tls/truststore/jks': No such file or directory /script/setUTF8Locale.sh: line 7: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) /script/setUTF8Locale.sh: line 7: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory /bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
There seems to be an issue in the script being invoked. You may end with a locale on the base image that does not support multi-byte character so I/O operations on the file system may end up corrupting file content in a way that special characters are no longer readable.