ich mit einem Problem ähnlich wie die folgenden Beiträge befasse:Frühling XD - konnte nicht Platzhalter 'xd.module.sequence' lösen
Spring -XD Stream deployment failure
issue in spring xd cluster when deploying my module
Wir sahen auch, dass ein JIRA-Ticket geöffnet wurde: https://jira.spring.io/browse/XD-3727
I einen Grundstrom mit einem benutzerdefinierten Transformatormodul erstellt: stream create test-stream --definition "file | enricher | log" --deploy
Lokal, wenn R Wenn ich singlenode einnehme, lädt mein jar hoch und der Stream wird erfolgreich erstellt. Wenn jedoch im verteilten Modus ausgeführt wird, der Strom auf fehlschlägt:
2017-02-20T22:40:11+0000 1.3.0.RELEASE WARN 61699 DeploymentsPathChildrenCache-0 annotation.AnnotationConfigApplicationContext - Exception encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'objectNameProperties' defined in null: Could not resolve placeholder 'xd.module.sequence' in string value "${xd.module.sequence}"; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'xd.module.sequence' in string value "${xd.module.sequence}"
at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:211) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:222) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:86) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:284) ~[spring-context-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:166) ~[spring-context-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:674) ~[spring-context-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:519) ~[spring-context-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686) [spring-boot-1.2.3.RELEASE.jar:1.2.3.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:320) [spring-boot-1.2.3.RELEASE.jar:1.2.3.RELEASE]
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:139) [spring-boot-1.2.3.RELEASE.jar:1.2.3.RELEASE]
at org.springframework.xd.module.core.SimpleModule.initialize(SimpleModule.java:213) [spring-xd-module-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.xd.dirt.module.ModuleDeployer.doDeploy(ModuleDeployer.java:217) [spring-xd-dirt-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.xd.dirt.module.ModuleDeployer.deploy(ModuleDeployer.java:200) [spring-xd-dirt-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.xd.dirt.server.container.DeploymentListener.deployModule(DeploymentListener.java:365) [spring-xd-dirt-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.xd.dirt.server.container.DeploymentListener.deployStreamModule(DeploymentListener.java:334) [spring-xd-dirt-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.xd.dirt.server.container.DeploymentListener.onChildAdded(DeploymentListener.java:181) [spring-xd-dirt-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.xd.dirt.server.container.DeploymentListener.childEvent(DeploymentListener.java:149) [spring-xd-dirt-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.apache.curator.framework.recipes.cache.PathChildrenCache$5.apply(PathChildrenCache.java:509) [curator-recipes-2.6.0.jar:na]
at org.apache.curator.framework.recipes.cache.PathChildrenCache$5.apply(PathChildrenCache.java:503) [curator-recipes-2.6.0.jar:na]
at org.apache.curator.framework.listen.ListenerContainer$1.run(ListenerContainer.java:92) [curator-framework-2.6.0.jar:na]
at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:297) [guava-16.0.1.jar:na]
at org.apache.curator.framework.listen.ListenerContainer.forEach(ListenerContainer.java:83) [curator-framework-2.6.0.jar:na]
at org.apache.curator.framework.recipes.cache.PathChildrenCache.callListeners(PathChildrenCache.java:500) [curator-recipes-2.6.0.jar:na]
at org.apache.curator.framework.recipes.cache.EventOperation.invoke(EventOperation.java:35) [curator-recipes-2.6.0.jar:na]
at org.apache.curator.framework.recipes.cache.PathChildrenCache$10.run(PathChildrenCache.java:762) [curator-recipes-2.6.0.jar:na]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_51]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_51]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_51]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_51]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_51]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_51]
Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'xd.module.sequence' in string value "${xd.module.sequence}"
at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:174) ~[spring-core-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:126) ~[spring-core-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer$PlaceholderResolvingStringValueResolver.resolveStringValue(PropertyPlaceholderConfigurer.java:258) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveStringValue(BeanDefinitionVisitor.java:282) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveValue(BeanDefinitionVisitor.java:204) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.config.BeanDefinitionVisitor.visitMap(BeanDefinitionVisitor.java:262) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveValue(BeanDefinitionVisitor.java:198) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.config.BeanDefinitionVisitor.visitPropertyValues(BeanDefinitionVisitor.java:141) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.config.BeanDefinitionVisitor.visitBeanDefinition(BeanDefinitionVisitor.java:82) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:208) ~[spring-beans-4.2.2.RELEASE.jar:4.2.2.RELEASE]
... 31 common frames omitted
In den Protokollen, ich das sehe:
2017-02-20T16:02:52+0000 1.3.0.RELEASE DEBUG 25853 DeploymentsPathChildrenCache-0 env.PropertySourcesPropertyResolver - Searching for key 'spring.profiles.default' in [zk-properties]
2017-02-20T16:02:52+0000 1.3.0.RELEASE DEBUG 25853 DeploymentsPathChildrenCache-0 env.PropertySourcesPropertyResolver - Searching for key 'spring.profiles.default' in [commandLineArgs]
2017-02-20T16:02:52+0000 1.3.0.RELEASE DEBUG 25853 DeploymentsPathChildrenCache-0 env.PropertySourcesPropertyResolver - Searching for key 'spring.profiles.default' in [systemProperties]
2017-02-20T16:02:52+0000 1.3.0.RELEASE DEBUG 25853 DeploymentsPathChildrenCache-0 env.PropertySourcesPropertyResolver - Searching for key 'spring.profiles.default' in [systemEnvironment]
2017-02-20T16:02:52+0000 1.3.0.RELEASE DEBUG 25853 DeploymentsPathChildrenCache-0 env.PropertySourcesPropertyResolver - Searching for key 'spring.profiles.default' in [random]
2017-02-20T16:02:52+0000 1.3.0.RELEASE DEBUG 25853 DeploymentsPathChildrenCache-0 env.PropertySourcesPropertyResolver - Searching for key 'spring.profiles.default' in [applicationConfig: [classpath:/application.yml]#container]
2017-02-20T16:02:52+0000 1.3.0.RELEASE DEBUG 25853 DeploymentsPathChildrenCache-0 env.PropertySourcesPropertyResolver - Searching for key 'spring.profiles.default' in [applicationConfig: [file:/opt/pivotal/spring-xd-1.3.0.RELEASE/xd/config//servers.yml]]
2017-02-20T16:02:52+0000 1.3.0.RELEASE DEBUG 25853 DeploymentsPathChildrenCache-0 env.PropertySourcesPropertyResolver - Searching for key 'spring.profiles.default' in [applicationConfig: [file:./config/servers.yml]]
2017-02-20T16:02:52+0000 1.3.0.RELEASE DEBUG 25853 DeploymentsPathChildrenCache-0 env.PropertySourcesPropertyResolver - Searching for key 'spring.profiles.default' in [applicationConfig: [classpath:/application.yml]]
2017-02-20T16:02:52+0000 1.3.0.RELEASE DEBUG 25853 DeploymentsPathChildrenCache-0 env.PropertySourcesPropertyResolver - Searching for key 'spring.profiles.default' in [applicationConfig: [classpath:/servers.yml]]
2017-02-20T16:02:52+0000 1.3.0.RELEASE DEBUG 25853 DeploymentsPathChildrenCache-0 env.PropertySourcesPropertyResolver - Could not find key 'spring.profiles.default' in any property source. Returning [null]
Ich versuchte xd.module.sequence
= default
in application.yml Einstellung, die auf meinem Klassenpfad in meinem Modul seit den Protokollen anzeigen: Searching for key 'spring.profiles.default' in [applicationConfig: [classpath:/application.yml]]
. Die gleiche Ausnahme wurde jedoch ausgelöst. Könnte jemand einen Einblick geben, wie man dieses Problem umgehen kann?
Oh, ich sehe Sie referenziert, dass JIRA - das ist einfach seltsam; Mit dem Container stimmt eindeutig etwas nicht. Ich befürchte, dass Sie einen Debugger auf diesem Container ausführen müssen, um herauszufinden, warum das Plugin die Eigenschaft nicht auffüllt. Wir konnten dieses Problem nie reproduzieren. –
Welche Version von XD verwenden Sie? –
Dies ist Version 1.3.0.RELEASE –