1、启动项目报出这个错误,未找到响应的包,所以需要你将包从远程仓库下载到本地仓库即可。
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 八月 03, 2019 9:06:47 上午 org.apache.coyote.AbstractProtocol init 28 信息: Initializing ProtocolHandler ["http-bio-8081"] 29 八月 03, 2019 9:06:47 上午 org.apache.catalina.core.StandardService startInternal 30 信息: Starting service Tomcat 31 八月 03, 2019 9:06:47 上午 org.apache.catalina.core.StandardEngine startInternal 32 信息: Starting Servlet Engine: Apache Tomcat/7.0.47 33 八月 03, 2019 9:06:57 上午 org.apache.catalina.core.ApplicationContext log 34 信息: 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 八月 03, 2019 9:06:58 上午 org.apache.catalina.core.ApplicationContext log 39 信息: Initializing Spring FrameworkServlet 'taotao-manager-web' 40 八月 03, 2019 9:09:33 上午 org.apache.catalina.core.ApplicationContext log 41 严重: 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 八月 03, 2019 9:09:33 上午 org.apache.catalina.core.StandardContext loadOnStartup 86 严重: 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 八月 03, 2019 9:09:33 上午 org.apache.coyote.AbstractProtocol start 129 信息: Starting ProtocolHandler ["http-bio-8081"] 130 八月 03, 2019 9:11:26 上午 org.apache.catalina.core.ApplicationContext log 131 信息: Initializing Spring FrameworkServlet 'taotao-manager-web' 132 八月 03, 2019 9:11:26 上午 org.apache.catalina.core.ApplicationContext log 133 严重: 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 八月 03, 2019 9:11:26 上午 org.apache.catalina.core.StandardWrapperValve invoke 183 严重: 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 八月 03, 2019 9:11:27 上午 org.apache.catalina.core.ApplicationContext log 231 信息: Initializing Spring FrameworkServlet 'taotao-manager-web' 232 八月 03, 2019 9:11:27 上午 org.apache.catalina.core.ApplicationContext log 233 严重: 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 八月 03, 2019 9:11:27 上午 org.apache.catalina.core.StandardWrapperValve invoke 283 严重: 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)
添加依赖即可。
1 <dependencies> 2 <!-- 文件上传组件 --> 3 <dependency> 4 <groupId>commons-fileupload</groupId> 5 <artifactId>commons-fileupload</artifactId> 6 </dependency> 7 </dependencies>