{"action":"created","issue":{"url":"https://api.github.com/repos/spring-cloud-stream-app-starters/app-starters-release/issues/45","repository_url":"https://api.github.com/repos/spring-cloud-stream-app-starters/app-starters-release","labels_url":"https://api.github.com/repos/spring-cloud-stream-app-starters/app-starters-release/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/spring-cloud-stream-app-starters/app-starters-release/issues/45/comments","events_url":"https://api.github.com/repos/spring-cloud-stream-app-starters/app-starters-release/issues/45/events","html_url":"https://github.com/spring-cloud-stream-app-starters/app-starters-release/issues/45","id":195711682,"number":45,"title":"Error deploying a ROUTER sink when using scripts","user":{"login":"sabbyanandan","id":1562654,"avatar_url":"https://avatars.githubusercontent.com/u/1562654?v=3","gravatar_id":"","url":"https://api.github.com/users/sabbyanandan","html_url":"https://github.com/sabbyanandan","followers_url":"https://api.github.com/users/sabbyanandan/followers","following_url":"https://api.github.com/users/sabbyanandan/following{/other_user}","gists_url":"https://api.github.com/users/sabbyanandan/gists{/gist_id}","starred_url":"https://api.github.com/users/sabbyanandan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sabbyanandan/subscriptions","organizations_url":"https://api.github.com/users/sabbyanandan/orgs","repos_url":"https://api.github.com/users/sabbyanandan/repos","events_url":"https://api.github.com/users/sabbyanandan/events{/privacy}","received_events_url":"https://api.github.com/users/sabbyanandan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-15T03:59:15Z","updated_at":"2016-12-15T03:59:16Z","closed_at":null,"body":"_From @felipeg48 on October 28, 2016 19:43_\n\nDeploying the following stream:\n\n```\ndataflow:> stream create simple --definition \"http --port=8181 | splitter --expression=\\\"#jsonPath(payload, '$.store.item')\\\" | router --router.script=file:///tmp/stream/simple.groovy\"\n```\n\nCauses the following Error:\n\n```\nException in thread \"main\" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException\n    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:62)\n    at java.lang.Thread.run(Thread.java:745)\nCaused by: java.lang.reflect.InvocationTargetException\n    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n    at java.lang.reflect.Method.invoke(Method.java:497)\n    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:54)\n    ... 1 more\nCaused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cloud.stream.app.router.sink.RouterSinkConfiguration': Initialization of bean failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'router' defined in class org.springframework.cloud.stream.app.router.sink.RouterSinkConfiguration: Unsatisfied dependency expressed through constructor argument with index 1 of type [org.springframework.integration.scripting.ScriptVariableGenerator]: No qualifying bean of type [org.springframework.integration.scripting.ScriptVariableGenerator] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.integration.scripting.ScriptVariableGenerator] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}\n    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)\n    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)\n    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)\n    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)\n    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)\n    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)\n    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)\n    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)\n    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)\n    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)\n    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766)\n    at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361)\n    at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)\n    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1191)\n    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1180)\n    at org.springframework.cloud.stream.app.router.sink.rabbit.RouterSinkRabbitApplication.main(RouterSinkRabbitApplication.java:29)\n    ... 6 more\nCaused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'router' defined in class org.springframework.cloud.stream.app.router.sink.RouterSinkConfiguration: Unsatisfied dependency expressed through constructor argument with index 1 of type [org.springframework.integration.scripting.ScriptVariableGenerator]: No qualifying bean of type [org.springframework.integration.scripting.ScriptVariableGenerator] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.integration.scripting.ScriptVariableGenerator] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}\n    at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749)\n    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:464)\n    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123)\n    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018)\n    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)\n    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)\n    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)\n    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)\n    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)\n    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)\n    at org.springframework.integration.config.annotation.AbstractMethodAnnotationPostProcessor.resolveTargetBeanFromMethodWithBeanAnnotation(AbstractMethodAnnotationPostProcessor.java:389)\n    at org.springframework.integration.config.annotation.AbstractMethodAnnotationPostProcessor.postProcess(AbstractMethodAnnotationPostProcessor.java:126)\n    at org.springframework.integration.config.annotation.MessagingAnnotationPostProcessor$1.doWith(MessagingAnnotationPostProcessor.java:168)\n    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:530)\n    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:537)\n    at org.springframework.integration.config.annotation.MessagingAnnotationPostProcessor.postProcessAfterInitialization(MessagingAnnotationPostProcessor.java:136)\n    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:422)\n    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1583)\n    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)\n    ... 21 more\nCaused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.integration.scripting.ScriptVariableGenerator] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}\n    at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1373)\n    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1119)\n    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014)\n    at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:813)\n    at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741)\n    ... 39 more\n```\n\nThis is related to bug: https://github.com/spring-cloud/spring-cloud-stream-app-starters/issues/165\n\n\n_Copied from original issue: spring-cloud/spring-cloud-stream-app-starters#266_"},"comment":{"url":"https://api.github.com/repos/spring-cloud-stream-app-starters/app-starters-release/issues/comments/267232764","html_url":"https://github.com/spring-cloud-stream-app-starters/app-starters-release/issues/45#issuecomment-267232764","issue_url":"https://api.github.com/repos/spring-cloud-stream-app-starters/app-starters-release/issues/45","id":267232764,"user":{"login":"sabbyanandan","id":1562654,"avatar_url":"https://avatars.githubusercontent.com/u/1562654?v=3","gravatar_id":"","url":"https://api.github.com/users/sabbyanandan","html_url":"https://github.com/sabbyanandan","followers_url":"https://api.github.com/users/sabbyanandan/followers","following_url":"https://api.github.com/users/sabbyanandan/following{/other_user}","gists_url":"https://api.github.com/users/sabbyanandan/gists{/gist_id}","starred_url":"https://api.github.com/users/sabbyanandan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sabbyanandan/subscriptions","organizations_url":"https://api.github.com/users/sabbyanandan/orgs","repos_url":"https://api.github.com/users/sabbyanandan/repos","events_url":"https://api.github.com/users/sabbyanandan/events{/privacy}","received_events_url":"https://api.github.com/users/sabbyanandan/received_events","type":"User","site_admin":false},"created_at":"2016-12-15T03:59:16Z","updated_at":"2016-12-15T03:59:16Z","body":"_From @artembilan on December 2, 2016 15:2_\n\nThe workaround is like to build your own `router-sink` application based on this `router-sink-starter`.\r\nThe only class you will have is `main` with `@SpringBootApplication` and `@Import(ScriptVariableGeneratorConfiguration.class)` and `@Import(RouterSinkConfiguration)`.\r\n\r\nMore info is here: http://docs.spring.io/spring-cloud-stream-app-starters/docs/1.1.0.BUILD-SNAPSHOT/reference/htmlsingle/#_creating_custom_artifacts"}}
{"actor":{"display_login":"sabbyanandan"}}