严重: StandardWrapper.Throwable

当我们再启动的时候发现:


严重: StandardWrapper.Throwable;这样的异常;

这是由于依赖的jar包出现少包或者冲突导致的,

commons的1.0已经用不了;基本上高版本不注意就很容易冲突;

严重: StandardWrapper.Throwable
java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItemFactory
 at java.lang.Class.getDeclaredMethods0(Native Method)
 at java.lang.Class.privateGetDeclaredMethods(Class.java:2615)
 at java.lang.Class.getDeclaredMethods(Class.java:1860)
 at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:571)
 at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:488)
 at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:474)
 at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:241)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1065)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1038)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
 at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
 at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)
 at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
 at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:663)
 at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:629)
 at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:677)
 at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:548)
 at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:489)
 at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
 at javax.servlet.GenericServlet.init(GenericServlet.java:158)
 at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
 at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
 at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5210)
 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5493)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
 at java.util.concurrent.FutureTask.run(FutureTask.java:262)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.fileupload.FileItemFactory
 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
 ... 37 more

十一月 09, 2017 1:50:15 下午 org.apache.catalina.core.StandardContext loadOnStartup
严重: Servlet /alad-magicloas-act threw load() exception
java.lang.ClassNotFoundException: org.apache.commons.fileupload.FileItemFactory

你会发现类加载错误;因为这个类找不到因为没有这个jar包所以你需要导入jar依赖;

我导入的commons依赖如下:

 
            commons-codec
            commons-codec
            1.9
       

       
   commons-fileupload
   commons-fileupload
   1.3.1
   
    
     commons-io
     commons-io
    

   

  

   

这个io可排除也可不排除,更具情况而定;



你可能感兴趣的:(对对碰-java)