OSGi : RouteRegistryInitializer which is responsible for servlet initialization logic is not invoked in OSGi
See original GitHub issueThis issue is specific for Jetty in Felix OSGi container (both org.apache.felix.http.jetty
and jetty osgi boot).
May be this is a question of the web server bundle in OSGi and there is nothing to do on our side.
I register the servlet manually via the bundle activator (using HttpServiceTracker
and manual servlet instance creation).
And the application doesn’t have any routes available even though I have class with @Route
annotation.
It seems that RouteRegistryInitializer
doesn’t do its job.
See #4367 for the servlet registration source code.
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (8 by maintainers)
Top Results From Across the Web
Servlet not getting invoked using osgi.service.http.whiteboard ...
I need to customize the error message using whiteboard pattern (osgi.service.http.whiteboard). I registered a new servlet with the errorpage ...
Read more >102 Http Service Specification - OSGi Compendium 8
The initialization is done by calling the Servlet object's Servlet.init(ServletConfig) method. The ServletConfig parameter provides access to the ...
Read more >Web OSGi Bundle runtime error - Forums - IBM Support
I see this ERROR when I hit an OSGi Web bundle (on Liberty 8.5.5.1) ... SRVE0276E: Error while initializing Servlet [JAX-RS Servlet]: javax.servlet....
Read more >AEM6.4 @Reference not working in SlingServlet
We have a class named MySimpleService that reads OSGi config values. In the Servlet in this article - we use a @Refence to...
Read more >Top 50 Servlet Interview Questions and Answers in 2023
But, by default, Container will not initialize the servlet, ... Servlet is robust and called as a server-side programming language.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We should first test the approach recommended here https://github.com/vaadin/flow/issues/4376#issuecomment-405214203 (thanks @Sandared !) for the routes, and if that works, then use it for every other servlet context initializer we have. That can be left for future issues.
There is no anything specifically done for our code base. So nothing to change generically.
But our current tests uses
jetty-osgi-boot
which has an ability to runServletContainerInitializer
. But to enable this the appropriate classes are registered: https://github.com/vaadin/flow/blob/master/flow-tests/test-root-context/src/main/resources/META-INF/services/javax.servlet.ServletContainerInitializerSo either this file needs to be removed completely or all Flow initializers should be removed. This will disable automatic types discovering.