]
Mayank Mittal commented on WFLY-4347:
-------------------------------------
May I know in what release this fix will be available?
Is there any plan to release any service release of 8.1.x with this and other fixes ?
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.