(def config (load-config :resource "config.edn"
:merge [(from-env)]))
(defn config-properties []
(t/map->properties config))
Results in:
Exception in thread "main" java.lang.IllegalArgumentException: Malformed \uxxxx encoding., compiling:(/private/var/folders/hl/dz69nmk50kl_cn4fgd904dwh0000gn/T/form-init5308382940781279132.clj:1:125)
at clojure.lang.Compiler.load(Compiler.java:7391)
at clojure.lang.Compiler.loadFile(Compiler.java:7317)
at clojure.main$load_script.invokeStatic(main.clj:275)
at clojure.main$init_opt.invokeStatic(main.clj:277)
at clojure.main$init_opt.invoke(main.clj:277)
at clojure.main$initialize.invokeStatic(main.clj:308)
at clojure.main$null_opt.invokeStatic(main.clj:342)
at clojure.main$null_opt.invoke(main.clj:339)
at clojure.main$main.invokeStatic(main.clj:421)
at clojure.main$main.doInvoke(main.clj:384)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:383)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
Caused by: java.lang.IllegalArgumentException: Malformed \uxxxx encoding.
at java.util.Properties.loadConvert(Properties.java:574)
at java.util.Properties.load0(Properties.java:391)
at java.util.Properties.load(Properties.java:317)
at cprop.tools$map__GT_properties.invokeStatic(tools.cljc:76)
at cprop.tools$map__GT_properties.invoke(tools.cljc:71)
If "(from-env)" is removed, everything works. I suspect that parsing of one of the env variables might be causing this. I'm on Mac.
I am attaching a code sample to reproduce.
The output included as result.txt is from the first call that works: semi - custom logic, based on other private methods in the lib to convert config to Properties.
issue-demo.zip
Results in:
If "(from-env)" is removed, everything works. I suspect that parsing of one of the env variables might be causing this. I'm on Mac.
I am attaching a code sample to reproduce.
The output included as result.txt is from the first call that works: semi - custom logic, based on other private methods in the lib to convert config to Properties.
issue-demo.zip