You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by "David Evans (JIRA)" <ji...@apache.org> on 2006/04/24 22:40:09 UTC

[jira] Closed: (STR-1937) WebLogic hot-deploy breaks Tiles

     [ http://issues.apache.org/struts/browse/STR-1937?page=all ]
     
David Evans closed STR-1937:
----------------------------

    Resolution: Fixed

> WebLogic hot-deploy breaks Tiles
> --------------------------------
>
>          Key: STR-1937
>          URL: http://issues.apache.org/struts/browse/STR-1937
>      Project: Struts Action 1
>         Type: Bug

>   Components: Tiles
>     Versions: 1.1 Final
>  Environment: Operating System: other
> Platform: All
>     Reporter: Renaud Waldura
>     Assignee: David Evans
>      Fix For: 1.2 Family
>  Attachments: ModuleConfig.diff, ModuleUtils.diff, PlugIn.diff, RedeployableActionServlet.java, RedeployableActionServlet.java, RequestProcessor.diff, TilesPlugin.diff, TilesRequestProcessor.diff, WebLogicRedeployableActionServlet.java
>
> 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>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org