[Solved] Java.lang.ClassNotFoundException: org.apache.commons.fileupload.FileItemFactory

1. The startup project reported this error, and the corresponding package was not found, so you need to download the package from the remote warehouse to the local warehouse.

  1 [INFO] Scanning for projects...
  2 [INFO] 
  3 [INFO] -------------------< com.taotao:taotao-manager-web >--------------------
  4 [INFO] Building taotao-manager-web 0.0.1-SNAPSHOT
  5 [INFO] --------------------------------[ war ]---------------------------------
  6 [INFO] 
  7 [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ taotao-manager-web ---
  8 [INFO] Deleting D:\eclipse\workspace_taotao\taotao-manager-web\target
  9 [INFO] 
 10 [INFO] >>> tomcat7-maven-plugin:2.2:run (default-cli) > process-classes @ taotao-manager-web >>>
 11 [INFO] 
 12 [INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ taotao-manager-web ---
 13 [INFO] Using 'UTF-8' encoding to copy filtered resources.
 14 [INFO] Copying 2 resources
 15 [INFO] 
 16 [INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) @ taotao-manager-web ---
 17 [INFO] Changes detected - recompiling the module!
 18 [INFO] Compiling 1 source file to D:\eclipse\workspace_taotao\taotao-manager-web\target\classes
 19 [INFO] 
 20 [INFO] <<< tomcat7-maven-plugin:2.2:run (default-cli) < process-classes @ taotao-manager-web <<<
 21 [INFO] 
 22 [INFO] 
 23 [INFO] --- tomcat7-maven-plugin:2.2:run (default-cli) @ taotao-manager-web ---
 24 [INFO] Running war on http://localhost:8081/
 25 [INFO] Creating Tomcat server configuration at D:\eclipse\workspace_taotao\taotao - manager - web\target\tomcat
  26  [ INFO ] create webapp with contextPath :  
 27 August 03 ,  2019  9 : 06 : 47 AM org . apache . coyote . AbstractProtocol init
  28 Information : Initializing ProtocolHandler [ " Bio-8081-HTTP " ] 
 29 Bayue 03 ,  2019  9 : 06 : 47Morning ORG . The Apache . Catalina . Core . StandardService startInternal
  30 Information : Starting Tomcat Service
  31 Bayue 03 ,  2019  9 : 06 : 47 am ORG . The Apache . Catalina . Core . StandardEngine startInternal
  32 Information : Starting Servlet Engine : the Apache Tomcat / 7.0 . 47 
 33 August 03 ,  2019 9:06:57 AM org.apache.catalina.core.ApplicationContext log
 34 Message: No Spring WebApplicationInitializer types detected on classpath
 35 log4j:WARN No appenders could be found for logger (org.springframework.web.context.support.StandardServletEnvironment).
 36 log4j:WARN Please initialize the log4j system properly. 
 37 log4j : WARN See http : / / logging . Apache . Org / log4j / 1.2 / faq . Html#noconfig for more info . 
 38 August 03 ,  2019  9 : 06 : 58 AM org . apache . Catalina . Core . ApplicationContext log
  39 information : Initializing Spring FrameworkServlet'taotao -manager-web'
 40 August 03 ,  2019  9 : 09 : 33 am org . apache . Catalina . Core . ApplicationContext log
  41 serious : StandardWrapper . Throwable
  42 java . Lang . NoClassDefFoundError : org / apache / commons / fileupload / FileItemFactory
  43      at java . Lang . Class .getDeclaredMethods0(Native Method)
 44     at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
 45     at java.lang.Class.getDeclaredMethods(Class.java:1975)
 46     at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:609)
 47     at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:521)
 48     at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:507)
 49     at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:241)
 50     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1069)
 51     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1042)
 52     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
 53     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
 54     at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
 55     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
 56     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
 57     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
 58     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
 59     at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
 60     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
 61     at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:668)
 62     at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:634)
 63     at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:682)
 64     at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:553)
 65     at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:494)
 66     at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
 67     at javax.servlet.GenericServlet.init(GenericServlet.java:160)
 68     at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
 69     at org.apache.catalina.core.StandardWrapper.loadServlet ( StandardWrapper . java : 1193 ) 
 70      at org . apache . catalina . core . StandardWrapper . load ( StandardWrapper . java : 1088 ) 
 71      at org . apache . catalina . core . StandardContext . loadOnStartup ( StandardContext . java : 5176 ) 
 72      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5460)
 73     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 74     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
 75     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
 76     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 77     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
 78     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 79     at java.lang.Thread.run(Thread.java:748)
 80 Caused by: java.lang.ClassNotFoundException: org.apache.commons.fileupload.FileItemFactory
 81     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)
 82     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
 83     ... 37 more
 84 
 85 Agu 03, 2019 9:09:33 AM org.apache.catalina.core.StandardContext loadOnStartup
 86 Warning: Servlet  threw load() exception
 87 java.lang.ClassNotFoundException: org.apache.commons.fileupload.FileItemFactory
 88     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)
 89     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
 90     at java.lang.Class.getDeclaredMethods0(Native Method)
 91     at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
 92     at java.lang.Class.getDeclaredMethods(Class.java:1975)
 93     at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:609)
 94     at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:521)
 95     at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:507)
 96     at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:241)
 97     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1069)
 98     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1042)
 99     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
100     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
101     at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
102     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
103     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
104     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
105     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
106     at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
107     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
108     at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:668)
109     at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:634)
110     at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:682)
111     at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:553)
112     at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:494)
113     at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136 ) 
114      at javax . servlet . GenericServlet . init ( GenericServlet . java : 160 ) 
115      at org . apache . catalina . core . StandardWrapper . initServlet ( StandardWrapper . java : 1280 ) 
116      at org . apache . catalina . core . StandardWrapper . loadServlet(StandardWrapper.java:1193)
117     at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)
118     at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5176)
119     at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5460)
120     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
121     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
122     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
123     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
124     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
125     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
126     at java.lang.Thread.run(Thread.java:748)
127 
128 Agu 03, 2019 9:09: 33 am org . Apache . Coyote . AbstractProtocol start
 129 Information : Starting ProtocolHandler [ "http-bio-8081" ] 
130 August 03 ,  2019  9 : 11 : 26 am org . apache . Catalina . Core . ApplicationContext log
 131 information : Initializing Spring FrameworkServlet'taotao -manager-web' 
132 August 03 ,  2019  9:11:26 AM org.apache.catalina.core.ApplicationContext log
133 Warning: StandardWrapper.Throwable
134 java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItemFactory
135     at java.lang.Class.getDeclaredMethods0(Native Method)
136     at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
137     at java.lang.Class.getDeclaredMethods(Class.java:1975)
138     at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:609)
139     at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:521)
140     at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:507)
141     at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:241)
142     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1069)
143     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1042)
144     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
145     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
146     at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
147     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
148     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
149     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
150     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
151     at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
152     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
153     at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:668)
154     at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:634)
155     at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:682)
156     at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:553)
157     at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:494)
158     at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
159      at javax . servlet . GenericServlet . init ( GenericServlet . java : 160 ) 
160      at org . apache . catalina . core . StandardWrapper . initServlet ( StandardWrapper . java : 1280 ) 
161      at org . apache . catalina . core . StandardWrapper . loadServlet (StandardWrapper.java:1193)
162     at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:865)
163     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:136)
164     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
165     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
166     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
167     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
168     at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
169     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
170     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
171     at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
172     at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
173     at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
174     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
175     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
176     at java.lang.Thread.run(Thread.java:748)
177 Caused by: java.lang.ClassNotFoundException: org.apache.commons.fileupload.FileItemFactory
178     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)
179     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
180     ... 42 more
181 
182 Agu 03, 2019 9:11:26 AM org.apache.catalina.core.StandardWrapperValve invoke
183 WANING: Allocate exception for servlet taotao-manager-web
184 java.lang.ClassNotFoundException: org.apache.commons.fileupload.FileItemFactory
185     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)
186     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
187     at java.lang.Class.getDeclaredMethods0(Native Method)
188     at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
189     at java.lang.Class.getDeclaredMethods(Class.java:1975)
190     at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:609)
191     at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:521)
192     at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:507)
193     at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:241)
194     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1069)
195     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1042)
196     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
197     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
198     at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
199     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
200     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
201     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
202     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
203     at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
204     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
205     at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:668)
206     at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:634)
207     at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:682)
208     at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:553)
209     at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:494)
210     at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
211     at javax.servlet.GenericServlet.init(GenericServlet.java:160)
212     at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)
213     at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)
214     at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:865)
215     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:136)
216     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
217     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
218     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
219     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
220     at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
221     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
222     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
223     at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
224     at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
225     at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
226     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
227     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
228     at java.lang.Thread.run(Thread.java: 748 ) 
229  
230 August 03 ,  2019  9 : 11 : 27 AM org . apache . Catalina . Core . ApplicationContext log
 231 Information : Initializing Spring FrameworkServlet'taotao -manager-web' 
232 August 03 ,  2019  9 : 11 : 27 AM org . Apache . Catalina . Core . ApplicationContext log
 233 WANING: StandardWrapper.Throwable
234 java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItemFactory
235     at java.lang.Class.getDeclaredMethods0(Native Method)
236     at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
237     at java.lang.Class.getDeclaredMethods(Class.java:1975)
238     at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:609)
239     at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:521)
240     at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:507)
241     at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:241)
242     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1069)
243     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1042)
244     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
245     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
246     at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
247     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
248     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
249     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
250     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
251     at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
252     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
253     at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:668)
254     at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:634)
255     at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:682)
256     at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:553)
257     at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:494)
258     at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
259     at javax.servlet.GenericServlet.init(GenericServlet.java:160)
260      at org . apache . catalina . core . StandardWrapper . initServlet ( StandardWrapper . java : 1280 ) 
261      at org . apache . catalina . core . StandardWrapper . loadServlet ( StandardWrapper . java : 1193 ) 
262      at org . apache . catalina . core . StandardWrapper.allocate(StandardWrapper.java:865)
263     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:136)
264     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
265     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
266     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
267     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
268     at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
269     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
270     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
271     at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
272     at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
273     at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
274     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
275     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
276     at java.lang.Thread.run(Thread.java:748)
277 Caused by: java.lang.ClassNotFoundException: org.apache.commons.fileupload.FileItemFactory
278     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)
279     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
280     ... 42 more
281 
282 Agu 03, 2019 9:11:27 AM org.apache.catalina.core.StandardWrapperValve invoke
283 WANING: Allocate exception for servlet taotao-manager-web
284 java.lang.ClassNotFoundException: org.apache.commons.fileupload.FileItemFactory
285     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)
286     at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
287     at java.lang.Class.getDeclaredMethods0(Native Method)
288     at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
289     at java.lang.Class.getDeclaredMethods(Class.java:1975)
290     at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:609)
291     at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:521)
292     at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:507)
293     at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:241)
294     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1069)
295     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1042)
296     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
297     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
298     at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
299     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
300     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
301     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
302     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
303     at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
304     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
305     at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:668)
306     at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:634)
307     at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:682)
308     at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:553)
309     at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:494)
310     at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
311     at javax.servlet . GenericServlet . init ( GenericServlet . java : 160 ) 
312      at org . apache . catalina . core . StandardWrapper . initServlet ( StandardWrapper . java : 1280 ) 
313      at org . apache . catalina . core . StandardWrapper . loadServlet ( StandardWrapper . java :1193)
314     at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:865)
315     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:136)
316     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
317     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
318     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
319     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
320     at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
321     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
322     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
323     at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
324     at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
325     at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
326     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
327     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
328     at java.lang.Thread.run(Thread.java:748)

Just add dependencies.

1 <dependencies>
2     <!-- File upload component -->
3     <dependency>
4         <groupId>commons-fileupload</groupId>
5         <artifactId>commons-fileupload</artifactId>
6     </dependency>
7 </dependencies>

Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *