5

मैं कई सेवाओं से सभी स्ट्रीम को हाइस्ट्रिक्स डैशबोर्ड में समेकित करने के लिए टर्बाइन एएमक्यूपी को लागू करने की कोशिश कर रहा हूं।वसंत क्लाउड स्ट्रीम 'बाध्यकारी सेवा' त्रुटि

इसलिए मैंने ग्रेडल फ़ाइल में दो निर्भरताओं को जोड़ा और उसके बाद मैं किसी कारण से अपना आवेदन शुरू करने में सक्षम नहीं हूं।

स्टार्टअप से LOGS जहां मुझे अपवाद दिखाई देता है।

[LogMessage=Application startup failed] 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'bindingService' defined in class path resource [org/springframework/cloud/stream/config/ChannelBindingServiceConfiguration.class]: Unsatisfied dependency expressed through constructor argument with index 1 of type [org.springframework.cloud.stream.binder.BinderFactory]: Error creating bean with name 'binderFactory' defined in class path resource [org/springframework/cloud/stream/config/BinderFactoryConfiguration.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.springframework.cloud.stream.binder.BinderTypeRegistry]: Error creating bean with name 'binderTypeRegistry' defined in class path resource [org/springframework/cloud/stream/config/BinderFactoryConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.stream.binder.BinderTypeRegistry]: Factory method 'binderTypeRegistry' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Cannot create binder factory, no `META-INF/spring.binders` resources found on the classpath; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'binderTypeRegistry' defined in class path resource [org/springframework/cloud/stream/config/BinderFactoryConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.stream.binder.BinderTypeRegistry]: Factory method 'binderTypeRegistry' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Cannot create binder factory, no `META-INF/spring.binders` resources found on the classpath; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'binderFactory' defined in class path resource [org/springframework/cloud/stream/config/BinderFactoryConfiguration.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.springframework.cloud.stream.binder.BinderTypeRegistry]: Error creating bean with name 'binderTypeRegistry' defined in class path resource [org/springframework/cloud/stream/config/BinderFactoryConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.stream.binder.BinderTypeRegistry]: Factory method 'binderTypeRegistry' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Cannot create binder factory, no `META-INF/spring.binders` resources found on the classpath; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'binderTypeRegistry' defined in class path resource [org/springframework/cloud/stream/config/BinderFactoryConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.stream.binder.BinderTypeRegistry]: Factory method 'binderTypeRegistry' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Cannot create binder factory, no `META-INF/spring.binders` resources found on the classpath 
    at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:464) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE] 
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766) [spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE] 
    at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361) [spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE] 
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) [spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE] 
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1191) [spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE] 
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1180) [spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE] 
    at com.bbtransact.icp.api.associations.boot.UserApplication.main(UserApplication.java:20) [bin/:na] 

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'binderTypeRegistry' defined in class path resource [org/springframework/cloud/stream/config/BinderFactoryConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.stream.binder.BinderTypeRegistry]: Factory method 'binderTypeRegistry' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Cannot create binder factory, no `META-INF/spring.binders` resources found on the classpath 
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1192) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:813) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    ... 33 common frames omitted 
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.stream.binder.BinderTypeRegistry]: Factory method 'binderTypeRegistry' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Cannot create binder factory, no `META-INF/spring.binders` resources found on the classpath 
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    ... 46 common frames omitted 
Caused by: org.springframework.beans.factory.BeanCreationException: Cannot create binder factory, no `META-INF/spring.binders` resources found on the classpath 
    at org.springframework.cloud.stream.config.BinderFactoryConfiguration.binderTypeRegistry(BinderFactoryConfiguration.java:100) ~[spring-cloud-stream-1.0.0.RC1.jar:1.0.0.RC1] 
    at org.springframework.cloud.stream.config.BinderFactoryConfiguration$$EnhancerBySpringCGLIB$$b9b6d96.CGLIB$binderTypeRegistry$1(<generated>) ~[spring-cloud-stream-1.0.0.RC1.jar:1.0.0.RC1] 
    at org.springframework.cloud.stream.config.BinderFactoryConfiguration$$EnhancerBySpringCGLIB$$b9b6d96$$FastClassBySpringCGLIB$$d1bb81f1.invoke(<generated>) ~[spring-cloud-stream-1.0.0.RC1.jar:1.0.0.RC1] 
    at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-4.2.4.RELEASE.jar:4.2.4.RELEASE] 
    at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:355) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE] 
    at org.springframework.cloud.stream.config.BinderFactoryConfiguration$$EnhancerBySpringCGLIB$$b9b6d96.binderTypeRegistry(<generated>) ~[spring-cloud-stream-1.0.0.RC1.jar:1.0.0.RC1] 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_66] 
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_66] 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_66] 
    at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_66] 
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE] 

यहाँ मेरी .Gradle मैं hystrix, hystrix-ampqp, स्टार्टर-बस-AMQP के लिए निर्भरता जोड़ा है।

buildscript { 

    ext { 
     springBootVersion = '1.3.0.RELEASE' 
    } 

    repositories { 
     maven { 
      url "https://plugins.gradle.org/m2/" 
     } 
     mavenLocal() 
     mavenCentral() 
} 

    dependencies { 
     classpath ("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") 
     classpath ("io.spring.gradle:dependency-management-plugin:0.5.2.RELEASE") 
     classpath ("mysql:mysql-connector-java:5.1.34") 
     classpath ("org.sonarqube.gradle:gradle-sonarqube-plugin:1.1") 
    } 
} 

repositories { 
     maven { 
      url "https://plugins.gradle.org/m2/" 
      url "https://repo.spring.io/snapshot" 
      url "https://repo.spring.io/milestone" 
     } 
     mavenLocal() 
     mavenCentral() 
} 


apply plugin: 'java' 
apply plugin: 'eclipse-wtp' 
apply plugin: 'idea' 
apply plugin: 'spring-boot' 
apply plugin: 'io.spring.dependency-management' 
apply plugin: 'org.sonarqube' 
apply plugin: "jacoco" 
apply plugin: "sonar-runner" 


group = 'com.api' 

def build_version=project.properties['build_version'] ?: "SNAPSHOT" 
version = "${build_version}" 

ext.packaging = 'jar' 

jar { 
    baseName = "userassociations-v1" 
} 


sourceCompatibility = 1.8 
targetCompatibility = 1.8 

sourceSets { 
    generated { 
     java { 
      srcDirs = ['src/main/generated'] 
     } 
    } 
} 


configurations { 
    providedRuntime 
    querydslapt 
} 

jacoco { 

    reportsDir = file("build/tmp/jacoco.exec") 
} 

test{ 
    ignoreFailures = true  
} 

sonarqube { 
    properties { 
    property "sonar.projectName", "User-associations-V1" 
    property "sonar.projectKey", "org.sonarqube:User-associations-V1" 
    property "sonar.sourceEncoding", "UTF-8" 
    property "sonar.host.url", "${sonar_host}" 
    property "sonar.login", "${sonar_username}" 
    property "sonar.password", "${sonar_password}" 
    property "sonar.jacoco.reportPath", "build/jacoco/test.exec" 
    property "sonar.java.source property", "1.8" 

    } 
} 

dependencyManagement { 
    imports { 
     mavenBom "org.springframework.cloud:spring-cloud-starter-parent:Brixton.RC1" 
    } 
} 

dependencies { 
    compile   ("org.springframework.boot:spring-boot-starter-actuator") 
    compile   ("org.springframework.cloud:spring-cloud-starter-eureka") 
    compile   ("org.springframework.cloud:spring-cloud-config-client") 
    compile("org.springframework.cloud:spring-cloud-starter-hystrix:1.0.6.RELEASE") 
    compile("org.springframework.cloud:spring-cloud-starter-bus-amqp:1.0.6.RELEASE") 
    compile("org.springframework.cloud:spring-cloud-netflix-hystrix-amqp:1.0.6.RELEASE") 
    compile   ("org.codehaus.sonar-plugins.java:sonar-jacoco-plugin:2.3") 
    compile   ("org.springframework.boot:spring-boot-starter-web") 
    compile   ("org.codehaus.jackson:jackson-mapper-asl:1.9.2") 
    compile   ("mysql:mysql-connector-java:5.1.34") 
    compile   ("org.springframework:spring-webmvc:4.2.2.RELEASE") 
    compile   ("org.springframework.boot:spring-boot-starter-data-jpa") 
    providedRuntime ("org.springframework.boot:spring-boot-starter-tomcat") 
    testCompile  ("org.springframework.boot:spring-boot-starter-test") 
    querydslapt  ("org.hibernate:hibernate-jpamodelgen:5.0.5.Final") 
    compile 'org.springframework.cloud:spring-cloud-starter-sleuth:1.0.0.M1' 
    compile 'org.springframework.cloud:spring-cloud-sleuth-core:1.0.0.M1' 
} 


eclipse { 
    classpath { 
     containers.remove('org.eclipse.jdt.launching.JRE_CONTAINER') 
     containers ('org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8') 
    } 
} 

task generateQueryDSL(type: JavaCompile, group: 'build', description: 'Generates the QueryDSL query types') { 
    source = sourceSets.main.java 
    classpath = configurations.compile + configurations.querydslapt 
    options.compilerArgs = [ 
      "-proc:only" 
    ] 
    destinationDir = sourceSets.generated.java.srcDirs.iterator().next() 
} 

compileJava { 
    dependsOn generateQueryDSL 
    source generateQueryDSL.destinationDir 
} 

compileGeneratedJava { 
    dependsOn generateQueryDSL 
    options.warnings = false 
    classpath += sourceSets.main.runtimeClasspath 
} 

clean { 
    delete sourceSets.generated.java.srcDirs 
} 

task wrapper(type: Wrapper) { 
    gradleVersion = '2.9' 
} 

किसी भी मदद की सराहना की है कि मैं इस में थोड़ी देर के लिए अब अटक गए हैं।

+0

के लिए है आप समस्या को हल करने में सक्षम थे? मेरे पास एक ही त्रुटि संदेश है। मैं क्या करने की कोशिश करता हूं एक आवेदन – dementiev

+0

में हाइस्ट्रिक्स डैशबोर्ड और टरबाइन स्ट्रीम एग्रीगेटर है, लेकिन मैंने लॉग इन के साथ कुछ समस्याएं निभाई हैं, जिन्हें उन्होंने अभी तय किया है लेकिन मैंने इसे फिर से कोशिश नहीं की है। हम टर्बाइन का उपयोग नहीं कर रहे हैं ... इसे जांचें http://stackoverflow.com/questions/37014311/too-many-logs-getting-generated-for-hystrix-amqp यह एक निर्भरता चीज है जो मुझे लगता है कि अभी भी गड़बड़ है मेरे ऊपर .... अगर मुझे मेरी पूर्ण निर्भरता पेस्ट करने की ज़रूरत है तो मुझे बताएं। –

उत्तर

3

जांचें कि क्या आपके क्लासपाथ में स्प्रिंग क्लाउड स्ट्रीम खरगोश बांधने की निर्भरता है या नहीं। बाइंडर वसंत-क्लाउड-स्ट्रीम चैनलों को आपके संदेश दलाल को बाध्य करने के लिए ज़िम्मेदार है।

खरगोश के लिए: org.springframework.cloud:spring-cloud-stream-binder-rabbit:version

+0

मेरे पास उस निर्भरता नहीं थी इसलिए मैंने इसे जोड़ा और स्टार्टअप पर अभी भी एक ही अपवाद .... लेकिन जब मैं amqp निर्भरता को हटाता हूं तो सब ठीक काम करता है। –

8

निर्भरता के तहत अपने पोम को यह जोड़े,

<dependency> 
    <groupId>org.springframework.cloud</groupId> 
    <artifactId>spring-cloud-starter-stream-rabbit</artifactId> 
</dependency> 

यह RabbitMQ बांधने की मशीन

संबंधित मुद्दे