1. 程式人生 > >spring+mybatis啟動NoClassDefFoundError異常分析三部曲之一:穩定重現問題

spring+mybatis啟動NoClassDefFoundError異常分析三部曲之一:穩定重現問題

上一週,web專案在釋出的時候應用啟動失敗了,錯誤資訊如下:

org.springframework.web.context.ContextLoader] - Context initialization failed java.lang.NoClassDefFoundError: Could not initialize class org.springframework.beans.factory.BeanCreationException at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) at org.springframework.beans.factory.support.AbstractBeanFactory1.

getObject(AbstractBeanFactory.java:304)atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)atorg.springframework.beans.factory.s
upport.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)atorg.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:700)atorg.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractA
pplicationContext.java:760)atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)atorg.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)atorg.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)atorg.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)atorg.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5118)atorg.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5634)atorg.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)atorg.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)atorg.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)atorg.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)atorg.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1260)atorg.apache.catalina.startup.HostConfig1.getObject(AbstractBeanFactory.java:304) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:700) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5118) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5634) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1260) at org.apache.catalina.startup.HostConfig