- ;config.edn
- {
- :host001
- {
- :protocol "http"
- :host "test-uk1.example.com"
- :port 9101
- :context-root "Jolokia"
- :credentials {
- :credential001{
- :username "user"
- :password "user1"
- }
- }
- :action001 {
- :action "read"
- :mbean "java.lang:type=OperatingSystem"
- :attribute "FreePhysicalMemorySize"
- :option "ignoreErrors=true"}
- }
- :host002
- {
- :protocol "http"
- :host "test-uk2.example.com"
- :port 9101
- :context-root "Jolokia"
- :credentials {
- :credential001{
- :username "user"
- :password "user1"
- }
- }
- :action001 {
- :action "read"
- :mbean "java.lang:type=OperatingSystem"
- :attribute "FreePhysicalMemorySize"
- :option "ignoreErrors=true"}
- }
- }
- (defn init-queue []
- (doseq [keyval config]
- (println (key keyval))
- (if (map? (val keyval))
- (
- (println (val keyval))))))
After parsing the edn file, I get an null pointer exception and I don't get it why:
NullPointerException jolokia-client.core/init-queue (NO_SOURCE_FILE:6)