I've been trying to get Struts to work on weblogic for many days with little
success because of the failures of Weblogic's part.  Finally tried to deploy
and use it on Weblogic 6.0 Beta 2 and noticed some interesting behavior.  It
deployed fine but when I tried to run the example application I started
getting errors saying that Weblogic could not deserialize the context
attribute (see exact errors at end of mail)  It appears that Weblogic
requires any object that you use as a context attribute on a JSP page must
be serializable.  I went through some of the Struts source and it's trying
to use objects which aren't serializable as JSP page context attributes.
This looks like it may be a shortcoming in the JSP spec because it makes
sense that to support to failover of sessions you would need to be able to
serialize the attributes since the attributes of a PageContext may have the
scope of an entire session.  This is a bug that probably will show up on
many different App Servers that support the failover of Sessions not just
Weblogic and should probably be addressed in Struts even though it hasn't
been directly addressed by the JSP 1.1 or 1.2 specs

<Nov 30, 2000 1:19:37 PM PST> <Error> <HTTP>
<[WebAppServletContext(6802820,struts-example)] Could not deserialize
context attribute ava.io.NotSerializableException:
org.apache.struts.util.MessageResources
        at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)
        at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
        at
java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1841)
        at
java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:480)
        at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1214)
        at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
        at
weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:7
1)
        at
weblogic.servlet.internal.WebAppServletContext.getAttribute(WebAppServletCon
text.java
:207)
        at
weblogic.servlet.jsp.PageContextImpl.getAttribute(PageContextImpl.java:164)
        at
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:230)
        at jsp_servlet._index._jspService(_index.java:105)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:208)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:244)
        at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.jav
a:1107)
        at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:1482)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>

-Matt

Reply via email to