Open issues

ErrorPageServlet registered twice
PAXWEB-1235
filter.init service property in pax-web-extender-whiteboard 7.2.4 does not populate FilterConfig object correctly
PAXWEB-1212
Websocket registration does not work with Undertow container
PAXWEB-1210
Wrong packaging of org.ops4j.pax.web.pax-web-jsp
PAXWEB-1208
support JDK12|13 EA
PAXWEB-1201
org.ops4j.pax.web.service.spi.ServerController could use transactional approach to register web elements
PAXWEB-1198
Review pax-web-jsp
PAXWEB-1195
Review build process of artifacts and OSGi consistency (not exporting private packages)
PAXWEB-1193
Reorganize samples
PAXWEB-1192
Make POM configuration and layout more consistent
PAXWEB-1191
Improve pax-web before 8.0.0 release
PAXWEB-1190
Upgrade to Tomcat 9.0.x
PAXWEB-1187
Upgrade to Undertow 2.0.x
PAXWEB-1185
Upgrade to OSGi R7
PAXWEB-1181
Unable to configure multiple SSL connectors
PAXWEB-1170
RuntimeException: null at org.objectweb.asm.MethodVisitor.visitParameter() from ServletContainerInitializerScanner
PAXWEB-1152
Http/2 cleartext support
PAXWEB-1130
Http Whiteboard: Resolution of ServletContextHelper
PAXWEB-1124
HTTP Whiteboard and selection of the ServletContextHelper
PAXWEB-1123
Allow to configure if createDefaultHttpContext returns shared or non-shared context
PAXWEB-1105
Incorrect log of TLS ciphersuites and protocols
PAXWEB-1067
Enhance ConfigurationImpl to use OSGi encryption service
PAXWEB-1049
The documented samples are outdated
PAXWEB-1040
WebSocket not working with Whiteboard-registration
PAXWEB-1027
It seems awfully hard to set the connector idle timeout
PAXWEB-980
template jetty.xml is incomplete
PAXWEB-979
[Bridge] Bridged Servlets returns wrong MimeTypes
PAXWEB-978
[Bridge] Support of Whiteboard extender registration of Servlets
PAXWEB-975
[Bridge] Support of error pages
PAXWEB-973
[Bridge] Support for initialization of Filters
PAXWEB-972
[BRIDGE] Support JSPs with Filters
PAXWEB-970
[BRIDGE] Support complex JSP setup
PAXWEB-969
WebApplication gets removed when mapped servlet is unregistered
PAXWEB-968
Creation of Dynamic Connectors doesn't work as expected
PAXWEB-934
Run tests parallel to reduce execution time
PAXWEB-915
Mark un-needed methods in WebContainer as deprecated
PAXWEB-908
Make it easier to control the HttpContext of servlets registered on the whiteboard
PAXWEB-819
Cannot disable Jetty Stack traces
PAXWEB-352
Custom tag libraries not supported together with libraries external bundles
PAXWEB-1122
NPe when accessing a Servlet while the responsible bundle starts
PAXWEB-1121
Cannot use custom JSP tags and/or custom HttpContexts (with context roots) simultaneously
PAXWEB-1106
ServletContext becomes unavailable on restart when using Whiteboard and CustomContexts
PAXWEB-1077
HttpServiceRuntime - calculate InfoDTO from contextroot
PAXWEB-1039
bnd-maven-plugin in favor of maven-bundle-plugin
PAXWEB-910
.WhiteboardR7JaxRsIntegrationTest fails due to updated snapshot
PAXWEB-1115
R7 - Make use of new Capability-Annotations
PAXWEB-1044
Code-Cleanup: Inspection Issues
PAXWEB-1003
issue 1 of 47

ErrorPageServlet registered twice

Description

Hello,

We are using pax-web-extender-whiteboard 7.2.4 on equinox and I have a few error page servlet annotated as followed:
@Component(
service = Servlet.class,
property = {
HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_NAME + "=Error403Servlet",
"alias=/error403",
"osgi.http.whiteboard.servlet.errorPage=403",
"osgi.http.whiteboard.context.select=(osgi.http.whiteboard.context.name=WebviewerServletContextHelper)"
},
scope = ServiceScope.PROTOTYPE
)
public final class Error403Servlet extends HttpServlet {...}

However, sometimes when we start the server, we got this error:
java.lang.IllegalArgumentException: Error page for [403] already registered.
at org.ops4j.pax.web.service.spi.model.ServiceModel.addErrorPageModel(ServiceModel.java:315)
at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerErrorPage(HttpServiceStarted.java:961)
at org.ops4j.pax.web.service.internal.HttpServiceProxy.registerErrorPage(HttpServiceProxy.java:343)
at org.ops4j.pax.web.extender.whiteboard.internal.element.ServletWebElement.register(ServletWebElement.java:107)
at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.registerWebElement(WebApplication.java:392)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.forEach(Unknown Source)
at org.ops4j.pax.web.extender.whiteboard.internal.WebApplication.addWebElement(WebApplication.java:170)
at org.ops4j.pax.web.extender.whiteboard.internal.tracker.AbstractTracker.addingService(AbstractTracker.java:193)
at org.ops4j.pax.web.extender.whiteboard.internal.tracker.AbstractTracker.addingService(AbstractTracker.java:46)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:920)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469)
at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:887)
at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:874)
at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:132)
at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:941)
at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:741)
at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:675)
at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:430)
at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:657)
at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:341)
at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:390)
at org.apache.felix.scr.impl.Activator.access$200(Activator.java:54)
at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:265)
at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:254)
at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:227)
at org.apache.felix.utils.extender.AbstractExtender.addingBundle(AbstractExtender.java:187)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:213)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:120)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:112)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:168)
at org.eclipse.osgi.container.Module.publishEvent(Module.java:476)
at org.eclipse.osgi.container.Module.doStart(Module.java:578)
at org.eclipse.osgi.container.Module.start(Module.java:449)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1628)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1608)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1579)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1522)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

Since the error page is working fine despite this exception, is it a race condition in the service registry that cause this exception? Should this be reported as bug on pax-web or felix scr? We tried to upgrade to pax-web 7.2.10 but still got the same error from time to time

Thai Le

Environment

None

Status

Assignee

Grzegorz Grzybek

Reporter

Nhut Thai Le

Labels

None

Components

Affects versions

7.2.4
7.2.10

Priority

Major