title: com.esotericsoftware.kryo.KryoException: Unable to find class: ����(
body: <p>I am currently encountering the following exception:</p>
  
  <pre><code>eglSurfaceAttrib not implemented
  Failed to set EGL_SWAP_BEHAVIOR on surface 0x9e878060, error=EGL_SUCCESS
  com.esotericsoftware.kryo.KryoException: Unable to find class: ����(
  Serialization trace:
  badQuality (de.myproject.data.transform.MyPendingUpload)
      at com.esotericsoftware.kryo.util.DefaultClassResolver.readName(DefaultClassResolver.java:138)
      at com.esotericsoftware.kryo.util.DefaultClassResolver.readClass(DefaultClassResolver.java:115)
      at com.esotericsoftware.kryo.Kryo.readClass(Kryo.java:641)
      at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:99)
      at com.esotericsoftware.kryo.serializers.FieldSerializer.read(FieldSerializer.java:528)
      at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:657)
      at com.snappydb.internal.DBImpl.get(DBImpl.java:249)
      at de.myproject.data.storage.SnappyKeyValueDatabase.get(SnappyKeyValueDatabase.java:39)
      at de.myproject.data.transform.MyServiceImpl$1$3.call(MyServiceImpl.java:230)
      at de.myproject.data.transform.MyServiceImpl$1$3.call(MyServiceImpl.java:224)
      at rx.Observable$2.call(Observable.java:162)
      at rx.Observable$2.call(Observable.java:154)
      at rx.Observable$2.call(Observable.java:162)
      at rx.Observable$2.call(Observable.java:154)
      at rx.Observable.unsafeSubscribe(Observable.java:7710)
      at rx.internal.operators.OperatorMerge$MergeSubscriber.onNext(OperatorMerge.java:231)
      at rx.internal.operators.OperatorMerge$MergeSubscriber.onNext(OperatorMerge.java:140)
      at rx.internal.operators.OperatorMap$1.onNext(OperatorMap.java:55)
      at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.pollQueue(OperatorObserveOn.java:208)
      at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber$2.call(OperatorObserveOn.java:170)
      at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
      at android.os.Handler.handleCallback(Handler.java:739)
      at android.os.Handler.dispatchMessage(Handler.java:95)
      at android.os.Looper.loop(Looper.java:135)
      at android.app.ActivityThread.main(ActivityThread.java:5221)
      at java.lang.reflect.Method.invoke(Native Method)
      at java.lang.reflect.Method.invoke(Method.java:372)
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
  Caused by: java.lang.ClassNotFoundException: Invalid name: ����(
      at java.lang.Class.classForName(Native Method)
      at java.lang.Class.forName(Class.java:308)
      at com.esotericsoftware.kryo.util.DefaultClassResolver.readName(DefaultClassResolver.java:136)
      ... 28 more
  </code></pre>
  
  <p>I am trying to build an offline mode for an Android App by storing data on the device using SnappyDB.</p>
  
  <p>So when the user has no active internet connection, data is stored and when internet connection is available, the data should be read and uploaded to the server.</p>
  
  <p>The PendingUpload class looks like this:</p>
  
  <pre><code>public final class PendingUpload implements Serializable {
  
      final SomeModel someModel;
  
      final Map&lt;String, Image&gt; images = new HashMap&lt;&gt;();
  
      Quality goodQuality;
  
      Quality badQuality;
  
      Image someImage;
  
      String string1;
  
      String string2;
  
      String string3;
  
      List&lt;Pair&lt;SomeClass, AnotherClass&gt;&gt; someList;
  
      List&lt;Attachment&gt; attachments;
  
      public MyPendingUpload(SomeModel someModel) {
          this.someModel = someModel;
      }
  
      protected MyPendingUpload() {
          someModel = null;
      }
  }
  </code></pre>
  
  <p>And my Snappy Database looks like this:</p>
  
  <pre><code>public class SnappyKeyValueDatabase implements KeyValueDatabase {
      public static final String KEY_PREFIX = "snappyKeyValueDatabase_";
      @NonNull
      private final DB db;
  
      public SnappyKeyValueDatabase(@NonNull DB db) {
          this.db = db;
      }
  
      @Override
      public void put(String key, Object object) throws IOException {
          try {
              db.put(KEY_PREFIX + key, object);
          } catch (SnappydbException e) {
              XLog.x(e);
              throw new IOException(e);
          }
      }
  
      @Override
      public &lt;T&gt; T get(String key, Class&lt;T&gt; clazz) throws IOException {
          try {
              return (T) db.get(KEY_PREFIX + key, (Class&lt;Serializable&gt;) clazz);
          } catch (SnappydbException e) {
              XLog.x(e);
              throw new IOException(e);
          }
      }
  
      @Override
      public void delete(String key) throws IOException {
          try {
              db.del(KEY_PREFIX + key);
          } catch (SnappydbException e) {
              XLog.x(e);
              throw new IOException(e);
          }
      }
  
      @Override
      public Collection&lt;String&gt; list() throws IOException {
          try {
              String[] keys = db.findKeys(KEY_PREFIX);
  
              ArrayList&lt;String&gt; resultList = new ArrayList&lt;&gt;(keys.length);
              for (String key : keys) {
                  resultList.add(key.substring(KEY_PREFIX.length()));
              }
  
              return resultList;
          } catch (SnappydbException e) {
              XLog.x(e);
              throw new IOException(e);
          }
      }
  }
  </code></pre>
  
  <p>If you need any more information, please let me know.
  I am stuck at this problem for a while now and appreciate any help. Thank you in advance!</p>