Running installer or start opennms throws exception java.lang.IllegalArgumentException: key can't be empty

troubleshooting
upgrade
#1

Problem

While doing an upgrade you have to run the install -dis command to upgrade the database schema. The installer fails with the error message:

java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.opennms.bootstrap.Bootstrap$4.run(Bootstrap.java:525)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: key can't be empty
        at java.lang.System.checkKey(System.java:841)
        at java.lang.System.setProperty(System.java:789)
        at org.opennms.bootstrap.Bootstrap.loadSystemProperties(Bootstrap.java:351)
        at org.opennms.bootstrap.Bootstrap.main(Bootstrap.java:471)
        at org.opennms.install.Installer.install(Installer.java:317)
        at org.opennms.install.Installer.main(Installer.java:991)

Diagnosis

Check you property files in your OpenNMS configuration.

Cause

Java properties are key=value. It seems like your update procedure broke Java property files. This can especially happen when you use a version control system which introduces ==== in your configuration files with hints to merge them. Check the file ${OPENNMS_HOME}/etc/opennms.properties and all your custom *.properties files in your OpenNMS configuration folder in ${OPENNMS_HOME}/etc/opennms.properties.d.

1 Like