What happened to community addiction? Fileupload?

I am trying to use the commons-fileupload module, including its dependency in pom.xml. However, when loading, there is no problem starting the web application, this causes the "NoClassDefFound" error:

java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItemFactory

Here is my pom.xml config:

<dependency>
        <groupId>commons-fileupload</groupId>
        <artifactId>commons-fileupload</artifactId>
        <version>1.2.1</version>
</dependency>
<dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-io</artifactId>
        <version>1.3.2</version>
</dependency>

In addition, I have included the following configuration in applicationContext.xml:

<bean id="multipartResolver"
        class="org.springframework.web.multipart.commons.CommonsMultipartResolver"/>

I wonder what I'm doing wrong here?

+3
source share
1 answer

Look in the deployed web application to see if a JAR file is present. (It should be located in the webapp directory WEB-INF / lib.) If it is missing, check the contents of the WAR WAR and then the maven sandbox that you used to create it.

( WAR, , , .)

+2

All Articles