Issue Type: Bug Bug
Assignee: Unassigned
Created: 26/Apr/13 8:28 AM
Description:

When deploying two switchyard applications on the same contextPath SwitchYard seems to run into a race condition which causes a NullPointerException. Here is the log, note the first module deploying on MSC service thread 1-1 deploys and the second appears to be deploying at the same time. If the applications are deployed sequentially it works fine. However, when restarting the server we see intermittent problems starting because of this race condition.

07:17:32,098 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."my-switchyard-app1.jar".SwitchYardService: org.jboss.msc.service.StartException in service jboss.deployment.unit."my-switchyard-app1.jar".SwitchYardService: org.switchyard.component.resteasy.RESTEasyPublishException: java.lang.NullPointerException
at org.switchyard.as7.extension.services.SwitchYardService.start(SwitchYardService.java:85)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_15]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_15]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_15]
Caused by: org.switchyard.component.resteasy.RESTEasyPublishException: java.lang.NullPointerException
at org.switchyard.component.resteasy.InboundHandler.start(InboundHandler.java:84)
at org.switchyard.deploy.internal.Deployment.deployServiceBindings(Deployment.java:520)
at org.switchyard.deploy.internal.Deployment.start(Deployment.java:141)
at org.switchyard.as7.extension.deployment.SwitchYardDeployment.start(SwitchYardDeployment.java:106)
at org.switchyard.as7.extension.services.SwitchYardService.start(SwitchYardService.java:78)
... 5 more
Caused by: java.lang.NullPointerException
at org.switchyard.as7.extension.resteasy.RESTEasyResourcePublisher.publish(RESTEasyResourcePublisher.java:96)
at org.switchyard.component.resteasy.InboundHandler.start(InboundHandler.java:80)
... 9 more

07:17:32,120 INFO [org.switchyard] (MSC service thread 1-1) Published RESTEasy context /myApplicationContext

Project: SwitchYard
Priority: Major Major
Reporter: Anders Hansen
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira