RenderedImage not Serializable

Help
2006-09-06
2013-01-13
  • Andreas Prlic
    Andreas Prlic
    2006-09-06

    Hi!

    I am running cewolf 1.0 under Resin and in the logs it complains:
    java.io.NotSerializableException: de.laurens.cewolf.util.RenderedImage

    Despite this exception it works fine if it is run in a setup involving only one machine, but on our release webservers when being in a clustered environment, the image is not being displayed ...

    I guess there is a connection between these two things. I tried to set usecache to false, but it does not help. Any ideas?

    Cheers,
    Andreas

     
    • Zoltan Luspai
      Zoltan Luspai
      2006-09-06

      Hi,

      Did you try to use ClusterableSessionStorage ? That is storing the image in the session; should get replicated through the cluster.

      That's done with the init parameter:
              <init-param>
              <param-name>storage</param-name>    <param-value>de.laures.cewolf.storage.ClusterableSessionStorage</param-value>
          </init-param>

      The reason for this is that the cewolf has to store somewhere the image (or its definition), because the browser will do two requests; 1st for the html page, which creates/saves the image or its definition in the "storage", and the second which pulls the renderer for the image content itself. (off: this makes the rendering lazy, it's only done when really necessary). Not all the storage implementations are cluster safe, the one I mentioned should be...

      Cheers,
      Zoltan

       
      • Andreas Prlic
        Andreas Prlic
        2006-09-07

        This fixed the problem, Thanks!