|
Problem(Abstract) |
Applications larger than 250 MB fail to deploy with a
MaxLengthExceededException. |
|
|
|
Cause |
Applications larger than 250 MB fail to deploy. A
restriction on the application size is imposed to avoid security attacks
on the administrative console. For example, an unauthorized user who gains
access to the console configurator role might try to deploy large
applications in an attempt to disable WebSphere® Application Server. The
application size restriction is meant to prevent this type of threat.
Exception in the SystemOut.log file.
[8/23/04 14:34:06:011 EDT] 621c8fa3 WebGroup E SRVE0026E:
[Servlet
Error]-[Problem while reading request: The maximum length of
262144000
bytes has been exceeded]:
org.apache.struts.upload.MaxLengthExceededException: The maximum
length
of 262144000 bytes has been exceeded at
org.apache.struts.upload.BufferedMultipartInputStream.<init>(BufferedMultipartInputStream.java:86)
at
com.ibm.ws.console.core.upload.MultipartIterator.parseRequest(MultipartIterator.java:321)
at
com.ibm.ws.console.core.upload.MultipartIterator.<init>(MultipartIterator.java:160)
at
com.ibm.ws.console.core.upload.DiskMultipartRequestHandler.handleRequest
(DiskMultipartRequestHandler.java:72)
at
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:739)
at
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:2065)
|
|
|
Resolving the
problem |
To configure the maximum application size, follow these
steps.
For WebSphere Application Server 5.0 and 5.1:
- Edit the web.xml file, which is located at:
Install_Root \config\cells\cellName\applications\adminconsole.ear
\deployments\adminconsole\adminconsole.war\WEB-INF\
- Add the following init parameter to the action servlet as follows. The
maxFileSize value can be determined based on the size of the application
to be installed; in this case it is 500 MB.
<init-param id="InitParam_1037062316924">
<param-name> maxFileSize </param-name>
<param-value> 500M </param-value>
</init-param>
This init parameter can be added after the
org.apache.struts.tiles.ActionComponentServlet.
For example:
<servlet id="Servlet_1037062312313">
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.tiles.ActionComponentServlet</servlet-class>
<init-param id="InitParam_1037062316924">
<param-name> maxFileSize </param-name>
<param-value> 500M </param-value>
</init-param>
The value of maxFileSize can be represented in bytes by not appending any
characters to the end. For kilobytes, append a "K". For megabytes, append
an "M" and for gigabytes append a "G".
- Restart the Application Server.
- Redeploy the application.
For WebSphere Application Server 6.0 and 6.1
To enable installation of an application larger than 250 MB, follow these
steps:
- Stop the server.
- Open in editor file: 6.0.x
Was60-root/SystemApps/adminconsole.ear/adminconsole.war/WEB-INF/web.xml
- Open in editor file: 6.1.x
Was61-root/systemApps/isclite.ear/isclite.war/WEB-INF/web.xml
- Add the init paramenter to the action servlet:
Modify:
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
To:
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param id="InitParam_1037062312313">
<param-name>maxFileSize</param-name>
<param-value>500M</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
- Restart the Application Server.
- Deploy the application.
|
|
|
|
|
Cross Reference information |
Segment |
Product |
Component |
Platform |
Version |
Edition |
Application Servers |
Runtimes for Java Technology |
Java SDK |
|
|
|
|
|
|