It will try to deserialize the old state (from prior applicaiton
checkpoints) with your new jars from the apa that you are trying to launch.
So if there are structural incompatibilities the deser will fail.

On Thu, Aug 10, 2017 at 11:41 AM, Vivek Bhide <vivek.bh...@target.com>
wrote:

> Hi All,
>
> I have implemented the LRUCache in one of the operators and this cache is
> not Transient. This LRUcache is a simple extension of LinkedHashMap with
> its
> removeEldestEntry method overriden. What we found is, the default Kryo
> serializer, that Apex uses for checkpointing, doesn't work properly for
> LinkedHashMap. I try using @Map and some other serializer classes and found
> that only serializer that works is default Java serializer. As a result, we
> had explicitly mentioned the serializer for this LRUCache to be
> JavaSerializer (using @Bind at variable declaration)
>
> This resolved the issue of serializing but now the application recovery
> fails when this application is killed and restarted using -originalAppId
> through Apex cli. We get a error for LRUCache class while restoring the
> operator
>
> com.esotericsoftware.kryo.KryoException: Error during Java
> deserialization.
> Serialization trace:
> callerContextCache
> (com.tgt.dqs.datausageingest.operator.UsageCountCalculatorOperator)
>         at
> com.esotericsoftware.kryo.serializers.JavaSerializer.
> read(JavaSerializer.java:47)
>         at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:679)
>         at
> com.esotericsoftware.kryo.serializers.ObjectField.read(
> ObjectField.java:106)
>
> Caused by: java.lang.ClassNotFoundException:
> com.tgt.dqs.datausageingest.common.LRUCache
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:348)
>         at java.io.ObjectInputStream.resolveClass(
> ObjectInputStream.java:626)
>         at java.io.ObjectInputStream.readNonProxyDesc(
> ObjectInputStream.java:1613)
>         at java.io.ObjectInputStream.readClassDesc(
> ObjectInputStream.java:1518)
>         at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1774)
>         at java.io.ObjectInputStream.readObject0(ObjectInputStream.
> java:1351)
>         at java.io.ObjectInputStream.readObject(ObjectInputStream.
> java:371)
>         at
> com.esotericsoftware.kryo.serializers.JavaSerializer.
> read(JavaSerializer.java:45)
>
> I checked the apa content (using get-app-package-info from cli) and could
> see that classpath is set to lib/*.jar so i changed the appPackage.xml to
> include the application jar in lib but still its of no use
>
> How the application recovery really works in Apex? and what could be done
> to
> resolve this issue
>
> Regards
> Vivek
>
>
>
> --
> View this message in context: http://apache-apex-users-list.
> 78494.x6.nabble.com/How-the-application-recovery-works-
> when-its-started-with-originalAppId-tp1821.html
> Sent from the Apache Apex Users list mailing list archive at Nabble.com.
>

Reply via email to