[JBoss JIRA] (WFLY-4198) NullPointerException in LogDiagnosticContextRecoveryInterceptor when calling an asynchronous EJB
by Bartosz Baranowski (JIRA)
[ https://issues.jboss.org/browse/WFLY-4198?page=com.atlassian.jira.plugin.... ]
Bartosz Baranowski resolved WFLY-4198.
--------------------------------------
Resolution: Cannot Reproduce Bug
No activity, cant reproduce, closing.
> NullPointerException in LogDiagnosticContextRecoveryInterceptor when calling an asynchronous EJB
> ------------------------------------------------------------------------------------------------
>
> Key: WFLY-4198
> URL: https://issues.jboss.org/browse/WFLY-4198
> Project: WildFly
> Issue Type: Bug
> Components: EJB
> Affects Versions: 8.2.0.Final
> Reporter: Sergiy Barlabanov
> Assignee: Bartosz Baranowski
>
> When trying to call an asynchronous EJB in a Web application using slf4j (1.7.5+) & logback(1.0.13+) for logging the following NullPointerException occurs (see below).
> The problem is in the line 67 of LogDiagnosticContextRecoveryInterceptor class, when it tries to access MDC map, which is null. According to SLF4J API the copy of MDC map may be null: see the javadoc of org.slf4j.MDC#getCopyOfContextMap.
> So LogDiagnosticContextRecoveryInterceptor or org.jboss.logging.Slf4jLoggerProvider have to check the map for null.
> Currently there is no workaround for that :(.
> Caused by: java.lang.NullPointerException
> at org.jboss.as.ejb3.component.interceptors.LogDiagnosticContextRecoveryInterceptor.processInvocation(LogDiagnosticContextRecoveryInterceptor.java:67)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
> at org.jboss.as.ejb3.component.interceptors.AsyncFutureInterceptorFactory$1$2.runInvocation(AsyncFutureInterceptorFactory.java:97)
> at org.jboss.as.ejb3.component.interceptors.AsyncInvocationTask.run(AsyncInvocationTask.java:73)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:744)
> at org.jboss.threads.JBossThread.run(JBossThread.java:122)
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 5 months
[JBoss JIRA] (WFLY-4347) NullPointerException in WebServerService.getListenerMap
by Stuart Douglas (JIRA)
[ https://issues.jboss.org/browse/WFLY-4347?page=com.atlassian.jira.plugin.... ]
Stuart Douglas reassigned WFLY-4347:
------------------------------------
Assignee: Stuart Douglas (was: Tomaz Cerar)
> NullPointerException in WebServerService.getListenerMap
> -------------------------------------------------------
>
> Key: WFLY-4347
> URL: https://issues.jboss.org/browse/WFLY-4347
> Project: WildFly
> Issue Type: Bug
> Components: Web Services
> Affects Versions: 8.1.0.Final
> Environment: Windows, Linux
> Java 8
> Reporter: Mayank Mittal
> Assignee: Stuart Douglas
> Labels: 8.1.0, WebService, nullpointerexception, wildfly
> Attachments: server.log, test.zip
>
>
> While deploying a SLSB annotated with WebService causes NullPointerException in WebServerService.getListenerMap
> {noformat}
> org.jboss.msc.service.StartException in service jboss.deployment.subunit."myTest.ear"."myTest.jar".INSTALL: JBAS018733: Failed to process phase INSTALL of subdeployment "myTest.jar" of deployment "myTest.ear"
> at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.NullPointerException
> at java.util.LinkedList$ListItr.next(Unknown Source)
> at org.wildfly.extension.undertow.WebServerService.getListenerMap(WebServerService.java:73)
> at org.wildfly.extension.undertow.WebServerService.getPort(WebServerService.java:49)
> at org.jboss.as.webservices.config.WebServerInfoImpl.getPort(WebServerInfoImpl.java:36)
> at org.jboss.ws.common.management.AbstractServerConfig.getConnectorPort(AbstractServerConfig.java:207)
> at org.jboss.ws.common.management.AbstractServerConfig.getWebServicePort(AbstractServerConfig.java:170)
> at org.jboss.ws.common.deployment.EndpointAddressDeploymentAspect$PortValue.getPortValue(EndpointAddressDeploymentAspect.java:198)
> at org.jboss.ws.common.deployment.EndpointAddressDeploymentAspect$PortValue.getValue(EndpointAddressDeploymentAspect.java:191)
> at org.jboss.ws.common.deployment.EndpointAddressDeploymentAspect.start(EndpointAddressDeploymentAspect.java:77)
> at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:75)
> at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159)
> {noformat}
> Upon looking into the source code, I found that the the collection used to hold registered listeners in org.wildfly.extension.undertow.Server class is LinkedList.
> What I understand from the code is that this list is getting accessed by two threads at some moment of time and causes the NullPointerException
> plz. refer http://stackoverflow.com/questions/18055024/nullpointer-exception-in-link....
> I think one should use ConcurrentHashSet to avoid such situations.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 5 months
[JBoss JIRA] (WFLY-4350) PicketLink producer method is not registered in a @WebListener managed bean
by Stuart Douglas (JIRA)
[ https://issues.jboss.org/browse/WFLY-4350?page=com.atlassian.jira.plugin.... ]
Stuart Douglas commented on WFLY-4350:
--------------------------------------
This should have been fixed in Wildfly 9 as part of https://issues.jboss.org/browse/WFLY-4185.
> PicketLink producer method is not registered in a @WebListener managed bean
> ---------------------------------------------------------------------------
>
> Key: WFLY-4350
> URL: https://issues.jboss.org/browse/WFLY-4350
> Project: WildFly
> Issue Type: Bug
> Components: CDI / Weld
> Affects Versions: 8.2.0.Final
> Environment: WildFly 8.2.0.Final (Weld 2.2.6.Final)
> PicketLink 2.7.0.CR3
> Reporter: Arcadiy Ivanov
> Assignee: Stuart Douglas
> Attachments: weld-filtered.log, weld-HttpServletRequestListener.log
>
>
> 1. A WAR declares dependencies on PicketLink 2.7.0.CR3 and is Jandex-indexed
> {noformat}
> <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
> <deployment>
> <dependencies>
> <!-- You must configure the PicketLink dependency to your deployment. The dependency above is
> a reference to a static module from WildFly modules directory. -->
> <module name="org.picketlink.core.api" meta-inf="import" annotations="true" />
> <module name="org.picketlink.idm.api" meta-inf="import" annotations="true" />
> <module name="org.picketlink.core" meta-inf="import" annotations="true" />
> <module name="org.picketlink.idm" meta-inf="import" annotations="true" />
> <module name="org.picketlink.common" meta-inf="import" annotations="true" />
> </dependencies>
> </deployment>
> </jboss-deployment-structure>
> {noformat}
> 2. A WAR is deployed but requests for protected resources fail with 500-error:
> {noformat}
> 2015-02-13 17:03:00,707 ERROR [org.picketlink.http] (default task-1) Exception thrown during processing for path [/newWEBEar/test.html]. Sending error with status code [500].: org.jboss.weld.exceptions.UnsatisfiedResolutionException: WELD-001308: Unable to resolve any beans for Type: interface javax.servlet.http.HttpServletRequest; Qualifiers: [@org.picketlink.annotations.PicketLink()]
> at org.jboss.weld.bean.builtin.InstanceImpl.get(InstanceImpl.java:84) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
> at org.picketlink.http.internal.SecurityFilter.doFilter(SecurityFilter.java:159) [picketlink-impl-2.7.0.CR3.jar:]
> at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_31]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_31]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_31]
> {noformat}
> 3. [org.picketlink.http.internal.SecurityFilter.doFilter|https://github.com/p...] fails to inject HttpServletRequest produced in [HttpServletRequestListener|https://github.com/picketlink/picketlink/blob/v2.7.0.CR3/modules/base/impl/src/main/java/org/picketlink/http/internal/HttpServletRequestListener.java#L72] because producer is never registered and therefore is never injected.
> The cause of this is as follows:
> # [ExternalBeanArchiveProcessor line 161|https://github.com/wildfly/wildfly/blob/8.2.0.Final/weld/src/main/jav...] discovers [HttpServletRequestListener|https://github.com/picketlink/picketlink/blob/v2.7.0.CR3/modules/base/impl/src/main/java/org/picketlink/http/internal/HttpServletRequestListener.java].
> # However, [ExternalBeanArchiveProcessor line 164|https://github.com/wildfly/wildfly/blob/8.2.0.Final/weld/src/main/jav...] removes HttpServletRequestListener from the list of the discovered classes, because the class name is in the set of the componentClassNames
> # HttpServletRequestListener is added to componentClassNames on [ExternalBeanArchiveProcessor line 120|https://github.com/wildfly/wildfly/blob/8.2.0.Final/weld/src/main/jav...]
> # [EEModuleDescription moduleDesc = deployment.getAttachment(org.jboss.as.ee.component.Attachments.EE_MODULE_...] retrieves [WebComponentProcessor, that gets attached on line 133|https://github.com/wildfly/wildfly/blob/8.2.0.Final/undertow/src/main...]
> ----
> The expected behavior would, naturally, be HttpServletRequestListener successfully being added as a managed bean with producers being recognized.
> Weld appears to function normally, so does the PicketLink. Only the integration between WildFly and Weld introduces this out-of-CDI-spec behavior.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 5 months
[JBoss JIRA] (WFLY-4350) PicketLink producer method is not registered in a @WebListener managed bean
by Stuart Douglas (JIRA)
[ https://issues.jboss.org/browse/WFLY-4350?page=com.atlassian.jira.plugin.... ]
Stuart Douglas closed WFLY-4350.
--------------------------------
Resolution: Duplicate Issue
Duplicate of WFLY-4185
> PicketLink producer method is not registered in a @WebListener managed bean
> ---------------------------------------------------------------------------
>
> Key: WFLY-4350
> URL: https://issues.jboss.org/browse/WFLY-4350
> Project: WildFly
> Issue Type: Bug
> Components: CDI / Weld
> Affects Versions: 8.2.0.Final
> Environment: WildFly 8.2.0.Final (Weld 2.2.6.Final)
> PicketLink 2.7.0.CR3
> Reporter: Arcadiy Ivanov
> Assignee: Stuart Douglas
> Attachments: weld-filtered.log, weld-HttpServletRequestListener.log
>
>
> 1. A WAR declares dependencies on PicketLink 2.7.0.CR3 and is Jandex-indexed
> {noformat}
> <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
> <deployment>
> <dependencies>
> <!-- You must configure the PicketLink dependency to your deployment. The dependency above is
> a reference to a static module from WildFly modules directory. -->
> <module name="org.picketlink.core.api" meta-inf="import" annotations="true" />
> <module name="org.picketlink.idm.api" meta-inf="import" annotations="true" />
> <module name="org.picketlink.core" meta-inf="import" annotations="true" />
> <module name="org.picketlink.idm" meta-inf="import" annotations="true" />
> <module name="org.picketlink.common" meta-inf="import" annotations="true" />
> </dependencies>
> </deployment>
> </jboss-deployment-structure>
> {noformat}
> 2. A WAR is deployed but requests for protected resources fail with 500-error:
> {noformat}
> 2015-02-13 17:03:00,707 ERROR [org.picketlink.http] (default task-1) Exception thrown during processing for path [/newWEBEar/test.html]. Sending error with status code [500].: org.jboss.weld.exceptions.UnsatisfiedResolutionException: WELD-001308: Unable to resolve any beans for Type: interface javax.servlet.http.HttpServletRequest; Qualifiers: [@org.picketlink.annotations.PicketLink()]
> at org.jboss.weld.bean.builtin.InstanceImpl.get(InstanceImpl.java:84) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
> at org.picketlink.http.internal.SecurityFilter.doFilter(SecurityFilter.java:159) [picketlink-impl-2.7.0.CR3.jar:]
> at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_31]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_31]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_31]
> {noformat}
> 3. [org.picketlink.http.internal.SecurityFilter.doFilter|https://github.com/p...] fails to inject HttpServletRequest produced in [HttpServletRequestListener|https://github.com/picketlink/picketlink/blob/v2.7.0.CR3/modules/base/impl/src/main/java/org/picketlink/http/internal/HttpServletRequestListener.java#L72] because producer is never registered and therefore is never injected.
> The cause of this is as follows:
> # [ExternalBeanArchiveProcessor line 161|https://github.com/wildfly/wildfly/blob/8.2.0.Final/weld/src/main/jav...] discovers [HttpServletRequestListener|https://github.com/picketlink/picketlink/blob/v2.7.0.CR3/modules/base/impl/src/main/java/org/picketlink/http/internal/HttpServletRequestListener.java].
> # However, [ExternalBeanArchiveProcessor line 164|https://github.com/wildfly/wildfly/blob/8.2.0.Final/weld/src/main/jav...] removes HttpServletRequestListener from the list of the discovered classes, because the class name is in the set of the componentClassNames
> # HttpServletRequestListener is added to componentClassNames on [ExternalBeanArchiveProcessor line 120|https://github.com/wildfly/wildfly/blob/8.2.0.Final/weld/src/main/jav...]
> # [EEModuleDescription moduleDesc = deployment.getAttachment(org.jboss.as.ee.component.Attachments.EE_MODULE_...] retrieves [WebComponentProcessor, that gets attached on line 133|https://github.com/wildfly/wildfly/blob/8.2.0.Final/undertow/src/main...]
> ----
> The expected behavior would, naturally, be HttpServletRequestListener successfully being added as a managed bean with producers being recognized.
> Weld appears to function normally, so does the PicketLink. Only the integration between WildFly and Weld introduces this out-of-CDI-spec behavior.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 5 months
[JBoss JIRA] (WFLY-4350) PicketLink producer method is not registered in a @WebListener managed bean
by Arcadiy Ivanov (JIRA)
[ https://issues.jboss.org/browse/WFLY-4350?page=com.atlassian.jira.plugin.... ]
Arcadiy Ivanov updated WFLY-4350:
---------------------------------
Attachment: weld-filtered.log
weld-HttpServletRequestListener.log
Logs showing Weld behavior are attached
> PicketLink producer method is not registered in a @WebListener managed bean
> ---------------------------------------------------------------------------
>
> Key: WFLY-4350
> URL: https://issues.jboss.org/browse/WFLY-4350
> Project: WildFly
> Issue Type: Bug
> Components: CDI / Weld
> Affects Versions: 8.2.0.Final
> Environment: WildFly 8.2.0.Final (Weld 2.2.6.Final)
> PicketLink 2.7.0.CR3
> Reporter: Arcadiy Ivanov
> Assignee: Stuart Douglas
> Attachments: weld-filtered.log, weld-HttpServletRequestListener.log
>
>
> 1. A WAR declares dependencies on PicketLink 2.7.0.CR3 and is Jandex-indexed
> {noformat}
> <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
> <deployment>
> <dependencies>
> <!-- You must configure the PicketLink dependency to your deployment. The dependency above is
> a reference to a static module from WildFly modules directory. -->
> <module name="org.picketlink.core.api" meta-inf="import" annotations="true" />
> <module name="org.picketlink.idm.api" meta-inf="import" annotations="true" />
> <module name="org.picketlink.core" meta-inf="import" annotations="true" />
> <module name="org.picketlink.idm" meta-inf="import" annotations="true" />
> <module name="org.picketlink.common" meta-inf="import" annotations="true" />
> </dependencies>
> </deployment>
> </jboss-deployment-structure>
> {noformat}
> 2. A WAR is deployed but requests for protected resources fail with 500-error:
> {noformat}
> 2015-02-13 17:03:00,707 ERROR [org.picketlink.http] (default task-1) Exception thrown during processing for path [/newWEBEar/test.html]. Sending error with status code [500].: org.jboss.weld.exceptions.UnsatisfiedResolutionException: WELD-001308: Unable to resolve any beans for Type: interface javax.servlet.http.HttpServletRequest; Qualifiers: [@org.picketlink.annotations.PicketLink()]
> at org.jboss.weld.bean.builtin.InstanceImpl.get(InstanceImpl.java:84) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
> at org.picketlink.http.internal.SecurityFilter.doFilter(SecurityFilter.java:159) [picketlink-impl-2.7.0.CR3.jar:]
> at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_31]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_31]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_31]
> {noformat}
> 3. [org.picketlink.http.internal.SecurityFilter.doFilter|https://github.com/p...] fails to inject HttpServletRequest produced in [HttpServletRequestListener|https://github.com/picketlink/picketlink/blob/v2.7.0.CR3/modules/base/impl/src/main/java/org/picketlink/http/internal/HttpServletRequestListener.java#L72] because producer is never registered and therefore is never injected.
> The cause of this is as follows:
> # [ExternalBeanArchiveProcessor line 161|https://github.com/wildfly/wildfly/blob/8.2.0.Final/weld/src/main/jav...] discovers [HttpServletRequestListener|https://github.com/picketlink/picketlink/blob/v2.7.0.CR3/modules/base/impl/src/main/java/org/picketlink/http/internal/HttpServletRequestListener.java].
> # However, [ExternalBeanArchiveProcessor line 164|https://github.com/wildfly/wildfly/blob/8.2.0.Final/weld/src/main/jav...] removes HttpServletRequestListener from the list of the discovered classes, because the class name is in the set of the componentClassNames
> # HttpServletRequestListener is added to componentClassNames on [ExternalBeanArchiveProcessor line 120|https://github.com/wildfly/wildfly/blob/8.2.0.Final/weld/src/main/jav...]
> # [EEModuleDescription moduleDesc = deployment.getAttachment(org.jboss.as.ee.component.Attachments.EE_MODULE_...] retrieves [WebComponentProcessor, that gets attached on line 133|https://github.com/wildfly/wildfly/blob/8.2.0.Final/undertow/src/main...]
> ----
> The expected behavior would, naturally, be HttpServletRequestListener successfully being added as a managed bean with producers being recognized.
> Weld appears to function normally, so does the PicketLink. Only the integration between WildFly and Weld introduces this out-of-CDI-spec behavior.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
11 years, 5 months