You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Hensley, Richard" <Ri...@McKesson.com> on 2005/06/17 18:59:25 UTC

RE: NotSerializableException: DelegatingPropertySource ( WebLogic)

Either your visit is not serializable, or a persistent property is not
serializable. Generally, web containers serialize attributes of a session
when they start transporting the sessions around in clusters.

Richard 

-----Original Message-----
From: Werner Lehmann [mailto:lehmann@media-interactive.de] 
Sent: Friday, June 17, 2005 9:54 AM
To: Tapestry users
Subject: NotSerializableException: DelegatingPropertySource (WebLogic)

Hi,

does anyone have a clue why WebLogic 8.1 SP2 throws this error? I have a 
Tapestry 3.0.3 application running on it and if I "hammer" the app with 
two continuously running wgets I receive exceptions like below eventually:

> ####<16.06.2005 15.10 Uhr CEST> <Error> <HTTP> <miraculix> <MintManaged>
<ExecuteThread: '12' for queue: 'weblogic.kernel.Default'> <<anonymous>> <>
<BEA-101309> <[ServletContext(id=27529215,name=mymint,context-path=/mymint)]
could not deserialize the context attribute
"org.apache.tapestry.PropertySource:MyMint"
> java.io.NotSerializableException:
org.apache.tapestry.util.DelegatingPropertySource
> 	at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
> 	at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
> 	at
weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:9
5)
> 	at
weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:6
7)
> 	at
weblogic.servlet.internal.WebAppServletContext.getAttribute(WebAppServletCon
text.java:637)
> 	at
org.apache.tapestry.engine.AbstractEngine.setupForRequest(AbstractEngine.jav
a:1278)
> 	at
org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:841)
> 	at
org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:198
)
> 	at
org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:159)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 	at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
tStubImpl.java:1053)
> 	at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:387)
> 	at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
> 	at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
> 	at
org.apache.tapestry.RedirectFilter.doFilter(RedirectFilter.java:106)
> 	at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
> 	at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
ebAppServletContext.java:6316)
> 	at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
t.java:317)
> 	at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
> 	at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:3622)
> 	at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2569)
> 	at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
> 	at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)

When this happens, most of the time it is followed by other very similar 
call stacks with just other Tapestry classes, e.g.

> java.io.NotSerializableException:
org.apache.tapestry.enhance.DefaultComponentClassEnhancer
> java.io.NotSerializableException: org.apache.tapestry.util.pool.Pool
> java.io.NotSerializableException:
org.apache.tapestry.engine.DefaultTemplateSource
> java.io.NotSerializableException: org.apache.tapestry.pageload.PageSource

among others. These classes are not serializable (at least, 
DelegatingPropertySource is not, it does not even implement the interface).

Also strange: it complains about not being able to "deserialize the 
context attribute" (as in the trace above). Hence _serializing_ was not 
a problem for it?

Might this be related to this fix in WebLogic 8.1 SP5?

CR189815:
http://e-docs.bea.com/wls/docs81/notes/resolved_sp05.html#1864954

> If any change was made in the HttpServletContext that extends
> ActionForm in Struts framework, WebLogic Server was throwing a
> ClassCastException while accessing it.
> 
> Now, when the servlet is reloaded, any non-serializable attribute
> (stored in HttpServletContext) that is loaded using the servlet or
> its child classes is removed from HttpServletContext. As a result,
> the WebLogic Server no longer throws a ClassCastException while
> accessing HttpServletContext.


Regards
Werner

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


RE: NotSerializableException: DelegatingPropertySource ( WebLogic)

Posted by Patrick Casey <pa...@adelphia.net>.
	If I recall, Weblogic has an option to push the servlet context
around in a clustered environment. Here's the doc snippet I dug up:

The J2EE Servlet specification (versions 2.2, 2.3, and 2.4) states that the
servlet context should not be shared across the cluster. WebLogic Server
implements this specification as stated. Non-clustered applications that
rely on the servlet context as a singleton data structure will have porting
issues when moving to a clustered environment. Coherence*Web does support
the option of a clustered context, though generally it should be the goal of
all development teams to ensure that their applications follow the J2EE
specifications.

	--- Pat

> -----Original Message-----
> From: Howard Lewis Ship [mailto:hlship@gmail.com]
> Sent: Friday, June 17, 2005 11:13 AM
> To: Tapestry users
> Subject: Re: NotSerializableException: DelegatingPropertySource (
> WebLogic)
> 
> Strange that WebLogic is trying to serialize or de-serialize the
> contents of the ServletContext.  That's not supposed to happen and
> Tapestry isn't prepared for it.
> 
> On 6/17/05, Hensley, Richard <Ri...@mckesson.com> wrote:
> > Either your visit is not serializable, or a persistent property is not
> > serializable. Generally, web containers serialize attributes of a
> session
> > when they start transporting the sessions around in clusters.
> >
> > Richard
> >
> > -----Original Message-----
> > From: Werner Lehmann [mailto:lehmann@media-interactive.de]
> > Sent: Friday, June 17, 2005 9:54 AM
> > To: Tapestry users
> > Subject: NotSerializableException: DelegatingPropertySource (WebLogic)
> >
> > Hi,
> >
> > does anyone have a clue why WebLogic 8.1 SP2 throws this error? I have a
> > Tapestry 3.0.3 application running on it and if I "hammer" the app with
> > two continuously running wgets I receive exceptions like below
> eventually:
> >
> > > ####<16.06.2005 15.10 Uhr CEST> <Error> <HTTP> <miraculix>
> <MintManaged>
> > <ExecuteThread: '12' for queue: 'weblogic.kernel.Default'> <<anonymous>>
> <>
> > <BEA-101309> <[ServletContext(id=27529215,name=mymint,context-
> path=/mymint)]
> > could not deserialize the context attribute
> > "org.apache.tapestry.PropertySource:MyMint"
> > > java.io.NotSerializableException:
> > org.apache.tapestry.util.DelegatingPropertySource
> > >       at
> > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
> > >       at
> > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
> > >       at
> >
> weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java
> :9
> > 5)
> > >       at
> >
> weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java
> :6
> > 7)
> > >       at
> >
> weblogic.servlet.internal.WebAppServletContext.getAttribute(WebAppServletC
> on
> > text.java:637)
> > >       at
> >
> org.apache.tapestry.engine.AbstractEngine.setupForRequest(AbstractEngine.j
> av
> > a:1278)
> > >       at
> >
> org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:841)
> > >       at
> >
> org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:1
> 98
> > )
> > >       at
> >
> org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:159)
> > >       at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> > >       at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > >       at
> >
> weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Serv
> le
> > tStubImpl.java:1053)
> > >       at
> >
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.ja
> va
> > :387)
> > >       at
> weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
> > >       at
> >
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27
> )
> > >       at
> > org.apache.tapestry.RedirectFilter.doFilter(RedirectFilter.java:106)
> > >       at
> >
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27
> )
> > >       at
> >
> weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run
> (W
> > ebAppServletContext.java:6316)
> > >       at
> >
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubj
> ec
> > t.java:317)
> > >       at
> >
> weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
> > >       at
> >
> weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServlet
> Co
> > ntext.java:3622)
> > >       at
> >
> weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.ja
> va
> > :2569)
> > >       at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
> > >       at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
> >
> > When this happens, most of the time it is followed by other very similar
> > call stacks with just other Tapestry classes, e.g.
> >
> > > java.io.NotSerializableException:
> > org.apache.tapestry.enhance.DefaultComponentClassEnhancer
> > > java.io.NotSerializableException: org.apache.tapestry.util.pool.Pool
> > > java.io.NotSerializableException:
> > org.apache.tapestry.engine.DefaultTemplateSource
> > > java.io.NotSerializableException:
> org.apache.tapestry.pageload.PageSource
> >
> > among others. These classes are not serializable (at least,
> > DelegatingPropertySource is not, it does not even implement the
> interface).
> >
> > Also strange: it complains about not being able to "deserialize the
> > context attribute" (as in the trace above). Hence _serializing_ was not
> > a problem for it?
> >
> > Might this be related to this fix in WebLogic 8.1 SP5?
> >
> > CR189815:
> > http://e-docs.bea.com/wls/docs81/notes/resolved_sp05.html#1864954
> >
> > > If any change was made in the HttpServletContext that extends
> > > ActionForm in Struts framework, WebLogic Server was throwing a
> > > ClassCastException while accessing it.
> > >
> > > Now, when the servlet is reloaded, any non-serializable attribute
> > > (stored in HttpServletContext) that is loaded using the servlet or
> > > its child classes is removed from HttpServletContext. As a result,
> > > the WebLogic Server no longer throws a ClassCastException while
> > > accessing HttpServletContext.
> >
> >
> > Regards
> > Werner
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
> 
> 
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
> 
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: NotSerializableException: DelegatingPropertySource ( WebLogic)

Posted by Howard Lewis Ship <hl...@gmail.com>.
Strange that WebLogic is trying to serialize or de-serialize the
contents of the ServletContext.  That's not supposed to happen and
Tapestry isn't prepared for it.

On 6/17/05, Hensley, Richard <Ri...@mckesson.com> wrote:
> Either your visit is not serializable, or a persistent property is not
> serializable. Generally, web containers serialize attributes of a session
> when they start transporting the sessions around in clusters.
> 
> Richard
> 
> -----Original Message-----
> From: Werner Lehmann [mailto:lehmann@media-interactive.de]
> Sent: Friday, June 17, 2005 9:54 AM
> To: Tapestry users
> Subject: NotSerializableException: DelegatingPropertySource (WebLogic)
> 
> Hi,
> 
> does anyone have a clue why WebLogic 8.1 SP2 throws this error? I have a
> Tapestry 3.0.3 application running on it and if I "hammer" the app with
> two continuously running wgets I receive exceptions like below eventually:
> 
> > ####<16.06.2005 15.10 Uhr CEST> <Error> <HTTP> <miraculix> <MintManaged>
> <ExecuteThread: '12' for queue: 'weblogic.kernel.Default'> <<anonymous>> <>
> <BEA-101309> <[ServletContext(id=27529215,name=mymint,context-path=/mymint)]
> could not deserialize the context attribute
> "org.apache.tapestry.PropertySource:MyMint"
> > java.io.NotSerializableException:
> org.apache.tapestry.util.DelegatingPropertySource
> >       at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
> >       at
> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
> >       at
> weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:9
> 5)
> >       at
> weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:6
> 7)
> >       at
> weblogic.servlet.internal.WebAppServletContext.getAttribute(WebAppServletCon
> text.java:637)
> >       at
> org.apache.tapestry.engine.AbstractEngine.setupForRequest(AbstractEngine.jav
> a:1278)
> >       at
> org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:841)
> >       at
> org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:198
> )
> >       at
> org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:159)
> >       at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> >       at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >       at
> weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
> tStubImpl.java:1053)
> >       at
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> :387)
> >       at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
> >       at
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
> >       at
> org.apache.tapestry.RedirectFilter.doFilter(RedirectFilter.java:106)
> >       at
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
> >       at
> weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
> ebAppServletContext.java:6316)
> >       at
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
> t.java:317)
> >       at
> weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
> >       at
> weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
> ntext.java:3622)
> >       at
> weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
> :2569)
> >       at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
> >       at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
> 
> When this happens, most of the time it is followed by other very similar
> call stacks with just other Tapestry classes, e.g.
> 
> > java.io.NotSerializableException:
> org.apache.tapestry.enhance.DefaultComponentClassEnhancer
> > java.io.NotSerializableException: org.apache.tapestry.util.pool.Pool
> > java.io.NotSerializableException:
> org.apache.tapestry.engine.DefaultTemplateSource
> > java.io.NotSerializableException: org.apache.tapestry.pageload.PageSource
> 
> among others. These classes are not serializable (at least,
> DelegatingPropertySource is not, it does not even implement the interface).
> 
> Also strange: it complains about not being able to "deserialize the
> context attribute" (as in the trace above). Hence _serializing_ was not
> a problem for it?
> 
> Might this be related to this fix in WebLogic 8.1 SP5?
> 
> CR189815:
> http://e-docs.bea.com/wls/docs81/notes/resolved_sp05.html#1864954
> 
> > If any change was made in the HttpServletContext that extends
> > ActionForm in Struts framework, WebLogic Server was throwing a
> > ClassCastException while accessing it.
> >
> > Now, when the servlet is reloaded, any non-serializable attribute
> > (stored in HttpServletContext) that is loaded using the servlet or
> > its child classes is removed from HttpServletContext. As a result,
> > the WebLogic Server no longer throws a ClassCastException while
> > accessing HttpServletContext.
> 
> 
> Regards
> Werner
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org