class HandlesTypes not found when starting ActiveMQ Webconsole

Description

The exception below is thrown when installing the feature activemq-broker 5.14.3 in Apache Karaf 4.1.0.

I first thought this is an issue in ActiveMQ and added the import of javax.servlet.annotation to the activemq-webconsole bundle. I am not so sure anymore though as I did not find any references to this annotation in the code.

The annotation class is loaded here using the classloader of the activemq bundle:
https://github.com/ops4j/org.ops4j.pax.web/blob/pax-web-6.0.x/pax-web-extender-war/src/main/java/org/ops4j/pax/web/extender/war/internal/parser/WebAppParser.java#L353

As it is not mandatory to import this package I think this is a bug. Either we should not load using the classloader of the bundle or we should ignore if the class can not be found.

2017-02-03 14:38:19,182 | ERROR | FelixStartLevel | WebObserver | 146 - org.ops4j.pax.web.pax-web-extender-war - 6.0.2 | Error scanning web bundle org.apache.activemq.activemq-web-console [117]: javax.servlet.annotation.HandlesTypes not found by org.apache.activemq.activemq-web-console [117]
java.lang.ClassNotFoundException: javax.servlet.annotation.HandlesTypes not found by org.apache.activemq.activemq-web-console [117]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1574) [?:?]

Full stack trace at: http://apaste.info/zBPRm

Environment

None

Status

Assignee

Christian Schneider

Reporter

Christian Schneider

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure