0

I have updated my KARAF version from 4.2.15 to 4.4.1 and Java from 8 to 11 in my application.

Gone through the official Release notes and updated some dependencies as well.

Upgraded OSGI-Core from 6.0.0 to 8.0.0.

Upgraded osgi.compendium 5.0.0 to osgi.cmpn 7.0.0

Upgraded Jetty from 9.4.43.v20210629 to 9.4.46.v20220331.

Upgraded pax-web-spi from 4.3.4 to 7.2.11.

I'm using javax.servlet-api 3.1.0 version in my application.

I'm unable to create default RequestDispatcher. Please check the below code lines.

public class ExampleServlet extends HttpServlet {
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException { 
     RequestDispatcher requestDispatcher = getServletContext().getNamedDispatcher("default"); // get getServletContext() is calling the method in GenericServlet. 
    requestDispatcher.include(request, response);
     }
 } 

the above code used to work fine before the version upgrades but now I'm getting the requestDispatcher as null.

Can anyone please look at it, let me know if I'm missing something.

the above code used to work fine before the version upgrades but now I'm getting the requestDispatcher as null.

Joakim Erdfelt
  • 46,896
  • 7
  • 86
  • 136
  • [Jetty 9.x is now at End of Community Support](https://github.com/eclipse/jetty.project/issues/7958). Also, Jetty 9.4.46 is subject to several security vulnerabilities - https://www.eclipse.org/jetty/security_reports.php - You should be using Jetty 10+ at this point. – Joakim Erdfelt Nov 14 '22 at 14:37

1 Answers1

0

This is a placeholder for the final answer. For now, the issue is being analyzed here: https://github.com/ops4j/org.ops4j.pax.web/issues/1794

Grzegorz Grzybek
  • 6,152
  • 3
  • 29
  • 42