Project: talendesb
Issue TESB-2127: Documentation inconsistencies "Talend ESB Development Guide"
The documentation refers to classes introduced in version 4.2, but still contains a lot of references to the previous version 4.0 (Esp. in Maven pom.xml samples showing dependencies for ServiceLocator 4.0 and CXF 2.4.0 - e.g. see page 27). Also the Spring configuration example on page 25 is wrong: Clearly the property to be set to "localhost:2181" would be the locatorEndpoints property (as can be derived from the subsequent code samples for programmatic configuration). But even that is not true according to Zsolt, because those properties cannot be set anymore directly on the feature (programmatically or in Spring), but require passing in properties (via file or as OSGi properties). Failing to do that leads to errors like: Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'LocatorTwoTestServiceProviderEndpoint': Cannot create inner bean 'org.talend.esb.servicelocator.cxf.LocatorFeature#4f2b6c89' of type [org.talend.esb.servicelocator.cxf.LocatorFeature] while setting bean property 'features' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.talend.esb.servicelocator.cxf.LocatorFeature#4f2b6c89' defined in class path resource [locatortwo_i2/standalone.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'endpointPrefix' of bean class [org.talend.esb.servicelocator.cxf.LocatorFeature]: Bean property 'endpointPrefix' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter? org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281) org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:120) org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:353) org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:153) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580) org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139) org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:93) org.talend.esb.tf.runtime.runner.AppRunner.main(AppRunner.java:41) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.talend.esb.servicelocator.cxf.LocatorFeature#4f2b6c89' defined in class path resource [locatortwo_i2/standalone.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'endpointPrefix' of bean class [org.talend.esb.servicelocator.cxf.LocatorFeature]: Bean property 'endpointPrefix' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter? org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1361) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270)	... 17 more Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'endpointPrefix' of bean class [org.talend.esb.servicelocator.cxf.LocatorFeature]: Bean property 'endpointPrefix' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter? org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1024) org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:900) org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:76) org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:58) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1358)	... 21 more
Story points: 1