On Mar 15, 2011, at 1:15 PM, Martin Hejl wrote: > Hi Kevan, > > Probably I'm doing something wrong - but I'm seeing the same effect. > > Here's what I did: > • create a simple Dynamic Web Project (jsp file containing the form > definition, and a servlet that the form-action points to > • add commons-fileupload.jar and commons-io.jar to > WebContent/WEB-INF/lib/ > • Deploy
Hi Martin, I expect the problem is being caused because fileupload/io classes are being loaded from a parent classloader. Try deploying your application with a deployment plan. Something like the following: <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1" xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1" xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1"> <dep:environment> <dep:moduleId> <dep:groupId>org.mygroup</dep:groupId> <dep:artifactId>MyApp</dep:artifactId> <dep:version>1.1</dep:version> <dep:type>car</dep:type> </dep:moduleId> <!-- Don't load commons-io or fileupload from parent classloaders --> <dep:hidden-classes> <dep:filter>org.apache.commons.io</dep:filter> <dep:filter>org.apache.commons.fileupload</dep:filter> </dep:hidden-classes> <dep:inverse-classloading/> </dep:environment> <web:context-root>/MyApp</web:context-root> </web-app> Save to a file (e.g. mydeploymentplan.xml) and deploy your application: ./deploy.sh deploy myapp.war mydeploymentplan.xml If that doesn't fix your problem, create a Jira and attach a test WAR that will demonstrate the problem. --kevan
