title: Failed to instantiate DiscoveryLocatorProperties in Spring-Cloud-Gateway with Spring Cloud Hoxton SR4
body: <p>Appreciate any help to sort out the below issue. I am using Spring Cloud Hoxton.SR4 and created a Gateway service with spring-cloud-starter-gateway. The application is throwing following exception in startup.</p>
  
  <blockquote>
    <pre class="lang-sh prettyprint-override"><code>org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'discoveryClientRouteDefinitionLocator' defined in class path resource [org/springframework/cloud/gateway/discovery/GatewayDiscoveryClientAutoConfiguration$ReactiveDiscoveryClientRouteDefinitionLocatorConfiguration.class]: Unsatisfied dependency expressed through method 'discoveryClientRouteDefinitionLocator' parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'discoveryLocatorProperties' defined in class path resource [org/springframework/cloud/gateway/discovery/GatewayDiscoveryClientAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.gateway.discovery.DiscoveryLocatorProperties]: Factory method 'discoveryLocatorProperties' threw exception; nested exception is java.lang.NoClassDefFoundError: javax/validation/ValidationException
      at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:798) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
      at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:539) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
  Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.gateway.discovery.DiscoveryLocatorProperties]: Factory method 'discoveryLocatorProperties' threw exception; nested exception is java.lang.NoClassDefFoundError: javax/validation/ValidationException
      at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
      at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
      ... 39 common frames omitted
  Caused by: java.lang.NoClassDefFoundError: javax/validation/ValidationException
      at org.springframework.cloud.gateway.discovery.GatewayDiscoveryClientAutoConfiguration.initPredicates(GatewayDiscoveryClientAutoConfiguration.java:61) ~[spring-cloud-gateway-core-2.2.2.RELEASE.jar:2.2.2.RELEASE]
      at org.springframework.cloud.gateway.discovery.GatewayDiscoveryClientAutoConfiguration.discoveryLocatorProperties(GatewayDiscoveryClientAutoConfiguration.java:86) ~[spring-cloud-gateway-core-2.2.2.RELEASE.jar:2.2.2.RELEASE]enter code here
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_212]
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_212]
      at sun.reflect.DelegatingMethodAccessorImpl.invoenter code hereke(Unknown Source) ~[na:1.8.0_212]
      at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_212]
      at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]
      ... 40 common frames omitted
  Caused by: java.lang.ClassNotFoundException: javax.validation.ValidationException
  
  
     at java.net.URLClassLoader.findClass(Unknown Source) ~[na:1.8.0_212]
          at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_212]
          at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) ~[na:1.8.0_212]
          at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_212]
      ... 47 common frames omitted&gt;
  </code></pre>
  </blockquote>
  
  <p>I have put the following entries in application.properties  as well; but it is not resolving the issue</p>
  
  <pre><code>spring.cloud.gateway.discovery.locator.enabled=true
  spring.cloud.gateway.discovery.locator.lower-case-service-id=true
  </code></pre>