title: Invocation of destroy method 'close' failed on bean with name 'mvcValidator'
body: <p>I am using Spring mvc version 3.2.2 with JDBC template.
  Whenever my tomcat re-publish or restart below log in generated in console.</p>
  
  <hr>
  
  <pre><code> WebApplicationContext
      17:04:36,935 INFO  [DefaultListableBeanFactory] Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@20b87b1d: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,vascularDBConfig,vascularWebAppConfig,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor,demoController,handler,observationController,vascularExamController,baseDao,demoDao,observationDao,demoService,observationService,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration,org.springframework.transaction.config.internalTransactionAdvisor,transactionAttributeSource,transactionInterceptor,vascularTransactionManager,namedParameterJdbcTemplate,jdbcTemplate,getDatasource,org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration,httpRequestHandlerAdapter,mvcConversionService,requestMappingHandlerAdapter,defaultServletHandlerMapping,resourceHandlerMapping,beanNameHandlerMapping,viewControllerHandlerMapping,requestMappingHandlerMapping,handlerExceptionResolver,simpleControllerHandlerAdapter,mvcContentNegotiationManager,mvcValidator,setupViewResolver]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@6a52eeab
      17:04:36,935 WARN  [DisposableBeanAdapter] Invocation of destroy method 'close' failed on bean with name 'mvcValidator'
      java.lang.AbstractMethodError: org.springframework.validation.beanvalidation.LocalValidatorFactoryBean.close()V
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:606)
          at org.springframework.beans.factory.support.DisposableBeanAdapter.invokeCustomDestroyMethod(DisposableBeanAdapter.java:328)
          at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:254)
          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:510)
          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:486)
          at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:751)
          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:455)
          at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1092)
          at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1066)
          at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1012)
          at org.springframework.web.servlet.FrameworkServlet.destroy(FrameworkServlet.java:794)
          at org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1482)
          at org.apache.catalina.core.StandardWrapper.stopInternal(StandardWrapper.java:1843)
          at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
          at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5614)
          at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
          at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3947)
          at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:426)
          at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1345)
          at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1530)
          at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
          at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
          at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1519)
          at java.lang.Thread.run(Thread.java:744)
  </code></pre>
  
  <p>Three configuration classes as I did was java based configuration given below.</p>
  
  <p>public class Initializer implements WebApplicationInitializer{</p>
  
  <pre><code>@Override
  public void onStartup(ServletContext servletContext) throws ServletException {
      AnnotationConfigWebApplicationContext webApplicationContext = new AnnotationConfigWebApplicationContext();
      webApplicationContext.register(DBConfig.class);
      webApplicationContext.register(WebAppConfig.class);
      webApplicationContext.setServletContext(servletContext);
      ServletRegistration.Dynamic dispatcherServlet = servletContext.addServlet("vasculardispatcher", new DispatcherServlet(webApplicationContext));
      dispatcherServlet.setLoadOnStartup(1);
      dispatcherServlet.addMapping("/rootPath/*");
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Second one is</p>
  
  <pre><code>@Configuration
  @EnableTransactionManagement
  @ComponentScan("com")
  public class DBConfig {
  
      @Bean
      public DataSource getDatasource() {
          //my code for getting datasource
      }
  
      @Bean
      public JdbcTemplate jdbcTemplate() {
          JdbcTemplate jdbcTemplate = new JdbcTemplate();
          jdbcTemplate.setDataSource(getDatasource());
          return jdbcTemplate;
      }
  
      @Bean
      public NamedParameterJdbcTemplate namedParameterJdbcTemplate() {
          return new NamedParameterJdbcTemplate(jdbcTemplate());
      }
  
      @Bean(name=TRANSACTION_MANAGER)
      public PlatformTransactionManager transactionMngr(){
          DataSourceTransactionManager dataSourceTransactionManager = new DataSourceTransactionManager(getDatasource());
          return dataSourceTransactionManager;
      }   
  }
  </code></pre>
  
  <p>And last one is </p>
  
  <pre><code>@Configuration
  @EnableWebMvc
  @ComponentScan("com")
  public class WebAppConfig extends WebMvcConfigurerAdapter {
  
          @Bean
          public UrlBasedViewResolver setupViewResolver() {
                  UrlBasedViewResolver viewResolver = new UrlBasedViewResolver();
                  viewResolver.setOrder(1);
                  viewResolver.setPrefix("/jsp/");
                  viewResolver.setSuffix(".jsp");
                  viewResolver.setViewClass(JstlView.class);
                  return viewResolver;
          }
  
          @Override
          public void addInterceptors(InterceptorRegistry registry) {
              registry.addInterceptor(new SecurityAccessInterceptor());
          }
  
  
  }
  </code></pre>
  
  <p>Any help will be appriciated?</p>