Project: springxd
Issue XD-2580: Failed to create a stream with Script processor
I attempted to create a stream with a Script processor using Spring XD shell: {code}xd:>stream create --name test1 --definition "tcp --port=17654 | script --location=print-stacktrace.groovy | null" Command failed org.springframework.xd.rest.client.impl.SpringXDException: Error with option(s) for module script of type processor: location: option named 'location' is not supported {code} I've corrected the syntax as described in docs by replacing --location with --script: {code}xd:>stream create --name test1 --definition "tcp --port=17654 | script --script=print-stacktrace.groovy | null" Created new stream 'test1'{code} My stream was created but the deployment failed with exception: {code} 20:04:45,105 1.0.3.RELEASE INFO Deployer server.StreamDeploymentListener - Deployment status for stream 'test1': DeploymentStatus{state=failed,error(s)=org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'org.springframework.integration.config.ServiceActivatorFactoryBean#0' defined in null: Could not resolve placeholder 'location' in string value "${location}"; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'location' in string value "${location}" org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:211) org.springframework.context.support.PropertySourcesPlaceholderConfigurer.processProperties(PropertySourcesPlaceholderConfigurer.java:180) org.springframework.context.support.PropertySourcesPlaceholderConfigurer.postProcessBeanFactory(PropertySourcesPlaceholderConfigurer.java:155) org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:265) org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:162) org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:609) org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464) org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691) org.springframework.boot.SpringApplication.run(SpringApplication.java:320) org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:142) org.springframework.xd.module.core.SimpleModule.initialize(SimpleModule.java:201) org.springframework.xd.dirt.module.ModuleDeployer.doDeploy(ModuleDeployer.java:217) org.springframework.xd.dirt.module.ModuleDeployer.deploy(ModuleDeployer.java:200) org.springframework.xd.dirt.server.DeploymentListener.deployModule(DeploymentListener.java:363) org.springframework.xd.dirt.server.DeploymentListener.deployStreamModule(DeploymentListener.java:332) org.springframework.xd.dirt.server.DeploymentListener.onChildAdded(DeploymentListener.java:179) org.springframework.xd.dirt.server.DeploymentListener.childEvent(DeploymentListener.java:147) org.apache.curator.framework.recipes.cache.PathChildrenCache$5.apply(PathChildrenCache.java:509) org.apache.curator.framework.recipes.cache.PathChildrenCache$5.apply(PathChildrenCache.java:503) org.apache.curator.framework.listen.ListenerContainer$1.run(ListenerContainer.java:92) com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:297) org.apache.curator.framework.listen.ListenerContainer.forEach(ListenerContainer.java:83) org.apache.curator.framework.recipes.cache.PathChildrenCache.callListeners(PathChildrenCache.java:500) org.apache.curator.framework.recipes.cache.EventOperation.invoke(EventOperation.java:35) org.apache.curator.framework.recipes.cache.PathChildrenCache$10.run(PathChildrenCache.java:762) java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) java.util.concurrent.FutureTask.run(FutureTask.java:262) java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) java.util.concurrent.FutureTask.run(FutureTask.java:262) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'location' in string value "${location}" org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:174) org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:126) org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:194) org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders(AbstractPropertyResolver.java:158) org.springframework.context.support.PropertySourcesPlaceholderConfigurer$2.resolveStringValue(PropertySourcesPlaceholderConfigurer.java:175) org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveStringValue(BeanDefinitionVisitor.java:282) org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveValue(BeanDefinitionVisitor.java:209) org.springframework.beans.factory.config.BeanDefinitionVisitor.visitIndexedArgumentValues(BeanDefinitionVisitor.java:150) org.springframework.beans.factory.config.BeanDefinitionVisitor.visitBeanDefinition(BeanDefinitionVisitor.java:84) org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveValue(BeanDefinitionVisitor.java:169) org.springframework.beans.factory.config.BeanDefinitionVisitor.visitIndexedArgumentValues(BeanDefinitionVisitor.java:150) org.springframework.beans.factory.config.BeanDefinitionVisitor.visitBeanDefinition(BeanDefinitionVisitor.java:84) org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveValue(BeanDefinitionVisitor.java:169) org.springframework.beans.factory.config.BeanDefinitionVisitor.visitPropertyValues(BeanDefinitionVisitor.java:141) org.springframework.beans.factory.config.BeanDefinitionVisitor.visitBeanDefinition(BeanDefinitionVisitor.java:82) org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:208)	... 31 more {code} # [script.xml in 1.0.3 tag|https://github.com/spring-projects/spring-xd/blob/v1.0.3/modules/processor/script/config/script.xml] uses {code}
Story points: 1