Thanks, I'll try at the karaf mailing list. I'll also try to make a
more recent version of pax-web running. At least I will gain some
knowledge. But I have the feeling, that this issues isn't resolvable
for me, because I might have other external or internal bundles, that
require the war-feature.

Kind regards
Tobias Hein

Am Mo., 6. Juli 2026 um 18:14 Uhr schrieb Łukasz Dywicki <[email protected]>:
>
> Hello Tobias,
> You are right, its not a duplicate package at runtime.
> I have ran karaf locally to confirm behavior and I could see "is not
> instance" errors on all servlets, not only Spring.
> It boils down to the spec version shipped by default in Karaf, which is
> jakarta.servlet/jakarta.servlet-api/4.0.4.
> By installing jakarta.servlet/jakarta.servlet-api/5.0.0 you ship
> jakarta.servlet needed by activemq-web, but pax-web (which embeds Jetty
> in Karaf) still expects javax.servlet and links to spec 4.0.4. Since
> activemq-web is deployed as WAR (WAB) pax web scans web.xml while
> runtime parses OSGi headers in WAR manifest which points to
> jakarta.servlet;version="[5,6)". You effectively got an incompatible
> runtime.
> I've got a slightly different failure with later release of pax-web
> (11.x), however runtime still keeps track on older one.
> Overall you may need a re-assembly of Karaf to pull later release of
> pax-web which rely on jakarta namespace. For this I believe its better
> to consult karaf mailing list rather than activemq.
>
> Kind regards,
> Łukasz
>
> On 7/6/26 19:34, Tobias Hein wrote:
> > Hi Lukasz,
> >
> > I'm not sure, if you are right. I don't expect multiple javax.servlet-
> > packages, because org.springframework.web.servlet.DispatcherServlet is a
> > jakarta.servlet.Servlet.
> >
> > Watching all dependencies, that are required in feature:info activemq-
> > broker, I get the following:
> >
> > On the one hand, feature:info activemq-broker leads to the dependent
> > features
> >
> > activemq-web-console -> war -> pax-web-http-war -> pax-web
> >
> > At the end, this provides javax.servlet
> >
> > On the other hand, the bundle mvn:org.apache.activemq/activemq-web-
> > console/6.2.7/war requires jakarta.servlet
> >
> > Is this resolvable?
> >
> > Kind regards,
> > Tobias Hein
> >
> > Am So., 5. Juli 2026 um 09:25 Uhr schrieb Łukasz Dywicki <luke@code-
> > house.org <mailto:[email protected]>>:
> >
> >     Hello Tobias,
> >     While I did not trace issue by myself I suspect that it may be
> >     caused by
> >     multiple javax.servlet packages available at runtime which are in the
> >     end wired to different bundles. Karaf (Pax-Web) uses one, but ActiveMQ
> >     console bundle uses other, leading to two separate Servlet class
> >     instances being present. Effectively Karaf (Pax-Web) refuses spring
> >     servlet, because it uses another (bundle) classloader for specification
> >     classes.
> >
> >     Kind regards,
> >     Łukasz Dywicki
> >
> >     On 7/3/26 17:52, Tobias Hein wrote:
> >      > Hello everybody,
> >      >
> >      > in an OSGi-application running with JDK-21 on apache karaf 4.4.11
> >     I use an
> >      > activemq-broker 6.2.7. This works as expected if I install the
> >      > karaf-feature karaf-broker-noweb.
> >      >
> >      > But I am not able to install karaf-broker, which includes the
> >      > admin-webconsole. First of all there are missing dependencies and
> >     if I
> >      > resolve them manually, I get a mismatch between javax.servlet
> >     (provided by
> >      > karaf) and jakarta.servlet (required by activemq)
> >      >
> >      > Is there any chance to get the webconsole running on apache karaf
> >     in the
> >      > current versions?
> >      >
> >      > How to reproduce in a kind of summary
> >      >
> >      > * download current Karaf OSGi Runtime https://karaf.apache.org/
> >     download.html <https://karaf.apache.org/download.html>
> >      > * unzip and start karaf with ./bin/karaf
> >      > * execute the the following commands in the karaf console
> >      > ** .feature:repo-add activemq 6.2.7
> >      > ** bundle:install mvn:jakarta.servlet.jsp/jakarta.servlet.jsp-
> >     api/3.0.0
> >      > ** bundle:install mvn:jakarta.el/jakarta.el-api/4.0.0
> >      > ** bundle:install mvn:jakarta.servlet/jakarta.servlet-api/5.0.0
> >      > ** feature:install activemq-broker
> >      >
> >      > After that I see the following error in the log-file ./data/logs/
> >     karaf.log
> >      >
> >      > javax.servlet.UnavailableException: Servlet class
> >      > org.springframework.web.servlet.DispatcherServlet is not a
> >      > javax.servlet.Servlet
> >      >
> >      > I installed the jakarta-bundles first, because they are missing
> >      > dependencies of activemq-broker. They are needed for the bundle-
> >     wiring
> >      >
> >      > If you need more details, just ask :-)
> >      >
> >      > Kind regards
> >      > Tobias Hein
> >      >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to