[ 
https://issues.apache.org/jira/browse/FELIX-6599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17699558#comment-17699558
 ] 

Antoine DESSAIGNE commented on FELIX-6599:
------------------------------------------

Hello [~cziegeler],

It looks like it still doesn't work. The {{org.apache.felix.http.jetty}} jar 
inlines the {{org.apache.felix.http.base}} jar, so it fails loading 
{{org.apache.felix.http.base.internal.dispatch.HttpServletMappingImpl}} because 
there are 2 imports from {{javax.servlet}} 4.0.

Here's the stack trace we have
{noformat}
2023-03-13 11:33:38,903 [qtp712325821-1883] WARN 
org.eclipse.jetty.server.HttpChannel - /favicon.ico
java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletMapping
    at 
org.apache.felix.http.base.internal.dispatch.Dispatcher$1.doFilter(Dispatcher.java:139)
 ~[?:?]
    at 
org.apache.felix.http.base.internal.whiteboard.WhiteboardManager.invokePreprocessors(WhiteboardManager.java:986)
 ~[?:?]
    at 
org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:94)
 ~[?:?]
    at 
org.apache.felix.http.base.internal.dispatch.DispatcherServlet.service(DispatcherServlet.java:49)
 ~[?:?]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) 
~[javax.servlet-api-3.1.0.jar:3.1.0]
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799) 
~[?:?]
    at 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:554) 
~[?:?]
...
{noformat}

What do you think? Thank you for your help.


> javax.servlet incompatibility between Felix HTTP Jetty Light 4.2.8 and Jetty 
> 9.4.x
> ----------------------------------------------------------------------------------
>
>                 Key: FELIX-6599
>                 URL: https://issues.apache.org/jira/browse/FELIX-6599
>             Project: Felix
>          Issue Type: Bug
>          Components: HTTP Service
>    Affects Versions: http.jetty-4.2.8
>            Reporter: Antoine DESSAIGNE
>            Assignee: Carsten Ziegeler
>            Priority: Major
>             Fix For: http.jetty-4.2.10, http.base-4.2.6, http.bridge-4.2.8
>
>
> Hello everyone,
> We detected what looks like an inconsistency in Felix HTTP Jetty Light 4.2.8 
> (where Jetty is an external jar and not inlined).
> In the {{MANIFEST.MF}} file we can see
> {noformat}
> Import-Package:
>  javax.servlet.descriptor;version="[3.1,4)"
>  javax.servlet.http;version="[3.1,4)"
>  javax.servlet;version="[3.1,4)"
>  ...
> Require-Capability: 
> osgi.contract;filter:="(&(osgi.contract=JavaServlet)(version=4.0))",osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.8))"
> {noformat}
> So it asks for {{javax.servlet}} in version range [3.1,4) but ask for a 4.0 
> Java Servlet capability. Unfortunately 
> {{org.apache.felix.http.base.internal.registry.PathResolverFactory}} uses 
> {{javax.servlet.http.MappingMatch}} which is only available starting in 4.0.
> Felix HTTP Jetty Light uses Jetty 9.4.50.v20221201 which requires 
> {{javax.servlet}} in version range [3.1,4).
> So it looks like in the 4.2.x branch, {{javax.servlet}} should be in 3.1.0 
> and {{javax.servlet.http.MappingMatch}} should not be used. Am I right or is 
> there something I did wrong?
> Thank you for your help



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to