[jboss-jira] [JBoss JIRA] (WFLY-4347) NullPointerException in WebServerService.getListenerMap
Mayank Mittal (JIRA)
issues at jboss.org
Fri Feb 13 22:44:49 EST 2015
[ https://issues.jboss.org/browse/WFLY-4347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mayank Mittal updated WFLY-4347:
--------------------------------
Attachment: test.zip
> 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: Tomaz Cerar
> Attachments: 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-linkedlist-while-using-for-each-loop.
> I think one should use ConcurrentHashSet to avoid such situations.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
More information about the jboss-jira
mailing list