Hi Miroslav, On Mon, 2019-09-30 at 21:52 +0200, Miroslav Beranič wrote: > Hi all, > > I've installed bundle: org.apache.sling.commons.mime ( > https://github.com/apache/sling-org-apache-sling-commons-mime ), > master > branch, into Karaf 4.3.0 and I get NPE. > > Interesting points are: > - Constructor with 0 arguments not found. Component will fail. > - Error during instantiation of the implementation object: > Constructor not > found. > - EventDispatcher: Error during dispatch. > (java.lang.NullPointerException) > java.lang.NullPointerException: null > > > I've "fixed" this by adding constructor to the > class MimeTypeWebConsolePlugin. > > public class MimeTypeWebConsolePlugin extends HttpServlet { > . > . > . > public MimeTypeWebConsolePlugin() { > super(); > } > . > . > . > } > > and not it gets loaded and it works. If you feel this is usable, > please use > it.
Thanks for reporting this. We did have a bug with the mime types console being broken, but it was supposedly fixed with https://issues.apache.org/jira/browse/SLING-8310 That fix was just released yesterday with version 2.2.2 of the bundle. The change you made does not look like it would fix such a problem, since the no-arg constructor will be added by default, see https://docs.oracle.com/javase/specs/jls/se7/html/jls-8.html#jls-8.8.9 Maybe you deployed a old release version of the mime types bundle ( 2.2.0 ) and then you deployed master, which fixed the problem you were seeing? This should be solved in version 2.2.2 of the bundle. Thanks, Robert
