1 Reply Latest reply on Nov 14, 2006 5:01 PM by Carl Schwarcz

    EJB Passivation Error

    Jeff Storey Newbie

      Hi -

      I've been having an issue where I receive errors about EJB passivation - "cannot find class org/apache/Logging/VariableContext" and similar errors like that. Basically, the errors all seem to relate to serializing/passivating log4j and the jaxen library. I can post a full stack trace if you think it would be helpful, but I think this should be enough information.

      The strange problem is that I don't use log4j, so I'm not sure why I would be getting these errors. I've seen other people post questions similar to this, but so far there has been no luck in answering them. Does anyone have a solution to how to fix this problem or at least some insight to help me figure out what is causing this?

      Thank you -

        • 1. Re: EJB Passivation Error
          Carl Schwarcz Newbie

          As I'm guessing you know. passivation errors are generally caused by member variables that are not serializable. I'm not familiar with the jaxen library but is there a possibility that you have a non-serializable member variable that uses the library?

          org.apache.log4j.Logger is NOT seriazable.

          You can add code to your life-cycle methods to set the variables to null on passivation and create them on activation. Or you can declare the member variable to be transient so that the container will not try to write it out on passivation.

          Hope this helps.