When running in a current release version of Apache Sling we get a ClassCastException in the static initializer because the the CommandMap is not an instance of MailcapCommandMap. See http://mail-archives.apache.org/mod_mbox/sling-users/201409.mbox/browser.