You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2004/01/21 22:03:54 UTC
DO NOT REPLY [Bug 26322] New: -
WebLogic hot-deploy breaks Tiles; TilesRequestProcessor is not serializable
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26322>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26322
WebLogic hot-deploy breaks Tiles; TilesRequestProcessor is not serializable
Summary: WebLogic hot-deploy breaks Tiles; TilesRequestProcessor
is not serializable
Product: Struts
Version: 1.1 Final
Platform: All
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Tiles framework
AssignedTo: struts-dev@jakarta.apache.org
ReportedBy: renaud+apache@waldura.com
Please refer to the following documents for background information about this
issue:
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg53294.html
http://marc.theaimsgroup.com/?l=struts-user&m=105203952331713
http://marc.theaimsgroup.com/?l=struts-user&m=105188532730261
http://marc.theaimsgroup.com/?l=struts-user&m=105268268519113
To summarize: WebLogic (at least v6 and v7) attempts to serialize the
TilesRequestProcessor when re-deploying the Webapp in development mode. The
TilesRequestProcessor is not serializable, and loses the Tiles definitions.
This results in NullPointerException and/or NotSerializableException when using
the app after automatic redeploy.
This bug report proposes a workaround for this problem, in the hope it will
help others and maybe motivate an actual fix.
The attached class extends the Struts Action servlet and fixes the problem by
reloading the Tiles definitions when they have disappeared.
/**
* In development mode, WebLogic 7.0 automatically redeploys servlets by
creating a new classloader,
* then propagates the servlet context to the new servlet classes by
serializing it.
* For some reason unknown to
* me, this serialization operation drops the Tiles definitions. The re-
deployed servlets fail
* with a NPE when looking up any Tiles definition. This basically breaks
automatic redeployment.
* <p>
* This class works around this issue by detecting when the request processor
(which holds the
* Tiles definitions) was serialized, and re-creating a new instance when that
is the case.
* The Tiles defs are then reloaded as well. This should only happen when the
servlet context
* was serialized, ie. servlets were redeployed.
*
* @author Renaud Waldura
*/
--- web.xml ---
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>com.aravo.framework.ui.struts.action.WebLogicRedeployableActi
onServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>0</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org