Upgrade Kryo to 3.0.3.

Possible fix for ONOS-4206.

Now stable on multi-instance.

Change-Id: Icd56759a6223b572d3d166555136d64f26706aaa
diff --git a/features/features.xml b/features/features.xml
index ac8125c..26d0945 100644
--- a/features/features.xml
+++ b/features/features.xml
@@ -40,7 +40,7 @@
         <bundle>mvn:io.dropwizard.metrics/metrics-json/3.1.2</bundle>
         <bundle>mvn:com.eclipsesource.minimal-json/minimal-json/0.9.1</bundle>
 
-        <bundle>mvn:com.esotericsoftware/kryo/3.0.0</bundle>
+        <bundle>mvn:com.esotericsoftware/kryo/3.0.3</bundle>
         <bundle>mvn:com.esotericsoftware/reflectasm/1.11.0</bundle>
         <bundle>mvn:org.ow2.asm/asm/4.2</bundle>
         <bundle>mvn:com.esotericsoftware/minlog/1.3.0</bundle>
diff --git a/pom.xml b/pom.xml
index 15f6a26..83330f4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -321,7 +321,7 @@
             <dependency>
                 <groupId>com.esotericsoftware</groupId>
                 <artifactId>kryo</artifactId>
-                <version>3.0.0</version>
+                <version>3.0.3</version>
             </dependency>
             <dependency>
                 <groupId>com.esotericsoftware</groupId>
diff --git a/utils/misc/src/main/java/org/onlab/util/KryoNamespace.java b/utils/misc/src/main/java/org/onlab/util/KryoNamespace.java
index f5d2f9b..593ed5c 100644
--- a/utils/misc/src/main/java/org/onlab/util/KryoNamespace.java
+++ b/utils/misc/src/main/java/org/onlab/util/KryoNamespace.java
@@ -15,17 +15,6 @@
  */
 package org.onlab.util;
 
-import static org.slf4j.LoggerFactory.getLogger;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.commons.lang3.tuple.Pair;
-import org.slf4j.Logger;
-
 import com.esotericsoftware.kryo.Kryo;
 import com.esotericsoftware.kryo.Serializer;
 import com.esotericsoftware.kryo.io.ByteBufferInput;
@@ -36,6 +25,17 @@
 import com.esotericsoftware.kryo.pool.KryoPool;
 import com.google.common.base.MoreObjects;
 import com.google.common.collect.ImmutableList;
+import org.apache.commons.lang3.tuple.Pair;
+import org.objenesis.strategy.StdInstantiatorStrategy;
+import org.slf4j.Logger;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.slf4j.LoggerFactory.getLogger;
 
 /**
  * Pool of Kryo instances, with classes pre-registered.
@@ -381,6 +381,11 @@
     public Kryo create() {
         Kryo kryo = new Kryo();
         kryo.setRegistrationRequired(registrationRequired);
+
+        // TODO rethink whether we want to use StdInstantiatorStrategy
+        kryo.setInstantiatorStrategy(
+                new Kryo.DefaultInstantiatorStrategy(new StdInstantiatorStrategy()));
+
         for (RegistrationBlock block : registeredBlocks) {
             int id = block.begin();
             if (id == FLOATING_ID) {