|
Problem |
Servlet hangs during file upload for a multipart request
which returns error "cannot find class file" in the logs. |
|
Cause |
The servlet expected the class to reside in the
web-inf/lib directory but the EAR path for the Web module classes
were set to the web-inf/classes path. |
|
Solution |
In a deployed application, the servlet hangs when it
reaches code for a multipart request. The static pages can still be
accessed. The appserver logs indicate the servlet is unable to find the
class file. The class that the servlet needs is the
"com.oreilly.servlet.MultipartRequest.class". The servlet works fine with
Tomcat and IBM® HTTP Server 1.3.19.x.
When the class files were copied from the web-inf/lib directory
to the web-inf/classes directory the servlet now works, but
the intent was to keep the static class modules and the dynamic class
modules separate. WebSphere® Studio packages the WAR file and points the
classes to the lib directory, but that path does not carry over
into WebSphere Application Server.
The solution is to manually change the path to the EAR file in the AAT
tool.
Click on the "General" tab, then in the "classpath" field enter in the
path for the root of the EAR file /ear/web-inf/lib directory and
this resolved the problem.
This is further documented in the WebSphere Application Server V4.0 Information Center,
section 6.6.8.0.aa "Assembly properties for Web modules". |
|
|
|
|
|
|