title: NoSuchMethodError javax.validation.Validator.forExecutables() but the Junit works
body: <p>Why do I get this exception NoSuchMethodError javax.validation.Validator.forExecutables() when I run the application and the following method is called but the exception is never thrown if I call the method from a JUnit test, it executes perfectly. I'm using Spring AOP 3.2.4 + AspectJ and Hibernate Validator 5.0.1.</p>
  
  <p>It complains that it can't find the forExecutables method. Thanks</p>
  
  <pre><code>    @Before("execution(* com.sadc.missioncontrol.api.client.models.workRequest.MaintainTimesheet.getPublicHolidays(..))")
  public void validateBeforeGetPublicHolidays(JoinPoint joinPoint) throws NoSuchMethodException, SecurityException {
      ValidatorFactory factory = Validation
              .buildDefaultValidatorFactory();
      ExecutableValidator executableValidator = factory.getValidator()
              .forExecutables();
  
      mainTimesheet = new MaintainTimesheet();
      Method method = MaintainTimesheet.class.getMethod( "getPublicHolidays", String.class,String.class );
      Set&lt;ConstraintViolation&lt;MaintainTimesheet&gt;&gt; violations = executableValidator.validateParameters(
      mainTimesheet,
      method,
      joinPoint.getArgs()
      );
      System.out.println("Number of Violations: " + violations.size());
  
  }
  </code></pre>
  
  <p>StackTrace:</p>
  
  <pre><code>org.jboss.resteasy.spi.UnhandledException: java.lang.NoSuchMethodError: javax.validation.Validator.forExecutables()Ljavax/validation/executable/ExecutableValidator;
  org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:340)
  org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214)
  org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190)
  org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:540)
  org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)
  org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
  org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
  org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
  org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
  </code></pre>
  
  <p>root cause</p>
  
  <pre><code>java.lang.NoSuchMethodError: javax.validation.Validator.forExecutables()Ljavax/validation/executable/ExecutableValidator;
      com.sadc.missioncontrol.api.commons.validations.TimesheetValidationAspect.validateBeforeGetPublicHolidays(TimesheetValidationAspect.java:27)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      java.lang.reflect.Method.invoke(Unknown Source)
      org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
      org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:603)
      org.springframework.aop.aspectj.AspectJMethodBeforeAdvice.before(AspectJMethodBeforeAdvice.java:39)
      org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:631)
      com.sadc.missioncontrol.api.client.models.workRequest.MaintainTimesheet$$EnhancerByCGLIB$$985a406e.getPublicHolidays(&lt;generated&gt;)
      com.sadc.missioncontrol.api.client.workServiceWrappers.TimesheetWrapper.getPublicHolidays(TimesheetWrapper.java:77)
      com.sadc.missioncontrol.api.client.TimesheetServiceWorker.handleGetPublicHolidays(TimesheetServiceWorker.java:88)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      java.lang.reflect.Method.invoke(Unknown Source)
      org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155)
      org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)
      org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)
      org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211)
      org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525)
      org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)
      org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
      org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
      org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
      org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
  </code></pre>
  
  <p>Pom.xml</p>
  
  <pre><code>    &lt;?xml version="1.0"?&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/maven-v4_0_0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.sadc&lt;/groupId&gt;
      &lt;artifactId&gt;MissionControl&lt;/artifactId&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;MissionControl&lt;/name&gt;
      &lt;url&gt;http://www.company.co.za&lt;/url&gt;
  
      &lt;!-- Remote repositories --&gt;
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;java.net&lt;/id&gt;
              &lt;url&gt;https://maven.java.net/content/repositories/public/&lt;/url&gt;
          &lt;/repository&gt;
  
          &lt;repository&gt;
              &lt;id&gt;JBoss repository&lt;/id&gt;
              &lt;url&gt;http://repository.jboss.org/nexus/content/groups/public/&lt;/url&gt;
          &lt;/repository&gt;
  
      &lt;/repositories&gt;
  
      &lt;properties&gt;
          &lt;spring.version&gt;3.2.4.RELEASE&lt;/spring.version&gt;
      &lt;/properties&gt;
  
      &lt;!-- Maven dependencies --&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.ws.rs&lt;/groupId&gt;
              &lt;artifactId&gt;jsr311-api&lt;/artifactId&gt;
              &lt;version&gt;1.1.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax&lt;/groupId&gt;
              &lt;artifactId&gt;javaee-api&lt;/artifactId&gt;
              &lt;version&gt;7.0&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;commons-beanutils&lt;/groupId&gt;
              &lt;artifactId&gt;commons-beanutils-core&lt;/artifactId&gt;
              &lt;version&gt;1.8.3&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;commons-beanutils&lt;/groupId&gt;
              &lt;artifactId&gt;commons-beanutils-bean-collections&lt;/artifactId&gt;
              &lt;version&gt;1.8.3&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;commons-beanutils&lt;/groupId&gt;
              &lt;artifactId&gt;commons-beanutils&lt;/artifactId&gt;
              &lt;version&gt;1.8.3&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
              &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
              &lt;version&gt;3.0&lt;/version&gt;
          &lt;/dependency&gt;
  
  
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;4.11&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.hamcrest&lt;/groupId&gt;
              &lt;artifactId&gt;hamcrest-core&lt;/artifactId&gt;
              &lt;version&gt;1.3&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.geronimo.ext.tomcat&lt;/groupId&gt;
              &lt;artifactId&gt;catalina&lt;/artifactId&gt;
              &lt;version&gt;7.0.39.2&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.geronimo.ext.tomcat&lt;/groupId&gt;
              &lt;artifactId&gt;juli&lt;/artifactId&gt;
              &lt;version&gt;7.0.39.2&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-core&lt;/artifactId&gt;
              &lt;version&gt;2.2.3&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
              &lt;version&gt;2.2.3&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-annotations&lt;/artifactId&gt;
              &lt;version&gt;2.2.3&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-mapper-asl&lt;/artifactId&gt;
              &lt;version&gt;1.9.13&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-core-asl&lt;/artifactId&gt;
              &lt;version&gt;1.9.13&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;net.sourceforge.jtds&lt;/groupId&gt;
              &lt;artifactId&gt;jtds&lt;/artifactId&gt;
              &lt;version&gt;1.3.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.json&lt;/groupId&gt;
              &lt;artifactId&gt;json&lt;/artifactId&gt;
              &lt;version&gt;20090211&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss.logging&lt;/groupId&gt;
              &lt;artifactId&gt;jboss-logging&lt;/artifactId&gt;
              &lt;version&gt;3.1.3.GA&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss.resteasy&lt;/groupId&gt;
              &lt;artifactId&gt;resteasy-jaxrs&lt;/artifactId&gt;
              &lt;version&gt;2.2.1.GA&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;!-- Spring AOP + AspectJ --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-aop&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.aspectj&lt;/groupId&gt;
              &lt;artifactId&gt;aspectjrt&lt;/artifactId&gt;
              &lt;version&gt;1.6.11&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.aspectj&lt;/groupId&gt;
              &lt;artifactId&gt;aspectjweaver&lt;/artifactId&gt;
              &lt;version&gt;1.6.11&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
              &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt;
              &lt;version&gt;5.0.1.Final&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;javax.validation&lt;/groupId&gt;
              &lt;artifactId&gt;validation-api&lt;/artifactId&gt;
              &lt;version&gt;1.1.0.Final&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;joda-time&lt;/groupId&gt;
              &lt;artifactId&gt;joda-time&lt;/artifactId&gt;
              &lt;version&gt;2.3&lt;/version&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;!-- Maven War file generator plugin --&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.4&lt;/version&gt;
              &lt;/plugin&gt;
  
              &lt;!-- Maven compiler plugin --&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.7&lt;/source&gt;
                      &lt;target&gt;1.7&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
              &lt;plugin&gt;
                  &lt;groupId&gt;org.jboss.as.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;jboss-as-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;7.1.1.Final&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;phase&gt;install&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;deploy&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
                  &lt;configuration&gt;
                      &lt;hostname&gt;${env.HOSTNAME}&lt;/hostname&gt;
                      &lt;port&gt;9999&lt;/port&gt;
                      &lt;username&gt; admin&lt;/username&gt;
                      &lt;password&gt;adminadmin&lt;/password&gt;
                      &lt;filename&gt;${project.build.finalName}.${project.packaging}&lt;/filename&gt;
                      &lt;webModule&gt;
                          &lt;groupId&gt;${project.groupId}&lt;/groupId&gt;
                          &lt;artifactId&gt;${project.artifactId}&lt;/artifactId&gt;
                          &lt;contextRoot&gt;/MissionControl&lt;/contextRoot&gt;
                      &lt;/webModule&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
              &lt;!-- Maven Skip Tests --&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.12.4&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;skipTests&gt;true&lt;/skipTests&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>