Hi,
I guess it's because Karaf json config service takes it.
Maybe, if you don't use the json config for Karaf, you can exclude json
suffix, aka in etc/config.properties, you can change the filter:

felix.fileinstall.filter = .*\\.(cfg|config|json)

to something like:

felix.fileinstall.filter = .*\\.(cfg|config|jsoncfg)

Like this, json file should not be modified (I gonna try but it should do
the trick).

Regards
JB

On Mon, Mar 7, 2022 at 11:04 PM Arthur Naseef <artnas...@apache.org> wrote:

> Using Karaf 4.3.6 with keycloak, which uses a JSON configuration file in
> the Karaf ETC folder.
>
> On startup of Karaf, the JSON file is incorrectly rewritten.  Looks like
> this happens to any JSON file placed in that folder.  For example:
>
> *etc/test.json*
>
> {
>     "field1": {
>         "sub-field-A": 1,
>         "sub-field-B": 2
>     }
> }
>
>
> After starting karaf:
>
> {
>   "field1":"{\"sub-field-A\":1,\"sub-field-B\":2}"
> }
>
>
> The reformatting breaks keycloak, which makes sense since it turned a
> structure into a string.  Any help is appreciated.
>
> Art
>

Reply via email to