在几种情况下,Tomcat因为maven而无法打开

时间:2017-07-10 12:07:11

标签: java eclipse maven tomcat

这两天,我遇到了maven的一些问题(我是新手),都导致无法打开tomcat。这里有几种情况:

1.从github下载导入maven项目后;

2.将动态项目更改为maven项目后;

3.在pom.xml中添加一些依赖项后;

4.更改链接到maven项目的数据库后;

可能还有其他情况会导致tomcat打开问题。是否有任何类似的情况或任何解决方案?真的很失望,突然你无法打开tomcat,也许只是做了一些事情。如果可能我希望那里是一些解释。谢谢。 所有日志都是:

A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/WechatDemo]]
    at java.util.concurrent.FutureTask.report(Unknown Source)
    at java.util.concurrent.FutureTask.get(Unknown Source)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:939)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/WechatDemo]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
    ... 6 more
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileUploadException
    at java.lang.Class.getDeclaredFields0(Native Method)
    at java.lang.Class.privateGetDeclaredFields(Unknown Source)
    at java.lang.Class.getDeclaredFields(Unknown Source)
    at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110)
    at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:262)
    at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:136)
    at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:66)
    at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:328)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:778)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5114)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 6 more
Caused by: java.lang.ClassNotFoundException: org.apache.commons.fileupload.FileUploadException
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1285)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
    ... 19 more

七月 10, 2017 8:09:40 下午 org.apache.catalina.core.ContainerBase startInternal
严重: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
    at java.util.concurrent.FutureTask.report(Unknown Source)
    at java.util.concurrent.FutureTask.get(Unknown Source)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:939)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:655)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:947)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 6 more

七月 10, 2017 8:09:40 下午 org.apache.catalina.startup.Catalina start
严重: The required Server component failed to start so Tomcat is unable to start.
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:655)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:947)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 11 more

命令输出是(在我的cmd中使用项目根词典绑定mvn依赖:tree之后):

[INFO] Scanning for projects...
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building WechatDemo 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ WechatDemo ---
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-sink-api/1.0-
alpha-10/doxia-sink-api-1.0-alpha-10.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-sink-api/1.0-a
lpha-10/doxia-sink-api-1.0-alpha-10.pom (2 KB at 0.5 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia/1.0-alpha-10/
doxia-1.0-alpha-10.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia/1.0-alpha-10/d
oxia-1.0-alpha-10.pom (9 KB at 10.8 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/reporting/maven-reporting
-api/3.0/maven-reporting-api-3.0.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/reporting/maven-reporting-
api/3.0/maven-reporting-api-3.0.pom (3 KB at 4.3 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-sink-api/1.0/
doxia-sink-api-1.0.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-sink-api/1.0/d
oxia-sink-api-1.0.pom (2 KB at 2.9 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia/1.0/doxia-1.0
.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia/1.0/doxia-1.0.
pom (10 KB at 14.7 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/10/maven-par
ent-10.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/10/maven-pare
nt-10.pom (31 KB at 27.9 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/reporting/maven-reporting
-impl/2.0.5/maven-reporting-impl-2.0.5.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/reporting/maven-reporting-
impl/2.0.5/maven-reporting-impl-2.0.5.pom (5 KB at 8.6 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-core/1.0/doxi
a-core-1.0.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-core/1.0/doxia
-core-1.0.pom (3 KB at 0.0 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.5.7/ple
xus-utils-1.5.7.pom
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.5.7/plex
us-utils-1.5.7.pom (8 KB at 1.8 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-site-renderer
/1.0/doxia-site-renderer-1.0.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-site-renderer/
1.0/doxia-site-renderer-1.0.pom (5 KB at 6.4 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-sitetools/1.0
/doxia-sitetools-1.0.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-sitetools/1.0/
doxia-sitetools-1.0.pom (10 KB at 10.9 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-i18n/1.0-beta-7
/plexus-i18n-1.0-beta-7.pom
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-i18n/1.0-beta-7/
plexus-i18n-1.0-beta-7.pom (2 KB at 2.2 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-components/1.1.
12/plexus-components-1.1.12.pom
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-components/1.1.1
2/plexus-components-1.1.12.pom (3 KB at 5.9 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-velocity/1.1.7/
plexus-velocity-1.1.7.pom
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-velocity/1.1.7/p
lexus-velocity-1.1.7.pom (2 KB at 4.2 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-container-defau
lt/1.0-alpha-20/plexus-container-default-1.0-alpha-20.pom
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-container-defaul
t/1.0-alpha-20/plexus-container-default-1.0-alpha-20.pom (3 KB at 6.2 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-containers/1.0-
alpha-20/plexus-containers-1.0-alpha-20.pom
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-containers/1.0-a
lpha-20/plexus-containers-1.0-alpha-20.pom (2 KB at 3.1 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.3/plexu
s-utils-1.3.pom
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.3/plexus
-utils-1.3.pom (2 KB at 2.2 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-classworlds/1.2
-alpha-7/plexus-classworlds-1.2-alpha-7.pom
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-classworlds/1.2-
alpha-7/plexus-classworlds-1.2-alpha-7.pom (3 KB at 4.9 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/1.0.9/plexus-1.
0.9.pom
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/1.0.9/plexus-1.0
.9.pom (8 KB at 13.4 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/velocity/velocity/1.5/velocity-
1.5.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/velocity/velocity/1.5/velocity-1
.5.pom (8 KB at 13.6 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/oro/oro/2.0.8/oro-2.0.8.pom
Downloaded: https://repo.maven.apache.org/maven2/oro/oro/2.0.8/oro-2.0.8.pom (140 B at 0.3 K
B/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-decoration-mo
del/1.0/doxia-decoration-model-1.0.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-decoration-mod
el/1.0/doxia-decoration-model-1.0.pom (4 KB at 6.4 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-module-apt/1.
0/doxia-module-apt-1.0.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-module-apt/1.0
/doxia-module-apt-1.0.pom (3 KB at 4.5 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-modules/1.0/d
oxia-modules-1.0.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-modules/1.0/do
xia-modules-1.0.pom (3 KB at 4.8 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-module-fml/1.
0/doxia-module-fml-1.0.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-module-fml/1.0
/doxia-module-fml-1.0.pom (3 KB at 5.4 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-module-xdoc/1
.0/doxia-module-xdoc-1.0.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-module-xdoc/1.
0/doxia-module-xdoc-1.0.pom (3 KB at 4.6 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-module-xhtml/
1.0/doxia-module-xhtml-1.0.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/doxia/doxia-module-xhtml/1
.0/doxia-module-xhtml-1.0.pom (2 KB at 3.4 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-doxia-tools/
1.0.2/maven-doxia-tools-1.0.2.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-doxia-tools/1
.0.2/maven-doxia-tools-1.0.2.pom (6 KB at 11.0 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-shared-compo
nents/11/maven-shared-components-11.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-shared-compon
ents/11/maven-shared-components-11.pom (9 KB at 14.1 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/commons-io/commons-io/1.4/commons-io-1.4.p
om
Downloaded: https://repo.maven.apache.org/maven2/commons-io/commons-io/1.4/commons-io-1.4.po
m (13 KB at 18.6 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/commons-validator/commons-validator/1.2.0/
commons-validator-1.2.0.pom
Downloaded: https://repo.maven.apache.org/maven2/commons-validator/commons-validator/1.2.0/c
ommons-validator-1.2.0.pom (9 KB at 15.0 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/commons-digester/commons-digester/1.6/comm
ons-digester-1.6.pom
Downloaded: https://repo.maven.apache.org/maven2/commons-digester/commons-digester/1.6/commo
ns-digester-1.6.pom (974 B at 2.2 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/commons-beanutils/commons-beanutils/1.6/co
mmons-beanutils-1.6.pom
Downloaded: https://repo.maven.apache.org/maven2/commons-beanutils/commons-beanutils/1.6/com
mons-beanutils-1.6.pom (3 KB at 5.0 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/commons-logging/commons-logging/1.0/common
s-logging-1.0.pom
Downloaded: https://repo.maven.apache.org/maven2/commons-logging/commons-logging/1.0/commons
-logging-1.0.pom (163 B at 0.4 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/commons-collections/commons-collections/2.
0/commons-collections-2.0.pom
Downloaded: https://repo.maven.apache.org/maven2/commons-collections/commons-collections/2.0
/commons-collections-2.0.pom (171 B at 0.4 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/commons-collections/commons-collections/2.
1/commons-collections-2.1.pom
Downloaded: https://repo.maven.apache.org/maven2/commons-collections/commons-collections/2.1
/commons-collections-2.1.pom (4 KB at 7.2 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/xml-apis/xml-apis/2.0.2/xml-apis-2.0.2.pom

Downloaded: https://repo.maven.apache.org/maven2/xml-apis/xml-apis/2.0.2/xml-apis-2.0.2.pom
(346 B at 0.7 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-archiver/2.3/pl
exus-archiver-2.3.pom
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-archiver/2.3/ple
xus-archiver-2.3.pom (4 KB at 7.2 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-components/1.3/
plexus-components-1.3.pom
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-components/1.3/p
lexus-components-1.3.pom (3 KB at 7.1 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/3.3/plexus-3.3.
pom
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/3.3/plexus-3.3.p
om (20 KB at 16.2 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0.10/pl
exus-utils-3.0.10.pom
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0.10/ple
xus-utils-3.0.10.pom (4 KB at 7.0 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-io/2.0.6/plexus
-io-2.0.6.pom
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-io/2.0.6/plexus-
io-2.0.6.pom (3 KB at 5.1 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-components/1.2/
plexus-components-1.2.pom
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-components/1.2/p
lexus-components-1.2.pom (3 KB at 6.8 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0.9/ple
xus-utils-3.0.9.pom
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0.9/plex
us-utils-3.0.9.pom (4 KB at 6.2 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/file-management/1.
2.1/file-management-1.2.1.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/file-management/1.2
.1/file-management-1.2.1.pom (4 KB at 6.4 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-shared-io/1.
1/maven-shared-io-1.1.pom

Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-dependency-an
alyzer/1.4/maven-dependency-analyzer-1.4.jar (27 KB at 4.2 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-common-artif
act-filters/1.4/maven-common-artifact-filters-1.4.jar
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0.9/plex
us-utils-3.0.9.jar (227 KB at 35.4 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-invoker/2.0.
11/maven-invoker-2.0.11.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-dependency-tr
ee/2.1/maven-dependency-tree-2.1.jar (59 KB at 8.4 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-common-artifa
ct-filters/1.4/maven-common-artifact-filters-1.4.jar (31 KB at 4.4 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/asm/asm/3.3.1/asm-3.3.1.jar (43 KB at 5.9 K
B/sec)
Downloaded: https://repo.maven.apache.org/maven2/org/eclipse/aether/aether-util/0.9.0.M2/aet
her-util-0.9.0.M2.jar (131 KB at 17.8 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-invoker/2.0.1
1/maven-invoker-2.0.11.jar (29 KB at 3.8 KB/sec)
[INFO] com.yi.wechat:WechatDemo:war:0.0.1-SNAPSHOT
[INFO] +- org.mybatis:mybatis-spring:jar:1.3.1:compile
[INFO] +- junit:junit:jar:4.12:compile
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:compile
[INFO] +- javax.servlet:jstl:jar:1.2:compile
[INFO] +- javax.servlet:javax.servlet-api:jar:4.0.0-b07:compile
[INFO] +- javax.servlet:servlet-api:jar:3.0-alpha-1:compile
[INFO] +- mysql:mysql-connector-java:jar:6.0.6:compile
[INFO] +- org.springframework:spring-webmvc:jar:4.3.9.RELEASE:compile
[INFO] |  +- org.springframework:spring-aop:jar:4.3.9.RELEASE:compile
[INFO] |  +- org.springframework:spring-beans:jar:4.3.9.RELEASE:compile
[INFO] |  +- org.springframework:spring-context:jar:4.3.9.RELEASE:compile
[INFO] |  +- org.springframework:spring-core:jar:4.3.9.RELEASE:compile
[INFO] |  +- org.springframework:spring-expression:jar:4.3.9.RELEASE:compile
[INFO] |  \- org.springframework:spring-web:jar:4.3.9.RELEASE:compile
[INFO] +- org.springframework:spring-jdbc:jar:4.3.9.RELEASE:compile
[INFO] |  \- org.springframework:spring-tx:jar:4.3.9.RELEASE:compile
[INFO] +- com.mchange:c3p0:jar:0.9.5.2:compile
[INFO] |  \- com.mchange:mchange-commons-java:jar:0.2.11:compile
[INFO] +- org.mybatis:mybatis:jar:3.4.4:compile
[INFO] +- org.apache.shiro:shiro-all:jar:1.4.0:compile
[INFO] |  +- org.apache.shiro:shiro-lang:jar:1.4.0:compile
[INFO] |  |  \- org.slf4j:slf4j-api:jar:1.7.21:compile
[INFO] |  +- org.apache.shiro:shiro-config-core:jar:1.4.0:compile
[INFO] |  +- org.apache.shiro:shiro-config-ogdl:jar:1.4.0:compile
[INFO] |  +- org.apache.shiro:shiro-crypto-core:jar:1.4.0:compile
[INFO] |  +- org.apache.shiro:shiro-crypto-hash:jar:1.4.0:compile
[INFO] |  +- org.apache.shiro:shiro-crypto-cipher:jar:1.4.0:compile
[INFO] |  +- org.apache.shiro:shiro-event:jar:1.4.0:compile
[INFO] |  +- org.apache.shiro:shiro-core:jar:1.4.0:compile
[INFO] |  |  \- org.apache.shiro:shiro-cache:jar:1.4.0:compile
[INFO] |  +- org.apache.shiro:shiro-web:jar:1.4.0:compile
[INFO] |  +- org.apache.shiro:shiro-aspectj:jar:1.4.0:compile
[INFO] |  |  +- org.aspectj:aspectjrt:jar:1.8.9:compile
[INFO] |  |  \- org.aspectj:aspectjweaver:jar:1.8.9:compile
[INFO] |  +- org.apache.shiro:shiro-ehcache:jar:1.4.0:compile
[INFO] |  |  \- net.sf.ehcache:ehcache-core:jar:2.6.11:compile
[INFO] |  +- org.apache.shiro:shiro-guice:jar:1.4.0:compile
[INFO] |  |  +- com.google.inject:guice:jar:3.0:compile
[INFO] |  |  |  +- javax.inject:javax.inject:jar:1:compile
[INFO] |  |  |  \- aopalliance:aopalliance:jar:1.0:compile
[INFO] |  |  \- com.google.inject.extensions:guice-multibindings:jar:3.0:compile
[INFO] |  +- org.apache.shiro:shiro-hazelcast:jar:1.4.0:compile
[INFO] |  |  \- com.hazelcast:hazelcast:jar:3.7.2:compile
[INFO] |  +- org.apache.shiro:shiro-quartz:jar:1.4.0:compile
[INFO] |  |  \- org.opensymphony.quartz:quartz:jar:1.6.1:compile
[INFO] |  \- org.apache.shiro:shiro-spring:jar:1.4.0:compile
[INFO] +- net.sf.json-lib:json-lib:jar:2.4:compile
[INFO] |  +- commons-beanutils:commons-beanutils:jar:1.8.0:compile
[INFO] |  +- commons-collections:commons-collections:jar:3.2.1:compile
[INFO] |  +- commons-lang:commons-lang:jar:2.5:compile
[INFO] |  +- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] |  \- net.sf.ezmorph:ezmorph:jar:1.0.6:compile
[INFO] \- commons-fileupload:commons-fileupload:jar:1.3.3:compile
[INFO]    \- commons-io:commons-io:jar:2.2:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:17 min
[INFO] Finished at: 2017-07-10T22:00:57+08:00
[INFO] Final Memory: 12M/29M
[INFO] ------------------------------------------------------------------------

1 个答案:

答案 0 :(得分:0)

显然没有找到以下某些类: -

    org/apache/commons/fileupload/FileUploadException

您必须将此库包含在项目依赖库文件夹中。

  1. 从官方网站获取“commons-fileupload.jar” - http://commons.apache.org/fileupload/

  2. 从Maven存储库获取“commons-fileupload.jar”

    <dependency>
       <groupId>commons-fileupload</groupId>
          <artifactId>commons-fileupload</artifactId>
       <version>1.2.1</version>
     </dependency>
    
  3. 您需要将commons-fileupload.jar和commons-io.jar放到WEB-INF / lib forlder中。在构建期间使用Classpath,但它们也必须在运行时可用。

    实际上,如果您已经使用IDE进行Java EE开发(比如Eclipse),那么将这些Jars放到WEB-INF / lib就足够了,因为它们会在构建的claspath中自动显示。