spring 项目tomcat 8.0.2 发布报错:Could not

系统 2026 0

tomcat 8 项目发布遇到的错

 

      
         1
      
       [ERROR] 
      
        2015
      
      -
      
        05
      
      -
      
        22
      
      
        22
      
      :
      
        51
      
      :
      
        38
      
      ,
      
        683
      
       org.springframework.web.servlet.DispatcherServlet     -
      
         Context initialization failed


      
      
         2
      
       org.springframework.beans.factory.BeanCreationException: Error creating bean with name 
      
        '
      
      
        org.springframework.validation.beanvalidation.LocalValidatorFactoryBean#0
      
      
        '
      
      : Invocation of init method failed; nested exception 
      
        is
      
       java.lang.NoClassDefFoundError: Could not initialize 
      
        class
      
      
         org.hibernate.validator.engine.ConfigurationImpl


      
      
         3
      
               at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:
      
        1512
      
      
        )


      
      
         4
      
               at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:
      
        521
      
      
        )


      
      
         5
      
               at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:
      
        458
      
      
        )


      
      
         6
      
               at org.springframework.beans.factory.support.AbstractBeanFactory$
      
        1
      
      .getObject(AbstractBeanFactory.java:
      
        296
      
      
        )


      
      
         7
      
               at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:
      
        223
      
      
        )


      
      
         8
      
               at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:
      
        293
      
      
        )


      
      
         9
      
               at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:
      
        194
      
      
        )


      
      
        10
      
               at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:
      
        628
      
      
        )


      
      
        11
      
               at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:
      
        932
      
      
        )


      
      
        12
      
               at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:
      
        479
      
      
        )


      
      
        13
      
               at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:
      
        651
      
      
        )


      
      
        14
      
               at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:
      
        599
      
      
        )


      
      
        15
      
               at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:
      
        665
      
      
        )


      
      
        16
      
               at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:
      
        518
      
      
        )


      
      
        17
      
               at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:
      
        459
      
      
        )


      
      
        18
      
               at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:
      
        136
      
      
        )


      
      
        19
      
               at javax.servlet.GenericServlet.init(GenericServlet.java:
      
        158
      
      
        )


      
      
        20
      
               at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:
      
        1231
      
      
        )


      
      
        21
      
               at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:
      
        1144
      
      
        )


      
      
        22
      
               at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:
      
        817
      
      
        )


      
      
        23
      
               at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
      
        135
      
      
        )


      
      
        24
      
               at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
      
        106
      
      
        )


      
      
        25
      
               at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:
      
        502
      
      
        )


      
      
        26
      
               at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
      
        142
      
      
        )


      
      
        27
      
               at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
      
        79
      
      
        )


      
      
        28
      
               at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:
      
        617
      
      
        )


      
      
        29
      
               at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
      
        88
      
      
        )


      
      
        30
      
               at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
      
        518
      
      
        )


      
      
        31
      
               at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:
      
        1091
      
      
        )


      
      
        32
      
               at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:
      
        668
      
      
        )


      
      
        33
      
               at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:
      
        1521
      
      
        )


      
      
        34
      
               at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:
      
        1478
      
      
        )


      
      
        35
      
               at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:
      
        1145
      
      
        )


      
      
        36
      
               at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:
      
        615
      
      
        )


      
      
        37
      
               at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:
      
        61
      
      
        )


      
      
        38
      
               at java.lang.Thread.run(Thread.java:
      
        745
      
      
        )


      
      
        39
      
       Caused by: java.lang.NoClassDefFoundError: Could not initialize 
      
        class
      
      
         org.hibernate.validator.engine.ConfigurationImpl


      
      
        40
      
               at org.hibernate.validator.HibernateValidator.createGenericConfiguration(HibernateValidator.java:
      
        43
      
      
        )


      
      
        41
      
               at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:
      
        269
      
      )
    

 

查阅网上资料说是 slf4j-log4j12-1.6.1.jar的版本不对,这个项目当时是从别的项目上复制过来的,在lib项目下存在两个 slf4j-log4j12.jar,我删除了 slf4j-log4j12-1.5.0.jar,重新启动项目后一切正常。

spring 项目tomcat 8.0.2 发布报错:Could not initialize class org.hibernate.validator.engine.ConfigurationImpl


更多文章、技术交流、商务合作、联系博主

微信扫码或搜索:z360901061

微信扫一扫加我为好友

QQ号联系: 360901061

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描下面二维码支持博主2元、5元、10元、20元等您想捐的金额吧,狠狠点击下面给点支持吧,站长非常感激您!手机微信长按不能支付解决办法:请将微信支付二维码保存到相册,切换到微信,然后点击微信右上角扫一扫功能,选择支付二维码完成支付。

【本文对您有帮助就好】

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描上面二维码支持博主2元、5元、10元、自定义金额等您想捐的金额吧,站长会非常 感谢您的哦!!!

发表我的评论
最新评论 总共0条评论