Skip to main content

[webtier] Re: and "setAttribute: Non-serializable attribute"-Exception

1 reply [Last post]
Anonymous

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Jan Luehe

On 10/15/08 04:32 AM, glassfish@javadesktop.org wrote:
> Hi,
>
> I was trying to make my webapp distributable by inserting the tag into web.xml. I need this, because I want to run my app inside a glassfish cluster and sun webserver7 loadbalancer.
>
> But, when deploying the app i get the Exception below for every request. And its very hard (at least for me) to get a clue, which componenet is producing the error.
> I know that some compenent is causing the error, where a part of it should be serialzed and put into session context (and then eg. could be moved to another cluster instance).
>
> But, as I said, it's hard to read the stacktrace to find out which component does not serialze (implement Serialzable).
>
> Any help appreciated!
>
> Here's the stacktrace:
>

The behaviour you are seeing (container throwing
IllegalArgumentException) is mandated by the Servlet Spec
(See the chapter on Distributed Environments).

I agree the IllegalArgumentException should include the name of the
offending session attribute.

I just committed the necessary changes to GlassFish v3 (trunk). Is that
the GlassFish release you are
using?

Please send any follow-up questions, or any questions on the GlassFish
webtier in general, to webtier@glassfish.dev.java.net, or post them to the
GlassFish webtier forum at
http://forums.java.net/jive/forum.jspa?forumID=138

Thanks!

Jan

> [code]
> [#|2008-10-15T05:05:11.172-0500|SEVERE|sun-appserver9.1|facelets.viewhandler|_ThreadID=20;_ThreadName=httpSSLWorkerThread-1110-1;_RequestID=90817703-2abd-4181-a6c6-3
> f0435785041;|Error Rendering View[/index.xhtml]
> java.lang.IllegalArgumentException: PWC2788: setAttribute: Non-serializable attribute
> at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1639)
> at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:179)
> at com.sun.faces.context.SessionMap.put(ExternalContextImpl.java:972)
> at org.springframework.web.context.request.FacesRequestAttributes.setAttribute(FacesRequestAttributes.java:108)
> at org.springframework.web.context.request.AbstractRequestAttributesScope.get(AbstractRequestAttributesScope.java:44)
> at org.springframework.web.context.request.SessionScope.get(SessionScope.java:90)
> at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
> at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
> at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
> at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:881)
> at org.springframework.web.jsf.DelegatingVariableResolver.resolveSpringBean(DelegatingVariableResolver.java:142)
> at org.springframework.web.jsf.DelegatingVariableResolver.resolveVariable(DelegatingVariableResolver.java:109)
> at com.sun.faces.el.VariableResolverChainWrapper.getValue(VariableResolverChainWrapper.java:100)
> at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175)
> at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
> at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:86)
> at com.sun.el.parser.AstValue.getValue(AstValue.java:127)
> at com.sun.el.parser.AstNot.getValue(AstNot.java:59)
> at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:206)
> at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
> at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:370)
> at javax.faces.component.UIComponent.encodeAll(UIComponent.java:880)
> at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
> at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
> at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
> at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:189)
> at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
> at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
> at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
> at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
> at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:147)
> at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:256)
> at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:362)
> at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:488)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
> at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:869)
> at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:719)
> at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:558)
> at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:490)
> at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:382)
> at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:783)
> at org.apache.jsp.index_jsp._jspService(index_jsp.java from :55)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:109)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
> at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:389)
> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:486)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:380)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
> at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
> at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:359)
> at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
> at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
> at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
> at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
> at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
> at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
> at org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:109)
> at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
> at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
> at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
> at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
> at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
> at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:268)
> at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
> at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
> at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:87)
> at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
> at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
> at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
> at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
> at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
> at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:174)
> at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:183)
> at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:138)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
> at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:313)
> at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
> at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
> at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288)
> at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)
> at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:579)
> at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:831)
> at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
> at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
> at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
> at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
> at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
> at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
> [/code]
>
> Thanks in advance,
> callist79
> [Message sent by forum member 'callisto79' (callisto79)]
>
> http://forums.java.net/jive/thread.jspa?messageID=307397
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net