Hello everyone,
I am experiencing strange behavior with webconsole of Apache Karaf. I have an 
application deployed using a custom feature file in Apache Karaf. The 
application is based on Spring and is using Primefaces (and Mojarra JSF 
implementation version 2.2.15). When I run it with standard war feature (which 
by default installs pax-web-http-jetty) I am getting the following error 
messages in the log file:
Unable to obtain InjectionProvider from init time FacesContext. Does this 
container implement the Mojarra Injection SPI?
Unable to inject com.sun.faces.application.ApplicationFactoryImpl@5005965f 
because no InjectionProvider can be found. Does this container implement the 
Mojarra Injection SPI?
However, the webconsole works perfectly in this case.
When I install the pax-web-http-tomcat feature the above mentioned error 
messages are gone but the webconsole is not working properly (the resources 
from res and lib are not loaded so I see allmost an empty page - see 
attachment).
I can see the following errors in the log file:

[2022-11-03 09:29:26.358] INFO  tp-nio2-0.0.0.0-8080-exec-10 
o.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/]  Marking 
servlet [default-56ee4de3-f9f8-44c8-96ea-4580393e6469] as unavailable
[2022-11-03 09:29:26.360] ERROR tp-nio2-0.0.0.0-8080-exec-10 
o.a.c.c.C.[.[.[/].[default-56ee4de3-f9f8-44c8-96ea-4580393e6469] Allocate 
exception for servlet [default-56ee4de3-f9f8-44c8-96ea-4580393e6469] 
javax.servlet.UnavailableException: No static resources were found
        at 
org.apache.catalina.servlets.DefaultServlet.init(DefaultServlet.java:384)
        at 
org.ops4j.pax.web.service.tomcat.internal.web.TomcatResourceServlet.init(TomcatResourceServlet.java:87)
        at javax.servlet.GenericServlet.init(GenericServlet.java:180)
        at 
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1164)
        at 
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:804)
        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:128)
        at 
org.ops4j.pax.web.service.tomcat.internal.PaxWebStandardWrapperValve.invoke(PaxWebStandardWrapperValve.java:50)
        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
        at 
org.ops4j.pax.web.service.tomcat.internal.PaxWebStandardContextValve.invoke(PaxWebStandardContextValve.java:98)
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
        at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360)
        at 
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
        at 
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
        at 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:890)
        at 
org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1701)
        at 
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at 
org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:1190)
        at 
org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$2.completed(Nio2Endpoint.java:633)
        at 
org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$2.completed(Nio2Endpoint.java:611)
        at java.base/sun.nio.ch.Invoker.invokeUnchecked(Unknown Source)
        at java.base/sun.nio.ch.Invoker$2.run(Unknown Source)
        at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(Unknown 
Source)
        at 
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
        at 
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
        at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.base/java.lang.Thread.run(Unknown Source)


Does it mean that the webconsole works only with pax-web-http-jetty?

I can also see that both pax-web-http-jetty and pax-web-http-tomcat features 
are installed. Is it possible that the behavior is caused by conflict between 
pax-web-http-jetty and pax-web-http-tomcat? Is there a way how to uninstall 
pax-web-http-jetty using karaf-maven-plugin?
Any help with this issue will be appreciated.

Best regards
Martin Zukal



Reply via email to