1 Reply Latest reply on Mar 23, 2009 1:46 PM by Nick Belaevski

    RenderPhase*Visitor: SerializationException

    Alex Kim Newbie

      We have an application that runs in a Weblogic 9.2 distributed environment. The structure of the application is a general EAR format. We currently are developing a portion of the application using Spring 2.5.6, Spring Webflow 2.0.3, Spring Faces, Facelets 1.1.14, and RichFaces 3.3.0GA. We are currently using the Rich Datatable and Rich Datascroller on one of the new pages and are getting the following stack traces to our logs once deployed to a distributed environment (note, this does not happen in our local, RND or Dev Integration environments as they are not distributed):

      <BEA-101362> could not deserialize the servlet-context scoped attribute with name: "org.richfaces.util.RenderPhaseComponentVisitorUtils"

      java.io.NotSerializableException: org.ajax4jsf.component.RenderPhaseUIDataAdaptorVisitor

      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)

      at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)

      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)

      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)

      at weblogic.common.internal.PassivationUtils.toByteArray(PassivationUtils.java:33)

      Truncated. see log file for complete stacktrace

      >

      <BEA-101362> could not deserialize the servlet-context scoped attribute with name: "org.richfaces.util.RenderPhaseComponentVisitorUtils"

      java.io.NotSerializableException: org.ajax4jsf.component.RenderPhaseUIDataAdaptorVisitor

      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)

      at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)

      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)

      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)

      at weblogic.common.internal.PassivationUtils.toByteArray(PassivationUtils.java:33)

      Truncated. see log file for complete stacktrace

      >

      These errors tend to show up after each deployment or restart of the environment. We cannot specifically click on anything to make them happen and they seem to occur 4 times in a row every 15 seconds and then quits after about 2 hours all of the sudden.

      The objects complained about are loaded into the application level map using the MvcExternalContext (more specifically the ServletExternalContext) when the page is first accessed. The following RichFaces RenderPhaseComponentVisitorUtils static class method is called in this case to store the objects in question on the applicationMap:

      public static RenderPhaseComponentVisitor[] getVisitors(FacesContext context) {
      Map<String, Object> applicationMap = context.getExternalContext().getApplicationMap();
      RenderPhaseComponentVisitor[] visitors;
      synchronized(applicationMap) {
      visitors = (RenderPhaseComponentVisitor[])applicationMap.get(KEY);
      if (visitors == null) {
      visitors = init();
      applicationMap.put(KEY, visitors);
      }
      }
      return visitors;
      }


      If anyone has any insight into what can/should be done here please let me know if there are any suggestions. I will also be posting a thread in Spring Source in case this cannot be answered here. Thanks.