title: ClassNotFoundException while deserializing in Weblogic 12c
body: <p>I have a webapp which saves state in the client side. State is accumulated into an <code>Object []</code> </p>
  
  <pre><code>Object state[] = new Object[10];
  
  state[0] = _parent_s_state_array
  state[1] = _some_int;
  state[2] = _some_POJO;
  ..
  ..
  </code></pre>
  
  <p>then it is </p>
  
  <ul>
  <li>serialized </li>
  <li>Base64 encoded </li>
  <li>included as a hidden input in response </li>
  </ul>
  
  <p>In next request this serialized state is submitted back and we reverse the steps to reconstruct state in serverside. This strategy is working fine for several hundred pages. </p>
  
  <p>But for a certain page using a specific POJO with few String properties, I am getting a <code>ClassNotFoundException</code> while deserialization. It is to be noted that object of the same class was created and serialized few moments ago in the same JVM session so we can rule out that Class not being present in classpath. </p>
  
  <p><em>Some more observations</em></p>
  
  <ul>
  <li>This error is only seen in production and test platforms which is in <strong>Weblogic 12c</strong> and never seen in development where it is run in jetty 8 or 9. So I am guessing this is somehow related to Weblogic's class loading. </li>
  <li>This issue is consistently replicated in that specific page.</li>
  <li>There are other pages which uses same offending class without any problems in the same platform.</li>
  <li>The webapp is deployed from an exploded war directory and the class in question is present in <code>WEB-INF/classes/com/xxx/yyy/</code></li>
  </ul>
  
  <p>Can somebody provide some pointers/strategy towards debugging this issue.</p>
  
  <p>Thanks in advance.</p>
  
  <p><strong>Exception</strong></p>
  
  <pre><code>ERROR [[ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'] ClassNotFoundException occured restoring StateManager state from serialized form
  java.lang.ClassNotFoundException: com.xxx.yyy.TimeParameters
          at java.net.URLClassLoader$1.run(URLClassLoader.java:366) ~[na:1.7.0_65]
          at java.net.URLClassLoader$1.run(URLClassLoader.java:355) ~[na:1.7.0_65]
          at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0_65]
          at java.net.URLClassLoader.findClass(URLClassLoader.java:354) ~[na:1.7.0_65]
          at java.lang.ClassLoader.loadClass(ClassLoader.java:425) ~[na:1.7.0_65]
          at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) ~[na:1.7.0_65]
          at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ~[na:1.7.0_65]
          at java.lang.Class.forName0(Native Method) [na:1.7.0_65]
          at java.lang.Class.forName(Class.java:270) [na:1.7.0_65]
          at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:625) ~[na:1.7.0_65]
          at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612) ~[na:1.7.0_65]
          at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517) ~[na:1.7.0_65]
          at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) ~[na:1.7.0_65]
          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350) ~[na:1.7.0_65]
          at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370) ~[na:1.7.0_65]
          at org.apache.commons.collections.map.AbstractHashedMap.doReadObject(AbstractHashedMap.java:1212) ~[weblogic.server.merged.jar:12.1.3.0.0]
          at org.apache.commons.collections.map.CaseInsensitiveMap.readObject(CaseInsensitiveMap.java:149) ~[weblogic.server.merged.jar:12.1.3.0.0]
  </code></pre>
  
  <p><strong>Class</strong></p>
  
  <pre><code>package com.xxx.yyy;
  public class TimeParameters implements Serializable {
  
      /**
       * 
       */
      private static final long serialVersionUID = 5384703411813811209L;
      private String yr;
      private String qtr;
      private String mth;
      private String analysisType;
  
  // Getters and Setters
  ...
  ...
  }
  </code></pre>