RESTEasyPublishException
anikulin Dec 9, 2012 4:52 PMHello
In my project I have a switchyard bean with a reference to another bean, and when I'm trying to add RESTEasy binding to this reference at deployment I have such exception:
23:44:52,614 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."metaKonnector.jar".SwitchYardService: org.jboss.msc.service.StartException in service jboss.deployment.unit."metaKonnector.jar".SwitchYardService: org.switchyard.component.resteasy.RESTEasyPublishException: java.lang.NullPointerException at org.switchyard.as7.extension.services.SwitchYardService.start(SwitchYardService.java:79) 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$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_30] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_30] at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_30] 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:513) 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:72) ... 5 more Caused by: java.lang.NullPointerException at org.switchyard.as7.extension.resteasy.RESTEasyResourcePublisher.publish(RESTEasyResourcePublisher.java:97) at org.switchyard.component.resteasy.InboundHandler.start(InboundHandler.java:80) ... 9 more
My switchyard.xml is:
<?xml version="1.0" encoding="UTF-8"?> <switchyard xmlns="urn:switchyard-config:switchyard:1.0" xmlns:bean="urn:switchyard-component-bean:config:1.0" xmlns:resteasy="urn:switchyard-component-resteasy:config:1.0" xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912" xmlns:soap="urn:switchyard-component-soap:config:1.0" xmlns:transform="urn:switchyard-config:transform:1.0" name="metaConnector" targetNamespace="urn:com.magick:metaConnector:0.0.1-SNAPSHOT"> <sca:composite name="metaConnector" targetNamespace="urn:com.magick:metaConnector:0.0.1-SNAPSHOT"> <sca:service name="StrategyServicePortType" promote="StrategyService/StrategyService"> <sca:interface.wsdl interface="StrategyService.wsdl#wsdl.porttype(StrategyServicePortType)"/> <soap:binding.soap> <soap:contextMapper/> <soap:wsdl>StrategyService.wsdl</soap:wsdl> <soap:socketAddr>:8080</soap:socketAddr> <soap:contextPath>metaConnector</soap:contextPath> </soap:binding.soap> </sca:service> <sca:service name="IndicatorServiceREST" promote="IndicatorService/IndicatorService"> <sca:interface.java interface="com.magick.metaConnector.service.IndicatorService"/> <resteasy:binding.rest> <resteasy:contextMapper/> <resteasy:interfaces>com.magick.metaConnector.service.IndicatorServiceResourse</resteasy:interfaces> <resteasy:contextPath>metaConnector</resteasy:contextPath> </resteasy:binding.rest> </sca:service> </sca:composite> </switchyard>
SwitchYard scheme in Eclipse looks like this:
And after adding RESTBinding component I also have such error in Eclipse:
cvc-complex-type.2.4.a: Invalid content was found starting with element 'resteasy:binding.rest'. One of '{"http://docs.oasis-open.org/ns/opencsa/sca/200912":binding, "http://docs.oasis-open.org/ns/opencsa/sca/200912":callback, "http://docs.oasis-open.org/ns/opencsa/sca/200912":requires, "http://docs.oasis-open.org/ns/opencsa/sca/200912":policySetAttachment, "http://docs.oasis-open.org/ns/opencsa/sca/200912":extensions}' is expected.
Can you help me please to solve these issues?
Thanks