commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Priest <Robert.Pri...@bentley.com>
Subject Fileupload :Conflict with log4j-1.2.3.jar and commons-beanutils.j ar
Date Mon, 07 Apr 2003 20:18:16 GMT
For those who are interested:


I have found some sort of conflict with log4j-1.2.3.jar and using
commons-beanutils.jar for the fileupload project.

I found this while debugging another problem I had with jsp compilation. But
here is what I have found:


2. My jsp page, which uploads a file using the commons-fileupload project
(http://jakarta.apache.org/commons/fileupload/), uses commons-beanutils.jar.
That jar was placed in the webapps lib dir (webapps\uploadfile\WEB-INF\lib).
But there was some sort of conflict with my log4j-1.2.3.jar in my common\lib
directory. For some reason, I would get a generic ServletException (without
any info) when trying to upload the file.

To get around this, I had to move the common-beanutils.jar to the
\common\lib dir.
It seems as though something in log4j-1.2.3.jar was stepping on something in
the commons-beanutils.jar

I have not, as of yet, found out exactly what that is. But from a little
investigation, I have found that the error "occurs", when the folllowing
lines of code are executed in the org.apache.commons.fileupload.FileUpload
file  (in method: protected Method getNewInstanceMethod()):

Method newInstanceMethod = MethodUtils.getAccessibleMethod(
                fileItemClass, "newInstance", parameterTypes);


If anyone attempting to use the fileupload project has seen anything
similar, I would be interested if you have found out anything more that I
currently know.




Mime
View raw message