Details
Description
If the "keystore" is not configured propertly inside the "etc/org.apache.karaf.management.cfg" file then while doing a "shutdown" (either usign "shutdown" command or using ctrl+d) the karaf throws the following error.
2015-04-12 11:25:42,242 | WARN | FelixStartLevel | core | 15 - org.apache.aries.jmx.core - 1.1.3 | Task rejected for JMX Notification dispatch of event [org.osgi.framework.ServiceEvent[source=[javax.management.MBeanServer]]] - Dispatcher may have been shutdown 2015-04-12 11:25:42,243 | WARN | FelixStartLevel | Activator | 36 - org.apache.karaf.management.server - 4.0.0.SNAPSHOT | Error destroying ConnectorServerFactory java.lang.NullPointerException at org.apache.karaf.management.ConnectorServerFactory.destroy(ConnectorServerFactory.java:276)[36:org.apache.karaf.management.server:4.0.0.SNAPSHOT] at org.apache.karaf.management.internal.Activator.doStop(Activator.java:178)[36:org.apache.karaf.management.server:4.0.0.SNAPSHOT] at org.apache.karaf.util.tracker.BaseActivator.stop(BaseActivator.java:90)[36:org.apache.karaf.management.server:4.0.0.SNAPSHOT] at org.apache.felix.framework.util.SecureAction.stopActivator(SecureAction.java:719)[org.apache.felix.framework-4.9.0-SNAPSHOT.jar:] at org.apache.felix.framework.Felix.stopBundle(Felix.java:2608)[org.apache.felix.framework-4.9.0-SNAPSHOT.jar:] at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1387)[org.apache.felix.framework-4.9.0-SNAPSHOT.jar:] at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)[org.apache.felix.framework-4.9.0-SNAPSHOT.jar:] at java.lang.Thread.run(Thread.java:745)[:1.7.0_71]
===================
Steps to Reproduce
===================
Step-1) Edit the "etc/org.apache.karaf.management.cfg" file and add the following entry in it. Notice that the "" does not exist as we hav not created any such keystore. And then start the karaf.
##################### ADDING THE FOLLOWING NON_EXISTING SSL KEYSTORE INTENTIONALLY #############
secured = true
secureProtocol = SSL
keyAlias = jbossalias
keyStore = sample_keystore
trustStore = sample_keystore
Step-2) Try stopping the karaf either usign "shutdown" command or using ctrl+d :
Step-3) Check the karaf.log to find the "java.lang.NullPointerException"