beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Jantz (JIRA)" <...@beehive.apache.org>
Subject [jira] Reopened: (BEEHIVE-878) NetUI fails webapp redeploy if ServletContext attributes are carried over
Date Thu, 25 Aug 2005 23:02:09 GMT
     [ http://issues.apache.org/jira/browse/BEEHIVE-878?page=all ]
     
Nathan Jantz reopened BEEHIVE-878:
----------------------------------


When attempting the repro, the webapp now does redeploy without an IllegalStateException,
however it doesn't look like all the attributes are being persisted/restored properly,  rather
the following new stack trace is output to the console:

INFO: Reloading this Context has started
*** # of attributes to persist: 22
*** persisting attribute _netui:annCache
*** persisting attribute _netui:_handlers
*** persisting attribute org.apache.catalina.WELCOME_FILES
*** persisting attribute org.apache.struts.action.REQUEST_PROCESSOR
java.io.NotSerializableException: org.apache.beehive.netui.pageflow.PageFlowRequ
estProcessor$PageServletFilter
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)

        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java
:1369)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:13
41)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.jav
a:1284)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)

        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
        at test.MyListener.contextDestroyed(MyListener.java:65)
        at org.apache.catalina.core.StandardContext.listenerStop(StandardContext
.java:3846)
        at org.apache.catalina.core.StandardContext.stop(StandardContext.java:44
78)
        at org.apache.catalina.core.StandardContext.reload(StandardContext.java:
3015)
        at org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java
:1014)
        at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:
330)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:237)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:214)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)

<snip>

*** # of attributes to restore: 22
*** restoring attribute _netui:annCache
*** restoring attribute _netui:_handlers
*** restoring attribute org.apache.catalina.WELCOME_FILES
java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException
: org.apache.beehive.netui.pageflow.PageFlowRequestProcessor$PageServletFilter
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1303)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:19
12)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)

        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1
713)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
        at test.MyListener.contextInitialized(MyListener.java:26)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
t.java:3805)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
321)
        at org.apache.catalina.core.StandardContext.reload(StandardContext.java:
3021)
        at org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java
:1014)
        at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:
330)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:237)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:157)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:214)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
        at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
ContextValve.java:198)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:152)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
torBase.java:540)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:102)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:137)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:117)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:102)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:520)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:16
0)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:793)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:702)
        at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:571)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:644)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.NotSerializableException: org.apache.beehive.netui.pageflow.P
ageFlowRequestProcessor$PageServletFilter

<snip>






> NetUI fails webapp redeploy if ServletContext attributes are carried over
> -------------------------------------------------------------------------
>
>          Key: BEEHIVE-878
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-878
>      Project: Beehive
>         Type: Bug
>   Components: NetUI
>     Versions: v1m1
>  Environment: Tomcat 5.0.28
>     Reporter: Rich Feit
>     Assignee: Nathan Jantz
>      Fix For: V1
>  Attachments: MyListener.class, MyListener.java
>
> The attached webapp has a Servlet context listener which persists all Serializable attributes
to a file when the context is destroyed, and restores those attributes when a new context
is created.  This allows context attributes to be carried across webapp redeploys, which is
possibly default behavior under other Servlet containers (the spec doesn't speak to this).
> Repro:
>     - Create a NetUI-enabled webapp.
>     - Drop the attached MyListener.class into WEB-INF/classes (I've also attached MyListener.java,
just for reference).
>     - Insert the following entry in web.xml, after the last <filter-mapping> element:
>         <listener>
>             <listener-class>test.MyListener</listener-class>
>         </listener>
>     - Deploy the webapp, then redeploy it.  One way to do this in the beehive tree is:
>         ant -f {beehive home}/ant/tomcat-imports.xml redeploy -Dcontext.path={your webapp
context path} -Dwebapp.dir={your webapp dir} -Dcatalina.username=manager -Dcatalina.password=manager
> EXPECTED: the webapp is redeployed, and runs fine:
> ACTUAL: the webapp deployment fails, with the following error in the logs:
> java.lang.IllegalStateException: The NetUI runtime could not find the default config
file.  The webapp may not function properly.
> 	at org.apache.beehive.netui.util.config.ConfigUtil.getConfig(ConfigUtil.java:180)
> 	at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.setupModuleConfigLocators(AutoRegisterActionServlet.java:115)
> 	at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.init(AutoRegisterActionServlet.java:99)
> 	at org.apache.beehive.netui.pageflow.PageFlowActionServlet.init(PageFlowActionServlet.java:138)
> 	at javax.servlet.GenericServlet.init(GenericServlet.java:211)
> 	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029)
> 	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
> 	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013)
> 	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)
> 	at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3043)
> 	at org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java:1014)
> 	at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:330)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
> 	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> 	at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
> 	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
> 	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
> 	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
> 	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> 	at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
> 	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
> 	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
> 	at java.lang.Thread.run(Thread.java:595)

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


Mime
View raw message