cCXF and Service Locator not working with Open Studio for ESB containe

One Star

cCXF and Service Locator not working with Open Studio for ESB containe

Hi,
I've created the most simple web service using cCXF and it works fine in Studio and in the container with a Service Address set.
But I would like to use the service locator....
So I've set the Service Address to "locator://anyAddress/" and I've selected "Use Service Locator".
I understand that the locator doesn't work in the studio, so I'm trying in the container.
I've started the talend ESB container, run the command "tesb:start-all" but...the service is not deployed.
Zookeeper is indeed running.
Below the log files.
Thank you for any advice,
Mats
The tesb log is the following:
12:06:33,781 | INFO  | container/deploy | eployer.kar.KarArtifactInstaller  447 | 31 - org.apache.karaf.deployer.kar - 2.3.3 | Found a .kar file to deploy.
12:06:33,782 | INFO  | container/deploy | eployer.kar.KarArtifactInstaller   92 | 31 - org.apache.karaf.deployer.kar - 2.3.3 | Installing KAR file C:\java\Talend\Studio ESB 5.5.1\Runtime_ESBSE\container\deploy\SimpleRecipientList_0.3.kar
12:06:33,807 | INFO  | container/deploy | eployer.kar.KarArtifactInstaller  419 | 31 - org.apache.karaf.deployer.kar - 2.3.3 | Added feature repository 'file:/C:/java/Talend/Studio%20ESB%205.5.1/Runtime_ESBSE/container/system/mats/SimpleRecipientList/SimpleRecipientList-feature/0.1/SimpleRecipientList-0.1-feature.xml'.
12:06:33,856 | INFO  | container/deploy | r.internal.JobTracker$Customizer  106 | 191 - org.talend.esb.job.controller - 5.5.1 | Service with reference {routines.system.api.TalendESBRoute, routines.system.api.TalendJob}={osgi.service.blueprint.compname=route, name=SimpleRecipientList, type=route, service.id=413} added
12:06:33,865 | INFO  | container/deploy | troller.internal.JobLauncherImpl  119 | 191 - org.talend.esb.job.controller - 5.5.1 | Adding route SimpleRecipientList.
12:06:33,866 | INFO  | pool-13-thread-1 | controller.internal.RouteAdapter   66 | 191 - org.talend.esb.job.controller - 5.5.1 | Starting route SimpleRecipientList
12:06:33,870 | INFO  | container/deploy | ultOsgiApplicationContextCreator   67 | 94 - org.springframework.osgi.extender - 1.2.1 | Discovered configurations {osgibundle:/META-INF/spring/*.xml} in bundle
12:06:33,871 | INFO  | xtenderThread-15 | pport.AbstractApplicationContext  510 | 89 - org.springframework.context - 3.2.4.RELEASE | Refreshing OsgiBundleXmlApplicationContext(bundle=mats.SimpleRecipientList, config=osgibundle:/META-INF/spring/*.xml): startup date ; root of context hierarchy
12:06:33,872 | INFO  | xtenderThread-15 | ractOsgiBundleApplicationContext  365 | 89 - org.springframework.context - 3.2.4.RELEASE | Application Context service already unpublished
12:06:33,873 | INFO  | pool-13-thread-1 | rg.apache.camel.main.MainSupport  327 | 170 - org.apache.camel.camel-core - 2.12.3 | Apache Camel  starting
12:06:33,873 | INFO  | pool-13-thread-1 | pport.AbstractApplicationContext  510 | 89 - org.springframework.context - 3.2.4.RELEASE | Refreshing OsgiBundleXmlApplicationContext(bundle=mats.SimpleRecipientList, config=META-INF/spring/simplerecipientlist.xml): startup date ; root of context hierarchy
12:06:33,874 | INFO  | pool-13-thread-1 | ractOsgiBundleApplicationContext  365 | 89 - org.springframework.context - 3.2.4.RELEASE | Application Context service already unpublished
12:06:33,876 | INFO  | xtenderThread-15 | tory.xml.XmlBeanDefinitionReader  315 | 87 - org.springframework.beans - 3.2.4.RELEASE | Loading XML bean definitions from URL
12:06:33,876 | INFO  | pool-13-thread-1 | tory.xml.XmlBeanDefinitionReader  315 | 87 - org.springframework.beans - 3.2.4.RELEASE | Loading XML bean definitions from URL
12:06:33,887 | INFO  | xtenderThread-15 | WaiterApplicationContextExecutor  243 | 94 - org.springframework.osgi.extender - 1.2.1 | No outstanding OSGi service dependencies, completing initialization for OsgiBundleXmlApplicationContext(bundle=mats.SimpleRecipientList, config=osgibundle:/META-INF/spring/*.xml)
12:06:33,888 | INFO  | pool-13-thread-1 | pport.DefaultListableBeanFactory  598 | 87 - org.springframework.beans - 3.2.4.RELEASE | Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@412e256c: defining beans ; root of factory hierarchy
12:06:33,889 | INFO  | xtenderThread-16 | pport.DefaultListableBeanFactory  598 | 87 - org.springframework.beans - 3.2.4.RELEASE | Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5e5fcfbc: defining beans ; root of factory hierarchy
12:06:33,900 | INFO  | pool-13-thread-1 | ractOsgiBundleApplicationContext  327 | 89 - org.springframework.context - 3.2.4.RELEASE | Publishing application context as OSGi service with properties {org.springframework.context.service.name=mats.SimpleRecipientList, Bundle-SymbolicName=mats.SimpleRecipientList, Bundle-Version=0.1.0}
12:06:33,900 | INFO  | xtenderThread-16 | ractOsgiBundleApplicationContext  327 | 89 - org.springframework.context - 3.2.4.RELEASE | Publishing application context as OSGi service with properties {org.springframework.context.service.name=mats.SimpleRecipientList, Bundle-SymbolicName=mats.SimpleRecipientList, Bundle-Version=0.1.0}
12:06:33,903 | INFO  | xtenderThread-16 | BundleApplicationContextListener   45 | 94 - org.springframework.osgi.extender - 1.2.1 | Application context successfully refreshed (OsgiBundleXmlApplicationContext(bundle=mats.SimpleRecipientList, config=osgibundle:/META-INF/spring/*.xml))
12:06:33,926 | INFO  | pool-13-thread-1 | e.camel.impl.DefaultCamelContext 1533 | 170 - org.apache.camel.camel-core - 2.12.3 | Apache Camel 2.12.3 (CamelContext: SimpleRecipientList-ctx) is starting
12:06:33,926 | INFO  | pool-13-thread-1 | gement.ManagedManagementStrategy  187 | 170 - org.apache.camel.camel-core - 2.12.3 | JMX is enabled
12:06:33,968 | INFO  | pool-13-thread-1 | e.camel.impl.DefaultCamelContext 1720 | 170 - org.apache.camel.camel-core - 2.12.3 | AllowUseOriginalMessage is enabled. If access to the original message is not needed, then its recommended to turn this option off as it may improve performance.
12:06:33,968 | INFO  | pool-13-thread-1 | e.camel.impl.DefaultCamelContext 1730 | 170 - org.apache.camel.camel-core - 2.12.3 | StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at
12:06:33,970 | INFO  | pool-13-thread-1 | pport.AbstractApplicationContext  510 | 89 - org.springframework.context - 3.2.4.RELEASE | Refreshing org.apache.cxf.bus.spring.BusApplicationContext@110a9999: startup date ; parent: OsgiBundleXmlApplicationContext(bundle=mats.SimpleRecipientList, config=META-INF/spring/simplerecipientlist.xml)
12:06:33,975 | INFO  | pool-13-thread-1 | pport.DefaultListableBeanFactory  598 | 87 - org.springframework.beans - 3.2.4.RELEASE | Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@2bce3248: defining beans ; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@412e256c
12:06:33,987 | INFO  | pool-13-thread-1 | t.jmx.InstrumentationManagerImpl  329 | 122 - org.apache.cxf.cxf-rt-management - 2.7.11 | registering MBean org.apache.cxf:bus.id=mats.SimpleRecipientList-cxf2122274697,type=Bus,instance.id=2122274697: org.apache.cxf.bus.ManagedBus@5a4c2440
12:06:33,987 | INFO  | pool-13-thread-1 | t.jmx.InstrumentationManagerImpl  329 | 122 - org.apache.cxf.cxf-rt-management - 2.7.11 | registering MBean org.apache.cxf:bus.id=mats.SimpleRecipientList-cxf2122274697,type=Bus,instance.id=2122274697: javax.management.modelmbean.RequiredModelMBean@3ce01410
12:06:33,988 | INFO  | pool-13-thread-1 | t.jmx.InstrumentationManagerImpl  195 | 122 - org.apache.cxf.cxf-rt-management - 2.7.11 | registered org.apache.cxf:bus.id=mats.SimpleRecipientList-cxf2122274697,type=Bus,instance.id=2122274697
12:06:33,989 | INFO  | pool-13-thread-1 | t.jmx.InstrumentationManagerImpl  329 | 122 - org.apache.cxf.cxf-rt-management - 2.7.11 | registering MBean org.apache.cxf:bus.id=mats.SimpleRecipientList-cxf2122274697,WorkQueueManager=Bus.WorkQueueManager,type=WorkQueueManager,instance.id=457524649: org.apache.cxf.bus.managers.WorkQueueManagerImplMBeanWrapper@60e0683b
12:06:33,989 | INFO  | pool-13-thread-1 | t.jmx.InstrumentationManagerImpl  329 | 122 - org.apache.cxf.cxf-rt-management - 2.7.11 | registering MBean org.apache.cxf:bus.id=mats.SimpleRecipientList-cxf2122274697,WorkQueueManager=Bus.WorkQueueManager,type=WorkQueueManager,instance.id=457524649: javax.management.modelmbean.RequiredModelMBean@2cdb2b2d
12:06:33,991 | INFO  | pool-13-thread-1 | ory.ReflectionServiceFactoryBean  457 | 121 - org.apache.cxf.cxf-rt-core - 2.7.11 | Creating Service {}BeanAsService from class beans.BeanAsService
12:06:34,007 | INFO  | pool-13-thread-1 | e.camel.impl.DefaultCamelContext 1747 | 170 - org.apache.camel.camel-core - 2.12.3 | Apache Camel 2.12.3 (CamelContext: SimpleRecipientList-ctx) is shutting down
12:06:34,008 | INFO  | pool-13-thread-1 | .camel.component.cxf.CxfEndpoint  888 | 175 - org.apache.camel.camel-cxf - 2.12.3 | shutdown the bus ... org.apache.cxf.bus.spring.SpringBus@7e7f5789
12:06:34,009 | INFO  | pool-13-thread-1 | pport.AbstractApplicationContext 1042 | 89 - org.springframework.context - 3.2.4.RELEASE | Closing org.apache.cxf.bus.spring.BusApplicationContext@110a9999: startup date ; parent: OsgiBundleXmlApplicationContext(bundle=mats.SimpleRecipientList, config=META-INF/spring/simplerecipientlist.xml)
12:06:34,009 | INFO  | pool-13-thread-1 | ort.DefaultSingletonBeanRegistry  444 | 87 - org.springframework.beans - 3.2.4.RELEASE | Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@2bce3248: defining beans ; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@412e256c
12:06:34,013 | INFO  | pool-13-thread-1 | e.camel.impl.DefaultCamelContext 1821 | 170 - org.apache.camel.camel-core - 2.12.3 | Apache Camel 2.12.3 (CamelContext: SimpleRecipientList-ctx) uptime 0.087 seconds
12:06:34,014 | INFO  | pool-13-thread-1 | e.camel.impl.DefaultCamelContext 1822 | 170 - org.apache.camel.camel-core - 2.12.3 | Apache Camel 2.12.3 (CamelContext: SimpleRecipientList-ctx) is shutdown in 0.006 seconds
12:06:34,014 | INFO  | pool-13-thread-1 | rg.apache.camel.main.MainSupport  321 | 170 - org.apache.camel.camel-core - 2.12.3 | Apache Camel  stopping
12:06:34,027 | INFO  | pool-13-thread-1 | controller.internal.RouteAdapter   79 | 191 - org.talend.esb.job.controller - 5.5.1 | Route SimpleRecipientList finished, return code is 1

The console shows the following error
java.lang.NullPointerException
        at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:142)
        at org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:83)
        at org.apache.cxf.endpoint.ServerImpl.<init>(ServerImpl.java:62)
        at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:160)
        at org.apache.camel.component.cxf.CxfConsumer.<init>(CxfConsumer.java:259)
        at org.apache.camel.component.cxf.CxfEndpoint.createConsumer(CxfEndpoint.java:209)
        at org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:65)
        at org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:80)
        at org.apache.camel.impl.RouteService.warmUp(RouteService.java:134)
        at org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:2150)
        at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:2080)
        at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1868)
        at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1740)
        at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1579)
        at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
        at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1547)
        at mats.simplerecipientlist_0_1.SimpleRecipientList$4.doStart(SimpleRecipientList.java:304)
        at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
        at org.apache.camel.main.MainSupport.run(MainSupport.java:148)
        at mats.simplerecipientlist_0_1.SimpleRecipientList.run(SimpleRecipientList.java:323)
        at mats.simplerecipientlist_0_1.SimpleRecipientList.runJobInTOS(SimpleRecipientList.java:419)
        at org.talend.esb.job.controller.internal.RouteAdapter.run(RouteAdapter.java:78)
        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)
Employee

Re: cCXF and Service Locator not working with Open Studio for ESB containe

Hi,
I guess the problem is because you try to use "locator://..." as address for an cCXF component which as a Service provider. The cCXF component can be used as provider or consumer in the Route.
The Service Locator feature works in this way:
1) if SL enabled on provider side, then register the real endpoint (address) to the Zookeeper.
2) if SL enabled on consumer side, then the address should be set to "locator://..." and consumer will find the service endpoint from Zookeeper.
HTH