title: Error creating bean with name 'bindingService' - Eureka & Bus AMQP
body: <p>I'm trying to integrate Hystrix into my current spring-cloud &amp; Netflix OSS microservice project.</p>
  
  <p>I have a fresh Spring Boot version 1.4.0.RELEASE project with two dependencies: </p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
          &lt;artifactId&gt;spring-cloud-starter-eureka&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
          &lt;artifactId&gt;spring-cloud-starter-bus-amqp&lt;/artifactId&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>On project startup I receive this exception:</p>
  
  <pre><code>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bindingService' defined in class path resource [org/springframework/cloud/stream/config/ChannelBindingServiceConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.stream.binding.ChannelBindingService]: Factory method 'bindingService' threw exception; nested exception is java.lang.NoClassDefFoundError: javax/validation/Validator
  </code></pre>
  
  <p>This exception only occurs when both the Eureka &amp; Bus AMQP dependencies are together.</p>
  
  <p>There is no configuration set in application or bootstrap .yml/.properties.</p>
  
  <p>The only Java class present is the one generated by Spring Boot:</p>
  
  <pre><code>@SpringBootApplication
  public class DummyProjectApplication {
  
      public static void main(String[] args) {
          SpringApplication.run(DummyProjectApplication.class, args);
      }
  }
  </code></pre>
  
  <p>Full POM: </p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
          &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
          &lt;groupId&gt;com.dummy&lt;/groupId&gt;
          &lt;artifactId&gt;dummy_project&lt;/artifactId&gt;
          &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
          &lt;packaging&gt;jar&lt;/packaging&gt;
          &lt;name&gt;dummy_project&lt;/name&gt;
          &lt;description&gt;dummy_project&lt;/description&gt;
          &lt;parent&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
              &lt;version&gt;1.4.0.RELEASE&lt;/version&gt;
              &lt;relativePath /&gt; &lt;!-- lookup parent from repository --&gt;
          &lt;/parent&gt;
          &lt;properties&gt;
              &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
              &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
              &lt;java.version&gt;1.8&lt;/java.version&gt;
          &lt;/properties&gt;
          &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-cloud-starter-eureka&lt;/artifactId&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-cloud-starter-bus-amqp&lt;/artifactId&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
          &lt;dependencyManagement&gt;
              &lt;dependencies&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;org.springframework.cloud&lt;/groupId&gt;
                      &lt;artifactId&gt;spring-cloud-dependencies&lt;/artifactId&gt;
                      &lt;version&gt;Brixton.SR4&lt;/version&gt;
                      &lt;type&gt;pom&lt;/type&gt;
                      &lt;scope&gt;import&lt;/scope&gt;
                  &lt;/dependency&gt;
              &lt;/dependencies&gt;
          &lt;/dependencyManagement&gt;
          &lt;build&gt;
              &lt;plugins&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                      &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/build&gt;
      &lt;/project&gt;
  </code></pre>
  
  <p>Full Stack Trace:</p>
  
  <pre><code>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bindingService' defined in class path resource [org/springframework/cloud/stream/config/ChannelBindingServiceConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.stream.binding.ChannelBindingService]: Factory method 'bindingService' threw exception; nested exception is java.lang.NoClassDefFoundError: javax/validation/Validator
      at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:776) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
      at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
      at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369) [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:313) [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1185) [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1174) [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
      at com.dummy.DummyProjectApplication.main(DummyProjectApplication.java:10) [classes/:na]
  Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.stream.binding.ChannelBindingService]: Factory method 'bindingService' threw exception; nested exception is java.lang.NoClassDefFoundError: javax/validation/Validator
      at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      ... 18 common frames omitted
  Caused by: java.lang.NoClassDefFoundError: javax/validation/Validator
      at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.8.0_73]
      at java.lang.ClassLoader.defineClass(Unknown Source) ~[na:1.8.0_73]
      at java.security.SecureClassLoader.defineClass(Unknown Source) ~[na:1.8.0_73]
      at java.net.URLClassLoader.defineClass(Unknown Source) ~[na:1.8.0_73]
      at java.net.URLClassLoader.access$100(Unknown Source) ~[na:1.8.0_73]
      at java.net.URLClassLoader$1.run(Unknown Source) ~[na:1.8.0_73]
      at java.net.URLClassLoader$1.run(Unknown Source) ~[na:1.8.0_73]
      at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_73]
      at java.net.URLClassLoader.findClass(Unknown Source) ~[na:1.8.0_73]
      at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_73]
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) ~[na:1.8.0_73]
      at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_73]
      at org.springframework.cloud.stream.binding.ChannelBindingService.&lt;init&gt;(ChannelBindingService.java:71) ~[spring-cloud-stream-1.0.2.RELEASE.jar:1.0.2.RELEASE]
      at org.springframework.cloud.stream.config.ChannelBindingServiceConfiguration.bindingService(ChannelBindingServiceConfiguration.java:105) ~[spring-cloud-stream-1.0.2.RELEASE.jar:1.0.2.RELEASE]
      at org.springframework.cloud.stream.config.ChannelBindingServiceConfiguration$$EnhancerBySpringCGLIB$$dcfa32f2.CGLIB$bindingService$1(&lt;generated&gt;) ~[spring-cloud-stream-1.0.2.RELEASE.jar:1.0.2.RELEASE]
      at org.springframework.cloud.stream.config.ChannelBindingServiceConfiguration$$EnhancerBySpringCGLIB$$dcfa32f2$$FastClassBySpringCGLIB$$641fb65d.invoke(&lt;generated&gt;) ~[spring-cloud-stream-1.0.2.RELEASE.jar:1.0.2.RELEASE]
      at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      at org.springframework.cloud.stream.config.ChannelBindingServiceConfiguration$$EnhancerBySpringCGLIB$$dcfa32f2.bindingService(&lt;generated&gt;) ~[spring-cloud-stream-1.0.2.RELEASE.jar:1.0.2.RELEASE]
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_73]
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_73]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_73]
      at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_73]
      at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ~[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      ... 19 common frames omitted
  Caused by: java.lang.ClassNotFoundException: javax.validation.Validator
      at java.net.URLClassLoader.findClass(Unknown Source) ~[na:1.8.0_73]
      at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_73]
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) ~[na:1.8.0_73]
      at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_73]
      ... 43 common frames omitted
  
  Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
  </code></pre>