You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by bs...@apache.org on 2016/09/28 22:48:48 UTC

[2/2] incubator-geode git commit: GEODE-1927: add support for old GemFire remote sites (WAN)

GEODE-1927: add support for old GemFire remote sites (WAN)

This adds a new JAR and associated cache service to Geode.  The service
and associated changes to Geode protect the server from receiving
com.gemstone.gemfire packaged objects, translating them to their org.apache.geode
counterparts.

The service is called OldClientSupportService and the new jar is
geode-old-client-support.jar.  Though it's called "OldClient" this will
also protect the WAN gateways.

Several Geode exception classes did not have serialVersionUIDs.  Apparently
folks thought that abstract superclasses did not need these but this is not
the case.  I've generated UIDs based on GemFire 8.2.1 classes and put
them in place in Geode's classes.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/6555c86e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/6555c86e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/6555c86e

Branch: refs/heads/develop
Commit: 6555c86ed589e51e206420fbd04bba9b03c7dea0
Parents: b5b7203
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Wed Sep 28 15:35:48 2016 -0700
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Wed Sep 28 15:42:48 2016 -0700

----------------------------------------------------------------------
 geode-assembly/build.gradle                     |   4 +
 .../java/org/apache/geode/CancelException.java  |   1 +
 .../java/org/apache/geode/DataSerializer.java   |  36 ++--
 .../java/org/apache/geode/GemFireException.java |   1 +
 .../org/apache/geode/cache/CacheException.java  |   2 +
 .../geode/cache/CacheRuntimeException.java      |   3 +-
 .../geode/cache/OperationAbortedException.java  |   3 +-
 .../geode/cache/RegionExistsException.java      |   3 +-
 .../geode/internal/InternalDataSerializer.java  | 131 +++++++++---
 .../cache/tier/sockets/BaseCommand.java         |  31 ++-
 .../tier/sockets/OldClientSupportService.java   |  61 ++++++
 .../internal/cache/wan/BatchException70.java    |  34 +---
 .../org/apache/geode/pdx/internal/PdxType.java  |  10 +
 .../tier/sockets/command/ContainsKey66Test.java |   2 +
 .../tier/sockets/command/CreateRegionTest.java  |   2 +
 .../tier/sockets/command/Destroy65Test.java     |   2 +
 .../tier/sockets/command/DestroyRegionTest.java |   2 +
 .../cache/tier/sockets/command/DestroyTest.java |   2 +
 .../cache/tier/sockets/command/Get70Test.java   |   2 +
 .../tier/sockets/command/InvalidateTest.java    |   2 +
 .../cache/tier/sockets/command/Put61Test.java   |   2 +
 .../cache/tier/sockets/command/Put65Test.java   |   2 +
 .../cache/tier/sockets/command/PutTest.java     |   2 +
 .../cache/tier/sockets/command/RequestTest.java |   2 +
 .../sockets/command/UnregisterInterestTest.java |   2 +
 .../test/dunit/standalone/ProcessManager.java   |  28 ++-
 .../sanctionedDataSerializables.txt             |   2 +-
 .../codeAnalysis/sanctionedSerializables.txt    |  10 +-
 geode-old-client-support/build.gradle           |  25 +++
 .../com/gemstone/gemfire/GemFireException.java  | 150 ++++++++++++++
 .../gemfire/OldClientSupportProvider.java       | 134 +++++++++++++
 .../execute/EmtpyRegionFunctionException.java   |  65 ++++++
 .../cache/execute/FunctionException.java        | 131 ++++++++++++
 .../FunctionInvocationTargetException.java      |  93 +++++++++
 ...org.apache.geode.internal.cache.CacheService |   1 +
 .../gemfire/ClientDataSerializableObject.java   |  40 ++++
 .../gemfire/ClientPDXSerializableObject.java    |  34 ++++
 .../gemfire/ClientSerializableObject.java       |  33 +++
 .../geode/ClientDataSerializableObject.java     |  38 ++++
 .../geode/ClientPDXSerializableObject.java      |  34 ++++
 .../apache/geode/ClientSerializableObject.java  |  33 +++
 .../apache/geode/OldClientSupportDUnitTest.java | 200 +++++++++++++++++++
 settings.gradle                                 |   1 +
 43 files changed, 1307 insertions(+), 89 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-assembly/build.gradle
----------------------------------------------------------------------
diff --git a/geode-assembly/build.gradle b/geode-assembly/build.gradle
old mode 100755
new mode 100644
index 2b960eb..c46c74a
--- a/geode-assembly/build.gradle
+++ b/geode-assembly/build.gradle
@@ -55,6 +55,7 @@ dependencies {
   archives project(':geode-json')  
   archives project(':geode-core')
   archives project(':geode-lucene')
+  archives project(':geode-old-client-support')
   archives project(':geode-web')
   archives project(':geode-web-api')
   archives project(':geode-pulse')
@@ -332,6 +333,9 @@ distributions {
 
         from project(":geode-lucene").configurations.runtime
         from project(":geode-lucene").configurations.archives.allArtifacts.files
+        
+        from project(":geode-old-client-support").configurations.runtime
+        from project(":geode-old-client-support").configurations.archives.allArtifacts.files
 
         from configurations.bundled
         from configurations.gfshDependencies

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-core/src/main/java/org/apache/geode/CancelException.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/CancelException.java b/geode-core/src/main/java/org/apache/geode/CancelException.java
index 94fd8b5..422036a 100644
--- a/geode-core/src/main/java/org/apache/geode/CancelException.java
+++ b/geode-core/src/main/java/org/apache/geode/CancelException.java
@@ -28,6 +28,7 @@ import org.apache.geode.cache.CacheRuntimeException;
  * @since GemFire 6.0
  */
 public abstract class CancelException extends CacheRuntimeException {
+  public static final long serialVersionUID = 3215578659523282642L;
 
   /**
    * for serialization

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-core/src/main/java/org/apache/geode/DataSerializer.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/DataSerializer.java b/geode-core/src/main/java/org/apache/geode/DataSerializer.java
index 8e2bad0..09b6ced 100644
--- a/geode-core/src/main/java/org/apache/geode/DataSerializer.java
+++ b/geode-core/src/main/java/org/apache/geode/DataSerializer.java
@@ -56,12 +56,12 @@ import org.apache.geode.internal.DSCODE;
 import org.apache.geode.internal.HeapDataOutputStream;
 import org.apache.geode.internal.InternalDataSerializer;
 import org.apache.geode.internal.ObjToByteArraySerializer;
-import org.apache.geode.internal.Sendable;
 import org.apache.geode.internal.Version;
 import org.apache.geode.internal.cache.CachedDeserializable;
 import org.apache.geode.internal.cache.EventID;
 import org.apache.geode.internal.cache.GemFireCacheImpl;
 import org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID;
+import org.apache.geode.internal.cache.tier.sockets.OldClientSupportService;
 import org.apache.geode.internal.i18n.LocalizedStrings;
 import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.internal.logging.log4j.LogMarker;
@@ -237,7 +237,7 @@ public abstract class DataSerializer {
       // one indicates it's a non-primitive Class
       out.writeByte(DSCODE.CLASS);
       String cname = c.getName();
-      cname = swizzleClassNameForWrite(cname);
+      cname = swizzleClassNameForWrite(cname, out);
       writeString(cname, out);
     }
   }
@@ -260,7 +260,7 @@ public abstract class DataSerializer {
       logger.trace(LogMarker.SERIALIZER, "Writing Class name {}", className);
     }
 
-    writeString(swizzleClassNameForWrite(className), out);
+    writeString(swizzleClassNameForWrite(className, out), out);
   }
 
   /**
@@ -283,7 +283,7 @@ public abstract class DataSerializer {
     byte typeCode = in.readByte();
     if (typeCode == DSCODE.CLASS) {
       String className = readString(in);
-      className = swizzleClassNameForRead(className);
+      className = swizzleClassNameForRead(className, in);
       Class<?> c = InternalDataSerializer.getCachedClass(className); // fix for bug 41206
       return c;
     }
@@ -298,16 +298,21 @@ public abstract class DataSerializer {
    * sourced.  This preserves backward-compatibility.
    * 
    * @param name the fully qualified class name
+   * @param in the source of the class name
    * @return the name of the class in this implementation
    */
-  private static String swizzleClassNameForRead(String name) {
+  private static String swizzleClassNameForRead(String name, DataInput in) {
+    // TCPServer classes are used before a cache exists and support for old clients has been initialized
     String oldPackage = "com.gemstone.org.jgroups.stack.tcpserver";
     String newPackage = "org.apache.geode.distributed.internal.tcpserver";
-    String result = name;
     if (name.startsWith(oldPackage)) {
-      result = newPackage + name.substring(oldPackage.length());
+      return newPackage + name.substring(oldPackage.length());
     }
-    return result;
+    OldClientSupportService svc = InternalDataSerializer.getOldClientSupportService();
+    if (svc != null) {
+      return svc.processIncomingClassName(name, in);
+    }
+    return name;
   }
   
   /**
@@ -316,16 +321,21 @@ public abstract class DataSerializer {
    * sourced.  This preserves backward-compatibility.
    * 
    * @param name the fully qualified class name
+   * @param out the consumer of the serialized object
    * @return the name of the class in this implementation
    */
-  private static String swizzleClassNameForWrite(String name) {
+  private static String swizzleClassNameForWrite(String name, DataOutput out) {
+    // TCPServer classes are used before a cache exists and support for old clients has been initialized
     String oldPackage = "com.gemstone.org.jgroups.stack.tcpserver";
     String newPackage = "org.apache.geode.distributed.internal.tcpserver";
-    String result = name;
     if (name.startsWith(newPackage)) {
-      result = oldPackage + name.substring(newPackage.length());
+      return oldPackage + name.substring(newPackage.length());
+    }
+    OldClientSupportService svc = InternalDataSerializer.getOldClientSupportService();
+    if (svc != null) {
+      return svc.processOutgoingClassName(name, out);
     }
-    return result;
+    return name;
   }
   
   /**
@@ -343,7 +353,7 @@ public abstract class DataSerializer {
 
     InternalDataSerializer.checkIn(in);
 
-    return swizzleClassNameForRead(readString(in));
+    return swizzleClassNameForRead(readString(in), in);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-core/src/main/java/org/apache/geode/GemFireException.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/GemFireException.java b/geode-core/src/main/java/org/apache/geode/GemFireException.java
index 142a97c..e25dd0c 100644
--- a/geode-core/src/main/java/org/apache/geode/GemFireException.java
+++ b/geode-core/src/main/java/org/apache/geode/GemFireException.java
@@ -33,6 +33,7 @@ package org.apache.geode;
 // GemFireException to describe an arbitrary error condition (think
 // GsError).
 public abstract class GemFireException extends RuntimeException {
+  public static final long serialVersionUID = -6972360779789402295L;
 
   /** The cause of this <code>GemFireException</code> */
 //  private Throwable cause;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-core/src/main/java/org/apache/geode/cache/CacheException.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/CacheException.java b/geode-core/src/main/java/org/apache/geode/cache/CacheException.java
index 9b631a1..cc39fb3 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/CacheException.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/CacheException.java
@@ -29,6 +29,8 @@ import org.apache.geode.GemFireException;
  * @since GemFire 2.0
  */
 public abstract class CacheException extends GemFireException {
+  public static final long serialVersionUID = 7699432887938858940L;
+  
   /** Constructs a new <code>CacheException</code>. */
   public CacheException() {
     super();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-core/src/main/java/org/apache/geode/cache/CacheRuntimeException.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/CacheRuntimeException.java b/geode-core/src/main/java/org/apache/geode/cache/CacheRuntimeException.java
index 9040596..d103e6a 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/CacheRuntimeException.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/CacheRuntimeException.java
@@ -28,7 +28,8 @@ import org.apache.geode.GemFireException;
  * @since GemFire 3.0
  */
 public abstract class CacheRuntimeException extends GemFireException {
-  
+  public static final long serialVersionUID = 6750107573015376688L;
+
   /**
    * Creates a new instance of <code>CacheRuntimeException</code> without detail message.
    */

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-core/src/main/java/org/apache/geode/cache/OperationAbortedException.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/OperationAbortedException.java b/geode-core/src/main/java/org/apache/geode/cache/OperationAbortedException.java
index 340d184..25ccf23 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/OperationAbortedException.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/OperationAbortedException.java
@@ -26,7 +26,8 @@ package org.apache.geode.cache;
  * @since GemFire 3.0
  */
 public abstract class OperationAbortedException extends CacheRuntimeException {
-  
+  private static final long serialVersionUID = -8293166225026556949L;
+
   /**
    * Creates a new instance of <code>OperationAbortedException</code> without detail message.
    */

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-core/src/main/java/org/apache/geode/cache/RegionExistsException.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/cache/RegionExistsException.java b/geode-core/src/main/java/org/apache/geode/cache/RegionExistsException.java
index 288dfe3..21a71fe 100644
--- a/geode-core/src/main/java/org/apache/geode/cache/RegionExistsException.java
+++ b/geode-core/src/main/java/org/apache/geode/cache/RegionExistsException.java
@@ -50,8 +50,7 @@ private static final long serialVersionUID = -5643670216230359426L;
     super(rgn.getFullPath(), cause);
     this.region = rgn;
   }
-  
-  
+
   /**
    * Return the Region that already exists which prevented region creation.
    * @return the Region that already exists, or null if this exception has

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-core/src/main/java/org/apache/geode/internal/InternalDataSerializer.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/InternalDataSerializer.java b/geode-core/src/main/java/org/apache/geode/internal/InternalDataSerializer.java
index 6e7aa55..404c638 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/InternalDataSerializer.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/InternalDataSerializer.java
@@ -16,17 +16,88 @@
  */
 package org.apache.geode.internal;
 
-import org.apache.geode.*;
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.EOFException;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.NotSerializableException;
+import java.io.ObjectInput;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutput;
+import java.io.ObjectOutputStream;
+import java.io.ObjectStreamClass;
+import java.io.OutputStream;
+import java.io.Serializable;
+import java.io.UTFDataFormatException;
+import java.lang.ref.WeakReference;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Modifier;
+import java.lang.reflect.Proxy;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.InetAddress;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.IdentityHashMap;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.Set;
+import java.util.Stack;
+import java.util.TreeMap;
+import java.util.TreeSet;
+import java.util.UUID;
+import java.util.Vector;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.logging.log4j.Logger;
+
+import org.apache.geode.CancelException;
+import org.apache.geode.CanonicalInstantiator;
+import org.apache.geode.DataSerializable;
+import org.apache.geode.DataSerializer;
+import org.apache.geode.GemFireIOException;
+import org.apache.geode.GemFireRethrowable;
+import org.apache.geode.Instantiator;
+import org.apache.geode.InternalGemFireError;
+import org.apache.geode.SerializationException;
+import org.apache.geode.SystemFailure;
+import org.apache.geode.ToDataException;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.CacheClosedException;
 import org.apache.geode.cache.execute.Function;
-import org.apache.geode.distributed.internal.*;
+import org.apache.geode.distributed.internal.DMStats;
+import org.apache.geode.distributed.internal.DistributionConfig;
+import org.apache.geode.distributed.internal.DistributionManager;
+import org.apache.geode.distributed.internal.InternalDistributedSystem;
+import org.apache.geode.distributed.internal.LonerDistributionManager;
+import org.apache.geode.distributed.internal.SerialDistributionMessage;
 import org.apache.geode.i18n.StringId;
 import org.apache.geode.internal.cache.EnumListenerEvent;
 import org.apache.geode.internal.cache.EventID;
 import org.apache.geode.internal.cache.GemFireCacheImpl;
 import org.apache.geode.internal.cache.PoolManagerImpl;
-import org.apache.geode.internal.cache.tier.sockets.*;
+import org.apache.geode.internal.cache.tier.sockets.CacheClientNotifier;
+import org.apache.geode.internal.cache.tier.sockets.CacheServerHelper;
+import org.apache.geode.internal.cache.tier.sockets.ClientDataSerializerMessage;
+import org.apache.geode.internal.cache.tier.sockets.ClientProxyMembershipID;
+import org.apache.geode.internal.cache.tier.sockets.OldClientSupportService;
+import org.apache.geode.internal.cache.tier.sockets.Part;
 import org.apache.geode.internal.i18n.LocalizedStrings;
 import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.internal.logging.log4j.LocalizedMessage;
@@ -36,25 +107,17 @@ import org.apache.geode.pdx.NonPortableClassException;
 import org.apache.geode.pdx.PdxInstance;
 import org.apache.geode.pdx.PdxSerializable;
 import org.apache.geode.pdx.PdxSerializer;
-import org.apache.geode.pdx.internal.*;
+import org.apache.geode.pdx.internal.AutoSerializableManager;
 import org.apache.geode.pdx.internal.AutoSerializableManager.AutoClassInfo;
-import org.apache.logging.log4j.Logger;
-
-import java.io.*;
-import java.lang.ref.WeakReference;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Modifier;
-import java.lang.reflect.Proxy;
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.net.InetAddress;
-import java.sql.Timestamp;
-import java.util.*;
-import java.util.Map.Entry;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.TimeUnit;
+import org.apache.geode.pdx.internal.EnumInfo;
+import org.apache.geode.pdx.internal.PdxInputStream;
+import org.apache.geode.pdx.internal.PdxInstanceEnum;
+import org.apache.geode.pdx.internal.PdxInstanceImpl;
+import org.apache.geode.pdx.internal.PdxOutputStream;
+import org.apache.geode.pdx.internal.PdxReaderImpl;
+import org.apache.geode.pdx.internal.PdxType;
+import org.apache.geode.pdx.internal.PdxWriterImpl;
+import org.apache.geode.pdx.internal.TypeRegistry;
 
 /**
  * Contains static methods for data serializing instances of internal
@@ -68,6 +131,7 @@ public abstract class InternalDataSerializer extends DataSerializer implements D
   private static final Logger logger = LogService.getLogger();
   
   private static final Set loggedClasses = new HashSet();
+
   /**
    * Maps Class names to their DataSerializer.  This is used to
    * find a DataSerializer during serialization.
@@ -75,6 +139,13 @@ public abstract class InternalDataSerializer extends DataSerializer implements D
   private static final ConcurrentHashMap<String, DataSerializer> classesToSerializers = new ConcurrentHashMap<String, DataSerializer>();
   
   private static final String serializationVersionTxt = System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "serializationVersion");
+
+  /**
+   * support for old GemFire clients and WAN sites - needed to
+   * enable moving from GemFire to Geode
+   */
+  private static OldClientSupportService oldClientSupportService;
+
   /**
    * Any time new serialization format is added then a new enum needs to be added here.
    * @since GemFire 6.6.2
@@ -608,6 +679,14 @@ public abstract class InternalDataSerializer extends DataSerializer implements D
     return ub & 0xFF;
   }
 
+  public static void setOldClientSupportService(final OldClientSupportService svc) {
+    oldClientSupportService = svc;
+  }
+
+  public static OldClientSupportService getOldClientSupportService() {
+    return oldClientSupportService;
+  }
+
   /**
    * Instantiates an instance of <code>DataSerializer</code>
    *
@@ -1166,7 +1245,7 @@ public abstract class InternalDataSerializer extends DataSerializer implements D
 
     return coll.toArray(new SerializerAttributesHolder[coll.size()]);
   }
-
+  
   /**
    * Persist this class's map to out 
    */
@@ -3509,9 +3588,13 @@ public abstract class InternalDataSerializer extends DataSerializer implements D
       throws IOException, ClassNotFoundException {
 
       String className = desc.getName();
+      OldClientSupportService svc = getOldClientSupportService();
+      if (svc != null) {
+        className = svc.processIncomingClassName(className);
+      }
      try {
-        return getCachedClass(className);
-
+       Class clazz = getCachedClass(className);
+       return clazz;
       } catch (ClassNotFoundException ex) {
         return super.resolveClass(desc);
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/BaseCommand.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/BaseCommand.java b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/BaseCommand.java
index 9a78772..743632c 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/BaseCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/BaseCommand.java
@@ -19,6 +19,8 @@
  */
 package org.apache.geode.internal.cache.tier.sockets;
 
+import static com.sun.corba.se.impl.util.RepositoryId.cache;
+
 import org.apache.geode.*;
 import org.apache.geode.cache.*;
 import org.apache.geode.cache.persistence.PartitionOfflineException;
@@ -540,8 +542,9 @@ public abstract class BaseCommand implements Command {
     writeChunkedException(origMsg, e, isSevere, servConn, originalReponse, 2);
   }
 
-  protected static void writeChunkedException(Message origMsg, Throwable e,
+  protected static void writeChunkedException(Message origMsg, Throwable exception,
       boolean isSevere, ServerConnection servConn, ChunkedMessage originalReponse, int numOfParts) throws IOException {
+    Throwable e = getClientException(servConn, exception);
     ChunkedMessage chunkedResponseMsg = servConn.getChunkedResponseMessage();
     chunkedResponseMsg.setServerConnection(servConn);
     if (originalReponse.headerHasBeenSent()) {
@@ -587,22 +590,34 @@ public abstract class BaseCommand implements Command {
       boolean isSevere, ServerConnection servConn) throws IOException {
     writeException(origMsg, MessageType.EXCEPTION, e, isSevere, servConn);
   }
+  
+  private static Throwable getClientException(ServerConnection servConn, Throwable e) {
+    if (cache instanceof InternalCache) {
+      InternalCache cache = (InternalCache) servConn.getCache();
+      OldClientSupportService svc = cache.getService(OldClientSupportService.class);
+      if (svc != null) {
+        return svc.getThrowable(e, servConn.getClientVersion());
+      }
+    }
+    return e;
+  }
 
   protected static void writeException(Message origMsg, int msgType, Throwable e,
       boolean isSevere, ServerConnection servConn) throws IOException {
+    Throwable theException = getClientException(servConn, e);
     Message errorMsg = servConn.getErrorResponseMessage();
     errorMsg.setMessageType(msgType);
     errorMsg.setNumberOfParts(2);
     errorMsg.setTransactionId(origMsg.getTransactionId());
     if (isSevere) {
-      String msg = e.getMessage();
+      String msg = theException.getMessage();
       if (msg == null) {
-        msg = e.toString();
+        msg = theException.toString();
       }
       logger.fatal(LocalizedMessage.create(LocalizedStrings.BaseCommand_SEVERE_CACHE_EXCEPTION_0, msg));
     }
-    errorMsg.addObjPart(e);
-    errorMsg.addStringPart(getExceptionTrace(e));
+    errorMsg.addObjPart(theException);
+    errorMsg.addStringPart(getExceptionTrace(theException));
     errorMsg.send(servConn);
     if (logger.isDebugEnabled()) {
       logger.debug("{}: Wrote exception: {}", servConn.getName(), e.getMessage(), e);
@@ -742,8 +757,9 @@ public abstract class BaseCommand implements Command {
   }
 
   protected static void writeQueryResponseException(Message origMsg,
-      Throwable e, boolean isSevere, ServerConnection servConn)
+      Throwable exception, boolean isSevere, ServerConnection servConn)
       throws IOException {
+    Throwable e = getClientException(servConn, exception);
     ChunkedMessage queryResponseMsg = servConn.getQueryResponseMessage();
     ChunkedMessage chunkedResponseMsg = servConn.getChunkedResponseMessage();
     if (queryResponseMsg.headerHasBeenSent()) {
@@ -799,8 +815,9 @@ public abstract class BaseCommand implements Command {
   }
   
   protected static void writeFunctionResponseException(Message origMsg,
-      int messageType, String message, ServerConnection servConn, Throwable e)
+      int messageType, String message, ServerConnection servConn, Throwable exception)
       throws IOException {
+    Throwable e = getClientException(servConn, exception);
     ChunkedMessage functionResponseMsg = servConn.getFunctionResponseMessage();
     ChunkedMessage chunkedResponseMsg = servConn.getChunkedResponseMessage();
     if (functionResponseMsg.headerHasBeenSent()) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/OldClientSupportService.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/OldClientSupportService.java b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/OldClientSupportService.java
new file mode 100644
index 0000000..ec83d96
--- /dev/null
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/OldClientSupportService.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.geode.internal.cache.tier.sockets;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+
+import org.apache.geode.internal.Version;
+import org.apache.geode.internal.cache.CacheService;
+
+/**
+ * Support for old GemFire clients
+ */
+public interface OldClientSupportService extends CacheService {
+
+  /**
+   * translates the given throwable into one that can be sent to an old GemFire client
+   * @param theThrowable the throwable to convert
+   * @param clientVersion the version of the client
+   * @return the exception to give the client
+   */
+  public Throwable getThrowable(Throwable theThrowable, Version clientVersion);
+
+  /**
+   * Process a class name read from a serialized object of unknown origin
+   * @param name
+   * @return the class name to use
+   */
+  public String processIncomingClassName(String name);
+    
+  /**
+   * Process a class name read from a serialized object
+   * @param name the fully qualified class name
+   * @param in the source of the class name
+   * @return the adjusted class name
+   */
+  public String processIncomingClassName(String name, DataInput in);
+
+  /**
+   * Process a class name being written to a serialized form
+   * @param name the fully qualified class name
+   * @param out the consumer of the class name
+   * @return the adjusted class name
+   */
+  public String processOutgoingClassName(String name, DataOutput out);
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-core/src/main/java/org/apache/geode/internal/cache/wan/BatchException70.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/BatchException70.java b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/BatchException70.java
index b795156..00d8f95 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/BatchException70.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/BatchException70.java
@@ -49,42 +49,12 @@ private static final long serialVersionUID = -6707074107791305564L;
     this.index = this.exceptions.get(0).getIndex();
   }
   
-  public  BatchException70(String msg, int batchId) {
-    super(msg);
-    this.batchId = batchId;
-  }
-
-  public BatchException70(String msg, int index, int id) {
-    super(msg);
-    this.index = index;
-    this.batchId = id;
-  }
-  
-  /**
-   * Constructor.
-   * Creates an instance of <code>RegionQueueException</code> with the
-   * specified cause.
-   * @param cause the causal Throwable
-   * @param index the index in the batch list where the exception occurred
-   */
-  public BatchException70(Throwable cause, int index) {
-    super(cause);
-    this.index = index;
-  }
-
-  
-  public BatchException70(Throwable cause, int index, int id) {
-    super(cause);
+  public BatchException70(String message, Throwable cause, int index, int id) {
+    super(message, cause);
     this.index = index;
     this.batchId = id;
   }
   
-  public BatchException70(String message, Throwable cause, int index, int id) {
-	super(message, cause);
-	this.index = index;
-	this.batchId = id;
-  }
-  
   /**
    * Answers the index in the batch where the exception occurred
    * @return the index in the batch where the exception occurred

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-core/src/main/java/org/apache/geode/pdx/internal/PdxType.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/pdx/internal/PdxType.java b/geode-core/src/main/java/org/apache/geode/pdx/internal/PdxType.java
index 2e5b19f..191ed0e 100644
--- a/geode-core/src/main/java/org/apache/geode/pdx/internal/PdxType.java
+++ b/geode-core/src/main/java/org/apache/geode/pdx/internal/PdxType.java
@@ -37,6 +37,7 @@ import org.apache.geode.DataSerializer;
 import org.apache.geode.internal.ClassPathLoader;
 import org.apache.geode.internal.InternalDataSerializer;
 import org.apache.geode.internal.Version;
+import org.apache.geode.internal.cache.tier.sockets.OldClientSupportService;
 import org.apache.geode.internal.i18n.LocalizedStrings;
 import org.apache.geode.pdx.PdxFieldAlreadyExistsException;
 import org.apache.geode.pdx.PdxSerializationException;
@@ -74,6 +75,7 @@ public class PdxType implements DataSerializable {
   public PdxType(String name, boolean expectDomainClass) {
     this.className = name;
     this.noDomainClass = !expectDomainClass;
+    swizzleGemFireClassNames();
   }
 
   public PdxType(PdxType copy) {
@@ -88,9 +90,17 @@ public class PdxType implements DataSerializable {
 
   private static final byte NO_DOMAIN_CLASS_BIT = 1;
   private static final byte HAS_DELETED_FIELD_BIT = 2;
+
+  private void swizzleGemFireClassNames() {
+    OldClientSupportService svc = InternalDataSerializer.getOldClientSupportService();
+    if (svc != null) {
+      this.className = svc.processIncomingClassName(this.className);
+    }
+  }
   
   public void fromData(DataInput in) throws IOException, ClassNotFoundException {
     this.className = DataSerializer.readString(in);
+    swizzleGemFireClassNames();
     {
       byte bits = in.readByte();
       this.noDomainClass = (bits & NO_DOMAIN_CLASS_BIT) != 0;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ContainsKey66Test.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ContainsKey66Test.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ContainsKey66Test.java
index 6728a37..c93d5f4 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ContainsKey66Test.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/ContainsKey66Test.java
@@ -30,6 +30,7 @@ import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 
 import org.apache.geode.cache.Cache;
+import org.apache.geode.internal.Version;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
 import org.apache.geode.internal.cache.tier.sockets.Message;
@@ -87,6 +88,7 @@ public class ContainsKey66Test {
     when(this.serverConnection.getErrorResponseMessage()).thenReturn(this.errorResponseMessage);
     when(this.serverConnection.getResponseMessage()).thenReturn(this.responseMessage);
     when(this.serverConnection.getAuthzRequest()).thenReturn(this.authzRequest);
+    when(this.serverConnection.getClientVersion()).thenReturn(Version.CURRENT);
 
     when(this.regionNamePart.getString()).thenReturn(REGION_NAME);
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/CreateRegionTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/CreateRegionTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/CreateRegionTest.java
index 3893991..4599eaf 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/CreateRegionTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/CreateRegionTest.java
@@ -36,6 +36,7 @@ import org.apache.geode.cache.AttributesFactory;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.CacheListener;
 import org.apache.geode.cache.RegionAttributes;
+import org.apache.geode.internal.Version;
 import org.apache.geode.internal.cache.EntriesMap.Attributes;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
@@ -100,6 +101,7 @@ public class CreateRegionTest {
     when(this.serverConnection.getCacheServerStats()).thenReturn(mock(CacheServerStats.class));
     when(this.serverConnection.getReplyMessage()).thenReturn(this.responseMessage);
     when(this.serverConnection.getErrorResponseMessage()).thenReturn(this.errorResponseMessage);
+    when(this.serverConnection.getClientVersion()).thenReturn(Version.CURRENT);
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Destroy65Test.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Destroy65Test.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Destroy65Test.java
index ed76cb6..60871b2 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Destroy65Test.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Destroy65Test.java
@@ -32,6 +32,7 @@ import org.mockito.MockitoAnnotations;
 import org.apache.geode.CancelCriterion;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.operations.DestroyOperationContext;
+import org.apache.geode.internal.Version;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
 import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
@@ -113,6 +114,7 @@ public class Destroy65Test {
     when(this.serverConnection.getCachedRegionHelper()).thenReturn(mock(CachedRegionHelper.class));
     when(this.serverConnection.getReplyMessage()).thenReturn(this.responseMessage);
     when(this.serverConnection.getErrorResponseMessage()).thenReturn(this.errorResponseMessage);
+    when(this.serverConnection.getClientVersion()).thenReturn(Version.CURRENT);
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/DestroyRegionTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/DestroyRegionTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/DestroyRegionTest.java
index 49a95a0..349c795 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/DestroyRegionTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/DestroyRegionTest.java
@@ -33,6 +33,7 @@ import org.apache.geode.CancelCriterion;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.operations.DestroyOperationContext;
 import org.apache.geode.cache.operations.RegionDestroyOperationContext;
+import org.apache.geode.internal.Version;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
 import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
@@ -105,6 +106,7 @@ public class DestroyRegionTest {
     when(this.serverConnection.getCachedRegionHelper()).thenReturn(mock(CachedRegionHelper.class));
     when(this.serverConnection.getErrorResponseMessage()).thenReturn(this.errorResponseMessage);
     when(this.serverConnection.getReplyMessage()).thenReturn(this.responseMessage);
+    when(this.serverConnection.getClientVersion()).thenReturn(Version.CURRENT);
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/DestroyTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/DestroyTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/DestroyTest.java
index 422733e..b80209b 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/DestroyTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/DestroyTest.java
@@ -33,6 +33,7 @@ import org.mockito.MockitoAnnotations;
 import org.apache.geode.CancelCriterion;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.operations.DestroyOperationContext;
+import org.apache.geode.internal.Version;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
 import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
@@ -117,6 +118,7 @@ public class DestroyTest {
     when(this.serverConnection.getCachedRegionHelper()).thenReturn(mock(CachedRegionHelper.class));
     when(this.serverConnection.getErrorResponseMessage()).thenReturn(this.errorResponseMessage);
     when(this.serverConnection.getReplyMessage()).thenReturn(this.replyMessage);
+    when(this.serverConnection.getClientVersion()).thenReturn(Version.CURRENT);
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Get70Test.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Get70Test.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Get70Test.java
index 4b63a07..126445b 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Get70Test.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Get70Test.java
@@ -33,6 +33,7 @@ import org.apache.geode.CancelCriterion;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.operations.DestroyOperationContext;
 import org.apache.geode.cache.operations.GetOperationContext;
+import org.apache.geode.internal.Version;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
 import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
@@ -107,6 +108,7 @@ public class Get70Test {
     when(this.serverConnection.getResponseMessage()).thenReturn(this.responseMessage);
     when(this.serverConnection.getCachedRegionHelper()).thenReturn(mock(CachedRegionHelper.class));
     when(this.serverConnection.getErrorResponseMessage()).thenReturn(this.errorResponseMessage);
+    when(this.serverConnection.getClientVersion()).thenReturn(Version.CURRENT);
 
     when(this.valuePart.getObject()).thenReturn(CALLBACK_ARG);
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/InvalidateTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/InvalidateTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/InvalidateTest.java
index 2dcdd04..bbb3860 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/InvalidateTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/InvalidateTest.java
@@ -34,6 +34,7 @@ import org.apache.geode.CancelCriterion;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.operations.GetOperationContext;
 import org.apache.geode.cache.operations.InvalidateOperationContext;
+import org.apache.geode.internal.Version;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
 import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
@@ -112,6 +113,7 @@ public class InvalidateTest {
     when(this.serverConnection.getCachedRegionHelper()).thenReturn(mock(CachedRegionHelper.class));
     when(this.serverConnection.getReplyMessage()).thenReturn(this.responseMessage);
     when(this.serverConnection.getErrorResponseMessage()).thenReturn(this.errorResponseMessage);
+    when(this.serverConnection.getClientVersion()).thenReturn(Version.CURRENT);
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put61Test.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put61Test.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put61Test.java
index c368ba8..98176df 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put61Test.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put61Test.java
@@ -33,6 +33,7 @@ import org.mockito.MockitoAnnotations;
 import org.apache.geode.CancelCriterion;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.operations.PutOperationContext;
+import org.apache.geode.internal.Version;
 import org.apache.geode.internal.cache.EntryEventImpl;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
@@ -129,6 +130,7 @@ public class Put61Test {
     when(this.serverConnection.getCachedRegionHelper()).thenReturn(mock(CachedRegionHelper.class));
     when(this.serverConnection.getReplyMessage()).thenReturn(this.replyMessage);
     when(this.serverConnection.getErrorResponseMessage()).thenReturn(this.errorResponseMessage);
+    when(this.serverConnection.getClientVersion()).thenReturn(Version.CURRENT);
 
     when(this.localRegion.basicBridgePut(eq(KEY), eq(VALUE), eq(VALUE), eq(true), eq(CALLBACK_ARG), any(ClientProxyMembershipID.class), eq(true), any(EntryEventImpl.class))).thenReturn(true);
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put65Test.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put65Test.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put65Test.java
index 830884c..e9f0540 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put65Test.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/Put65Test.java
@@ -35,6 +35,7 @@ import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.CacheTransactionManager;
 import org.apache.geode.cache.Operation;
 import org.apache.geode.cache.operations.PutOperationContext;
+import org.apache.geode.internal.Version;
 import org.apache.geode.internal.cache.EntryEventImpl;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.TXManagerImpl;
@@ -150,6 +151,7 @@ public class Put65Test {
     when(this.serverConnection.getCachedRegionHelper()).thenReturn(mock(CachedRegionHelper.class));
     when(this.serverConnection.getReplyMessage()).thenReturn(this.replyMessage);
     when(this.serverConnection.getErrorResponseMessage()).thenReturn(this.errorResponseMessage);
+    when(this.serverConnection.getClientVersion()).thenReturn(Version.CURRENT);
 
     when(this.valuePart.getSerializedForm()).thenReturn(VALUE);
     when(this.valuePart.isObject()).thenReturn(true);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/PutTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/PutTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/PutTest.java
index a9c3af4..c115db0 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/PutTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/PutTest.java
@@ -33,6 +33,7 @@ import org.mockito.MockitoAnnotations;
 import org.apache.geode.CancelCriterion;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.operations.PutOperationContext;
+import org.apache.geode.internal.Version;
 import org.apache.geode.internal.cache.EntryEventImpl;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
@@ -125,6 +126,7 @@ public class PutTest {
     when(this.serverConnection.getCachedRegionHelper()).thenReturn(mock(CachedRegionHelper.class));
     when(this.serverConnection.getReplyMessage()).thenReturn(this.replyMessage);
     when(this.serverConnection.getErrorResponseMessage()).thenReturn(this.errorResponseMessage);
+    when(this.serverConnection.getClientVersion()).thenReturn(Version.CURRENT);
 
     when(this.localRegion.basicBridgePut(eq(KEY), eq(VALUE), eq(null), eq(true), eq(CALLBACK_ARG), any(ClientProxyMembershipID.class), eq(true), any(EntryEventImpl.class))).thenReturn(true);
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RequestTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RequestTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RequestTest.java
index b6997bd..86a3cd5 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RequestTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/RequestTest.java
@@ -29,6 +29,7 @@ import org.mockito.MockitoAnnotations;
 import org.apache.geode.CancelCriterion;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.operations.GetOperationContext;
+import org.apache.geode.internal.Version;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
 import org.apache.geode.internal.cache.tier.sockets.CacheServerStats;
@@ -103,6 +104,7 @@ public class RequestTest {
     when(this.serverConnection.getResponseMessage()).thenReturn(this.responseMessage);
     when(this.serverConnection.getCachedRegionHelper()).thenReturn(mock(CachedRegionHelper.class));
     when(this.serverConnection.getErrorResponseMessage()).thenReturn(this.errorResponseMessage);
+    when(this.serverConnection.getClientVersion()).thenReturn(Version.CURRENT);
 
     when(this.valuePart.getObject()).thenReturn(CALLBACK_ARG);
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/UnregisterInterestTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/UnregisterInterestTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/UnregisterInterestTest.java
index 2da6f19..5ce8cf4 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/UnregisterInterestTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/command/UnregisterInterestTest.java
@@ -35,6 +35,7 @@ import org.powermock.modules.junit4.PowerMockRunner;
 import org.apache.geode.CancelCriterion;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.operations.UnregisterInterestOperationContext;
+import org.apache.geode.internal.Version;
 import org.apache.geode.internal.cache.LocalRegion;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
 import org.apache.geode.internal.cache.tier.sockets.AcceptorImpl;
@@ -130,6 +131,7 @@ public class UnregisterInterestTest {
     when(this.serverConnection.getCachedRegionHelper()).thenReturn(mock(CachedRegionHelper.class));
     when(this.serverConnection.getErrorResponseMessage()).thenReturn(this.errorResponseMessage);
     when(this.serverConnection.getAcceptor()).thenReturn(this.acceptor);
+    when(this.serverConnection.getClientVersion()).thenReturn(Version.CURRENT);
 
 
     when(this.valuePart.getObject()).thenReturn(CALLBACK_ARG);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-core/src/test/java/org/apache/geode/test/dunit/standalone/ProcessManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/standalone/ProcessManager.java b/geode-core/src/test/java/org/apache/geode/test/dunit/standalone/ProcessManager.java
index 1c87b1a..b8770b9 100644
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/standalone/ProcessManager.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/standalone/ProcessManager.java
@@ -64,7 +64,7 @@ public class ProcessManager {
     }
 
     String[] cmd = buildJavaCommand(vmNum, namingPort);
-    System.out.println("Executing " + Arrays.asList(cmd));
+    System.out.println("Executing " + Arrays.toString(cmd));
     File workingDir = getVMDir(vmNum);
     try {
       FileUtil.delete(workingDir);
@@ -168,12 +168,13 @@ public class ProcessManager {
     ArrayList<String> cmds = new ArrayList<String>();
     cmds.add(cmd);
     cmds.add("-classpath");
+    classPath = removeJREJars(classPath);
     cmds.add(classPath);
     cmds.add("-D" + DUnitLauncher.RMI_PORT_PARAM + "=" + namingPort);
     cmds.add("-D" + DUnitLauncher.VM_NUM_PARAM + "=" + vmNum);
     cmds.add("-D" + DUnitLauncher.WORKSPACE_DIR_PARAM + "=" + new File(".").getAbsolutePath());
     if (vmNum >= 0) { // let the locator print a banner
-      cmds.add("-D" + InternalLocator.INHIBIT_DM_BANNER + "=true");
+//      cmds.add("-D" + InternalLocator.INHIBIT_DM_BANNER + "=true");
     } else {
       // most distributed unit tests were written under the assumption that network partition
       // detection is disabled, so we turn it off in the locator.  Tests for network partition
@@ -184,6 +185,10 @@ public class ProcessManager {
     if (DUnitLauncher.LOG4J != null) {
       cmds.add("-Dlog4j.configurationFile=" + DUnitLauncher.LOG4J);
     }
+    String jtests = System.getProperty("JTESTS");
+    if (jtests != null) {
+      cmds.add("-DJTESTS="+jtests);
+    }
     cmds.add("-Djava.library.path=" + System.getProperty("java.library.path"));
     cmds.add("-Xrunjdwp:transport=dt_socket,server=y,suspend=" + jdkSuspend + jdkDebug);
     cmds.add("-XX:+HeapDumpOnOutOfMemoryError");
@@ -203,6 +208,23 @@ public class ProcessManager {
 
     return rst;
   }
+  
+  private String removeJREJars(String classpath) {
+    String[] jars = classpath.split(File.pathSeparator);
+    StringBuilder sb = new StringBuilder(classpath.length());
+    String jreLib = File.separator + "jre" + File.separator + "lib" + File.separator;
+    Boolean firstjar = true;
+    for (String jar: jars) {
+      if (!jar.contains(jreLib)) {
+        if (!firstjar) {
+          sb.append(File.pathSeparator);
+        }
+        sb.append(jar);
+        firstjar = false;
+      }
+    }
+    return sb.toString();
+  }
 
   /**
    * Get the java agent passed to this process and pass it to the child VMs.
@@ -244,7 +266,7 @@ public class ProcessManager {
     return true;
   }
 
-  private static class ProcessHolder {
+  public static class ProcessHolder {
     private final Process process;
     private volatile boolean killed = false;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-core/src/test/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt b/geode-core/src/test/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
index ecb6529..23162e5 100644
--- a/geode-core/src/test/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
+++ b/geode-core/src/test/resources/org/apache/geode/codeAnalysis/sanctionedDataSerializables.txt
@@ -2123,7 +2123,7 @@ fromData,99,2a2bb8000bb500022a2bb9000c0100b500032a2bb9000c0100b500042a120d2bb800
 toData,105,2ab400022bb800112b2ab40003b9001202002b2ab40004b9001202002ab400052bb800132b2ab40009b9001202002b2ab4000ab900120200033d2ab400069900081c0480913d2bb800144e2db20015b600169b000f2ab400079900081c0580913d2b1cb900170200b1
 
 org/apache/geode/pdx/internal/PdxType,2
-fromData,105,2a2bb80015b5000c2bb9001601003d2a1c047e99000704a7000403b5000d2a1c057e99000704a7000403b500182a2bb900190100b5000e2a2bb900190100b5000f2bb8001a3d033e1d1ca2001ebb001359b7001b3a0419042bb6001c2a1904b60014840301a7ffe3b1
+fromData,109,2a2bb80018b5000c2ab7000e2bb9001901003d2a1c047e99000704a7000403b5000d2a1c057e99000704a7000403b5001b2a2bb9001c0100b5000f2a2bb9001c0100b500102bb8001d3d033e1d1ca2001ebb001459b7001e3a0419042bb6001f2a1904b60015840301a7ffe3b1
 toData,124,2ab4000c2bb8001d033d2ab4000d9900081c0480913d2bb8001e4e2db2001fb600209b000f2ab400189900081c0580913d2b1cb9002102002b2ab4000eb9002202002b2ab4000fb9002202002ab40005b600232bb80024033d1c2ab40005b60023a2001a2ab400051cb60025c000134e2d2bb60026840201a7ffe1b1
 
 org/apache/geode/redis/internal/ByteArrayWrapper,2

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-core/src/test/resources/org/apache/geode/codeAnalysis/sanctionedSerializables.txt
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/org/apache/geode/codeAnalysis/sanctionedSerializables.txt b/geode-core/src/test/resources/org/apache/geode/codeAnalysis/sanctionedSerializables.txt
index fffe7d9..af7a796 100644
--- a/geode-core/src/test/resources/org/apache/geode/codeAnalysis/sanctionedSerializables.txt
+++ b/geode-core/src/test/resources/org/apache/geode/codeAnalysis/sanctionedSerializables.txt
@@ -1,11 +1,11 @@
-org/apache/geode/CancelException,false
+org/apache/geode/CancelException,true
 org/apache/geode/CopyException,true,-1143711608610323585
 org/apache/geode/DeltaSerializationException,false
 org/apache/geode/ForcedDisconnectException,true,4977003259880566257
 org/apache/geode/GemFireCacheException,true,-2844020916351682908
 org/apache/geode/GemFireCheckedException,false
 org/apache/geode/GemFireConfigException,true,7791789785331120991
-org/apache/geode/GemFireException,false
+org/apache/geode/GemFireException,true
 org/apache/geode/GemFireIOException,true,5694009444435264497
 org/apache/geode/GemFireRethrowable,true,8349791552668922571
 org/apache/geode/IncompatibleSystemException,true,-6852188720149734350
@@ -53,10 +53,10 @@ org/apache/geode/admin/jmx/internal/RefreshNotificationType,true,437676359239561
 org/apache/geode/admin/jmx/internal/StatisticAttributeInfo,true,28022387514935560,stat:org/apache/geode/admin/Statistic
 org/apache/geode/cache/AttributesFactory$RegionAttributesImpl,true,-3663000883567530374,asyncEventQueueIds:java/util/Set,cacheListeners:java/util/ArrayList,cacheLoader:org/apache/geode/cache/CacheLoader,cacheWriter:org/apache/geode/cache/CacheWriter,compressor:org/apache/geode/compression/Compressor,concurrencyChecksEnabled:boolean,concurrencyLevel:int,customEntryIdleTimeout:org/apache/geode/cache/CustomExpiry,customEntryTimeToLive:org/apache/geode/cache/CustomExpiry,dataPolicy:org/apache/geode/cache/DataPolicy,diskDirs:java/io/File[],diskSizes:int[],diskStoreName:java/lang/String,diskSynchronous:boolean,diskWriteAttributes:org/apache/geode/cache/DiskWriteAttributes,earlyAck:boolean,enableAsyncConflation:boolean,enableSubscriptionConflation:boolean,entryIdleTimeout:int,entryIdleTimeoutExpirationAction:org/apache/geode/cache/ExpirationAction,entryTimeToLive:int,entryTimeToLiveExpirationAction:org/apache/geode/cache/ExpirationAction,evictionAttributes:org/apache/geode/internal/cache/E
 victionAttributesImpl,gatewaySenderIds:java/util/Set,ignoreJTA:boolean,indexMaintenanceSynchronous:boolean,initialCapacity:int,isBucketRegion:boolean,isCloningEnabled:boolean,isLockGrantor:boolean,keyConstraint:java/lang/Class,loadFactor:float,membershipAttributes:org/apache/geode/cache/MembershipAttributes,multicastEnabled:boolean,offHeap:boolean,partitionAttributes:org/apache/geode/cache/PartitionAttributes,poolName:java/lang/String,publisher:boolean,regionIdleTimeout:int,regionIdleTimeoutExpirationAction:org/apache/geode/cache/ExpirationAction,regionTimeToLive:int,regionTimeToLiveExpirationAction:org/apache/geode/cache/ExpirationAction,scope:org/apache/geode/cache/Scope,statisticsEnabled:boolean,subscriptionAttributes:org/apache/geode/cache/SubscriptionAttributes,valueConstraint:java/lang/Class
 org/apache/geode/cache/CacheClosedException,true,-6479561694497811262
-org/apache/geode/cache/CacheException,false
+org/apache/geode/cache/CacheException,true
 org/apache/geode/cache/CacheExistsException,true,4090002289325418100
 org/apache/geode/cache/CacheLoaderException,true,-3383072059406642140
-org/apache/geode/cache/CacheRuntimeException,false
+org/apache/geode/cache/CacheRuntimeException,true
 org/apache/geode/cache/CacheWriterException,true,-2872212342970454458
 org/apache/geode/cache/CacheXmlException,true,-4343870964883131754
 org/apache/geode/cache/CommitConflictException,true,-1491184174802596675
@@ -85,7 +85,7 @@ org/apache/geode/cache/MirrorType,true,-6632651349646672540,ordinal:int
 org/apache/geode/cache/NoQueueServersAvailableException,true,8484086019155762365
 org/apache/geode/cache/NoSubscriptionServersAvailableException,true,8484086019155762365
 org/apache/geode/cache/Operation,true,-7521751729852504238,ordinal:byte
-org/apache/geode/cache/OperationAbortedException,false
+org/apache/geode/cache/OperationAbortedException,true
 org/apache/geode/cache/PartitionedRegionDistributionException,true,-3004093739855972548
 org/apache/geode/cache/PartitionedRegionStorageException,true,5905463619475329732
 org/apache/geode/cache/RegionAccessException,true,3142958723089038406

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-old-client-support/build.gradle
----------------------------------------------------------------------
diff --git a/geode-old-client-support/build.gradle b/geode-old-client-support/build.gradle
new file mode 100644
index 0000000..ebbb949
--- /dev/null
+++ b/geode-old-client-support/build.gradle
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+dependencies {
+    compile project(':geode-core')
+    compile project(':geode-common')
+
+    testCompile project(':geode-junit')
+
+    testCompile files(project(':geode-core').sourceSets.test.output)
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-old-client-support/src/main/java/com/gemstone/gemfire/GemFireException.java
----------------------------------------------------------------------
diff --git a/geode-old-client-support/src/main/java/com/gemstone/gemfire/GemFireException.java b/geode-old-client-support/src/main/java/com/gemstone/gemfire/GemFireException.java
new file mode 100644
index 0000000..c4e3aba
--- /dev/null
+++ b/geode-old-client-support/src/main/java/com/gemstone/gemfire/GemFireException.java
@@ -0,0 +1,150 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+   
+package com.gemstone.gemfire;
+
+/**
+ * This is the abstract superclass of exceptions that are thrown to
+ * indicate incorrect usage of GemFire.
+ *
+ * Since these exceptions are unchecked, this class really
+ * <em>ought</em> to be called <code>GemFireRuntimeException</code>;
+ * however, the current name is retained for compatibility's sake.
+ * 
+ * @see org.apache.geode.GemFireCheckedException
+ * @see org.apache.geode.cache.CacheRuntimeException
+ * @deprecated use org.apache.geode exceptions, not com.gemstone.gemfire exceptions
+ */
+// Implementation note: This class is abstract so that we are forced
+// to have more specific exception types.  We want to avoid using
+// GemFireException to describe an arbitrary error condition (think
+// GsError).
+public abstract class GemFireException extends RuntimeException {
+  public static final long serialVersionUID = -6972360779789402295L;
+
+  /** The cause of this <code>GemFireException</code> */
+//  private Throwable cause;
+
+  //////////////////////  Constructors  //////////////////////
+
+  /**
+   * Creates a new <code>GemFireException</code> with no detailed message.
+   */
+  public GemFireException() {
+    super();
+  }
+
+  /**
+   * Creates a new <code>GemFireException</code> with the given detail
+   * message.
+   */
+  public GemFireException(String message) {
+    super(message);
+  }
+
+  /**
+   * Creates a new <code>GemFireException</code> with the given detail
+   * message and cause.
+   */
+  public GemFireException(String message, Throwable cause) {
+    super(message, cause);
+//    this.cause = cause;
+  }
+  
+  /**
+   * Creates a new <code>GemFireException</code> with the given cause and
+   * no detail message
+   */
+  public GemFireException(Throwable cause) {
+    super(cause);
+//    this.cause = cause;
+  }
+
+  ////////////////////  Instance Methods  ////////////////////
+
+  /**
+   * Returns the cause of this <code>GemFireException</code> or
+   * <code>null</code> if the cause is nonexistent or unknown.
+   */
+//  public Throwable getCause() {
+//    return this.cause;
+//  }
+
+  /**
+   * Returns the root cause of this <code>GemFireException</code> or
+   * <code>null</code> if the cause is nonexistent or unknown.
+   */
+  public Throwable getRootCause() {
+    if ( this.getCause() == null ) {
+      return null;
+    }
+    Throwable root = this.getCause();
+    while ( root.getCause() != null ) {
+      root = root.getCause();
+    }
+    return root;
+  }
+  
+//  public void printStackTrace() {
+//    super.printStackTrace();
+//    if (this.cause != null) {
+//      System.err.println("Caused by:");
+//      this.cause.printStackTrace();
+//    }
+//  }
+  
+//  public void printStackTrace(java.io.PrintWriter pw) {
+//    super.printStackTrace(pw);
+//
+//    if (this.cause != null) {
+//      pw.println("Caused by:");
+//      this.cause.printStackTrace(pw);
+//    }
+//  }
+//  
+//  public String getMessage() {
+//    if (this.cause != null) {
+//      String ourMsg = super.getMessage();
+//      if (ourMsg == null || ourMsg.length() == 0) {
+//        //ourMsg = super.toString(); //causes inifinite recursion
+//        ourMsg = "";
+//      }
+//      StringBuffer sb = new StringBuffer(ourMsg);
+//      sb.append(" Caused by: ");
+//      String causeMsg = this.cause.getMessage();
+//      if (causeMsg == null || causeMsg.length() == 0) {
+//        causeMsg = this.cause.toString();
+//      }
+//      sb.append(causeMsg);
+//      return sb.toString();
+//    } else {
+//      return super.getMessage();
+//    }
+//  }
+
+  /**
+   * Represent the receiver as well as the cause
+   */
+//  public String toString() {
+//    String result = super.toString();
+//    if (cause != null) {
+//      result = result + ", caused by " + cause.toString();
+//    }
+//    return result;
+//  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-old-client-support/src/main/java/com/gemstone/gemfire/OldClientSupportProvider.java
----------------------------------------------------------------------
diff --git a/geode-old-client-support/src/main/java/com/gemstone/gemfire/OldClientSupportProvider.java b/geode-old-client-support/src/main/java/com/gemstone/gemfire/OldClientSupportProvider.java
new file mode 100644
index 0000000..a2ee6ac
--- /dev/null
+++ b/geode-old-client-support/src/main/java/com/gemstone/gemfire/OldClientSupportProvider.java
@@ -0,0 +1,134 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+
+import org.apache.geode.cache.Cache;
+import org.apache.geode.internal.InternalDataSerializer;
+import org.apache.geode.internal.Version;
+import org.apache.geode.internal.VersionedDataOutputStream;
+import org.apache.geode.internal.cache.CacheService;
+import org.apache.geode.internal.cache.InternalCache;
+import org.apache.geode.internal.cache.tier.sockets.OldClientSupportService;
+import org.apache.geode.management.internal.beans.CacheServiceMBeanBase;
+
+import com.gemstone.gemfire.cache.execute.EmtpyRegionFunctionException;
+
+/**
+ * Support for old GemFire clients
+ */
+public class OldClientSupportProvider implements OldClientSupportService {
+  static final String GEODE = "org.apache.geode";
+  static final String GEMFIRE = "com.gemstone.gemfire";
+
+  /** returns the cache's OldClientSupportService */
+  public static OldClientSupportService getService(Cache cache) {
+    return (OldClientSupportService)((InternalCache)cache).getService(OldClientSupportService.class);
+  }
+
+  @Override
+  public void init(final Cache cache) {
+    InternalDataSerializer.setOldClientSupportService(this);
+  }
+
+  @Override
+  public Class<? extends CacheService> getInterface() {
+    return OldClientSupportService.class;
+  }
+
+  @Override
+  public CacheServiceMBeanBase getMBean() {
+    // no mbean services provided
+    return null;
+  }
+
+  @Override
+  public String processIncomingClassName(String name) {
+    if (name.startsWith(GEMFIRE)) {
+      return GEODE + name.substring(GEMFIRE.length());
+    }
+    return name;
+  }
+
+
+  @Override
+  public String processIncomingClassName(String name, DataInput in) {
+    // tcpserver was moved to a different package in Geode.  
+    String oldPackage = "com.gemstone.org.jgroups.stack.tcpserver";
+    String newPackage = "org.apache.geode.distributed.internal.tcpserver";
+    if (name.startsWith(oldPackage)) {
+      return newPackage + name.substring(oldPackage.length());
+    }
+    if (name.startsWith(GEMFIRE)) {
+      return GEODE + name.substring(GEMFIRE.length());
+    }
+    return name;
+  }
+
+
+  @Override
+  public String processOutgoingClassName(String name, DataOutput out) {
+    // tcpserver was moved to a different package in Geode
+    String oldPackage = "com.gemstone.org.jgroups.stack.tcpserver";
+    String newPackage = "org.apache.geode.distributed.internal.tcpserver";
+    if (name.startsWith(newPackage)) {
+      return oldPackage + name.substring(newPackage.length());
+    }
+    // if the client is old then it needs com.gemstone.gemfire package names
+    if (out instanceof VersionedDataOutputStream) {
+      VersionedDataOutputStream vout = (VersionedDataOutputStream)out;
+      Version version = vout.getVersion();
+      if (version != null && version.compareTo(Version.GFE_90) < 0) {
+        if (name.startsWith(GEODE)) {
+          name = GEMFIRE + name.substring(GEODE.length());
+        }
+      }
+    }
+    return name;
+  }
+
+
+  /**
+   * translates the given exception into one that can be sent to an old GemFire client
+   * @param theThrowable the exception to convert
+   * @param clientVersion the version of the client
+   * @return the exception to give the client
+   */
+  public Throwable getThrowable(Throwable theThrowable, Version clientVersion) {
+    
+    if (theThrowable == null) {
+      return theThrowable;
+    }
+    if (clientVersion.compareTo(Version.GFE_90) >= 0) {
+      return theThrowable;
+    }
+    
+    String className = theThrowable.getClass().getName();
+    
+    // this class has been renamed, so it cannot be automatically translated
+    // during java deserialization
+    if (className.equals("org.apache.geode.cache.execute.EmptyRegionFunctionException")) {
+      return new EmtpyRegionFunctionException(theThrowable.getMessage(), theThrowable.getCause());
+    }
+    
+    // other exceptions will be translated automatically by receivers
+    return theThrowable;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-old-client-support/src/main/java/com/gemstone/gemfire/cache/execute/EmtpyRegionFunctionException.java
----------------------------------------------------------------------
diff --git a/geode-old-client-support/src/main/java/com/gemstone/gemfire/cache/execute/EmtpyRegionFunctionException.java b/geode-old-client-support/src/main/java/com/gemstone/gemfire/cache/execute/EmtpyRegionFunctionException.java
new file mode 100644
index 0000000..775b3bf
--- /dev/null
+++ b/geode-old-client-support/src/main/java/com/gemstone/gemfire/cache/execute/EmtpyRegionFunctionException.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.cache.execute;
+
+import org.apache.geode.distributed.DistributedMember;
+
+/**
+ * Exception to indicate that Region is empty for data aware functions.
+ * 
+ * @author skumar
+ * @since 6.5
+ * @deprecated please use the org.apache.geode version of this class
+ * 
+ */
+public class EmtpyRegionFunctionException extends FunctionException {
+
+  private static final long serialVersionUID = 1L;
+
+  /**
+   * Construct an instance of EmtpyRegionFunctionException
+   * 
+   * @param cause
+   *                a Throwable cause of this exception
+   */
+  public EmtpyRegionFunctionException(Throwable cause) {
+    super(cause);
+  }
+
+  /**
+   * Construct an instance of EmtpyRegionFunctionException
+   * 
+   * @param msg
+   *                Exception message
+   */
+  public EmtpyRegionFunctionException(String msg) {
+    super(msg);
+  }
+
+  /**
+   * Construct an instance of EmtpyRegionFunctionException
+   * 
+   * @param msg
+   *                the error message
+   * @param cause
+   *                a Throwable cause of this exception
+   */
+  public EmtpyRegionFunctionException(String msg, Throwable cause) {
+    super(msg, cause);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-old-client-support/src/main/java/com/gemstone/gemfire/cache/execute/FunctionException.java
----------------------------------------------------------------------
diff --git a/geode-old-client-support/src/main/java/com/gemstone/gemfire/cache/execute/FunctionException.java b/geode-old-client-support/src/main/java/com/gemstone/gemfire/cache/execute/FunctionException.java
new file mode 100644
index 0000000..85fc24c
--- /dev/null
+++ b/geode-old-client-support/src/main/java/com/gemstone/gemfire/cache/execute/FunctionException.java
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.gemstone.gemfire.cache.execute;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import com.gemstone.gemfire.GemFireException;
+import org.apache.geode.internal.Assert;
+import org.apache.geode.cache.execute.Function;
+import org.apache.geode.cache.execute.FunctionContext;
+import org.apache.geode.cache.execute.FunctionService;
+
+/**
+ * Thrown to indicate an error or exceptional condition during the execution of 
+ * {@linkplain Function}s in GemFire. This exception can be thrown by GemFire 
+ * as well as user code, in the implementation of {@linkplain Function#execute(FunctionContext)}.
+ * When FunctionException is thrown in an implementation of 
+ * {@linkplain Function#execute(FunctionContext)}, GemFire will transmit it back 
+ * to, and throw it on, the calling side. For example, if a GemFire client 
+ * executes a Function on a server, and the function's execute method throws a
+ * FunctionException, the server logs the exception as a warning, and transmits
+ * it back to the calling client, which throws it. This allows for separation of
+ * business and error handling logic, as client code that processes function 
+ * execution results does not have to deal with errors; errors can be dealt with
+ * in the exception handling logic, by catching this exception.
+ *
+ * <p>The exception string provides details on the cause of failure.
+ * </p>
+ * 
+ * 
+ * @since GemFire 6.0
+ * @see FunctionService
+ * @deprecated please use the org.apache.geode version of this class
+ */
+public class FunctionException extends GemFireException {
+
+  private static final long serialVersionUID = 4893171227542647452L;
+
+  private transient ArrayList<Throwable> exceptions;
+
+  /**
+   * Creates new function exception with given error message.
+   * 
+   * @since GemFire 6.5
+   */
+  public FunctionException() {
+  }
+
+  /**
+   * Creates new function exception with given error message.
+   * 
+   * @param msg
+   * @since GemFire 6.0
+   */
+  public FunctionException(String msg) {
+    super(msg);
+  }
+
+  /**
+   * Creates new function exception with given error message and optional nested
+   * exception.
+   * 
+   * @param msg
+   * @param cause
+   * @since GemFire 6.0
+   */
+  public FunctionException(String msg, Throwable cause) {
+    super(msg, cause);
+  }
+
+  /**
+   * Creates new function exception given throwable as a cause and source of
+   * error message.
+   * 
+   * @param cause
+   * @since GemFire 6.0
+   */
+  public FunctionException(Throwable cause) {
+    super(cause);
+  }
+
+  /**
+   * Adds exceptions thrown from different nodes to a ds
+   * 
+   * @param cause
+   * @since GemFire 6.5
+   */
+  public final void addException(Throwable cause) {
+    Assert.assertTrue(cause != null,
+        "unexpected null exception to add to FunctionException");
+    getExceptions().add(cause);
+  }
+
+  /**
+   * Returns the list of exceptions thrown from different nodes
+   * 
+   * @since GemFire 6.5
+   */
+  public final List<Throwable> getExceptions() {
+    if (this.exceptions == null) {
+      this.exceptions = new ArrayList<Throwable>();
+    }
+    return this.exceptions;
+  }
+
+  /**
+   * Adds the list of exceptions provided
+   * 
+   * @since GemFire 6.5
+   */
+  public final void addExceptions(Collection<? extends Throwable> ex) {
+    getExceptions().addAll(ex);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-old-client-support/src/main/java/com/gemstone/gemfire/cache/execute/FunctionInvocationTargetException.java
----------------------------------------------------------------------
diff --git a/geode-old-client-support/src/main/java/com/gemstone/gemfire/cache/execute/FunctionInvocationTargetException.java b/geode-old-client-support/src/main/java/com/gemstone/gemfire/cache/execute/FunctionInvocationTargetException.java
new file mode 100644
index 0000000..0ef0fa9
--- /dev/null
+++ b/geode-old-client-support/src/main/java/com/gemstone/gemfire/cache/execute/FunctionInvocationTargetException.java
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.cache.execute;
+
+import org.apache.geode.distributed.DistributedMember;
+
+
+/**
+ * Thrown if one of the function execution nodes goes away or cache is closed.
+ * Function needs to be re-executed if the
+ * {@link FunctionException#getCause()} is FunctionInvocationTargetException.
+ * 
+ * @since GemFire 6.0
+ * @deprecated please use the org.apache.geode version of this class
+ * 
+ */
+public class FunctionInvocationTargetException extends FunctionException {
+
+  private static final long serialVersionUID = 1L;
+  
+  private DistributedMember id;
+  
+  /**
+   * Construct an instance of FunctionInvocationTargetException
+   * 
+   * @param cause
+   *                a Throwable cause of this exception
+   */
+  public FunctionInvocationTargetException(Throwable cause) {
+    super(cause);
+  }
+
+  /**
+   * Construct an instance of FunctionInvocationTargetException
+   * 
+   * @param msg
+   *                the error message
+   * @param id
+   *                the DistributedMember id of the source
+   * @since GemFire 6.5
+   * 
+   */
+  public FunctionInvocationTargetException(String msg, DistributedMember id) {
+    super(msg);
+    this.id = id;
+  }
+
+  /**
+   * Construct an instance of FunctionInvocationTargetException
+   * 
+   * @param msg
+   *                Exception message
+   */
+  public FunctionInvocationTargetException(String msg) {
+    super(msg);
+  }
+  /**
+   * Construct an instance of FunctionInvocationTargetException
+   * 
+   * @param msg
+   *                the error message
+   * @param cause
+   *                a Throwable cause of this exception
+   */
+  public FunctionInvocationTargetException(String msg, Throwable cause) {
+    super(msg, cause);
+  }
+  
+  /**
+   * Method to get the member id of the Exception
+   * 
+   * @return DistributedMember id
+   * @since GemFire 6.5
+   */
+  public DistributedMember getMemberId() {
+    return this.id;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-old-client-support/src/main/resources/META-INF/services/org.apache.geode.internal.cache.CacheService
----------------------------------------------------------------------
diff --git a/geode-old-client-support/src/main/resources/META-INF/services/org.apache.geode.internal.cache.CacheService b/geode-old-client-support/src/main/resources/META-INF/services/org.apache.geode.internal.cache.CacheService
new file mode 100644
index 0000000..dda3599
--- /dev/null
+++ b/geode-old-client-support/src/main/resources/META-INF/services/org.apache.geode.internal.cache.CacheService
@@ -0,0 +1 @@
+com.gemstone.gemfire.OldClientSupportProvider
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6555c86e/geode-old-client-support/src/test/java/com/gemstone/gemfire/ClientDataSerializableObject.java
----------------------------------------------------------------------
diff --git a/geode-old-client-support/src/test/java/com/gemstone/gemfire/ClientDataSerializableObject.java b/geode-old-client-support/src/test/java/com/gemstone/gemfire/ClientDataSerializableObject.java
new file mode 100644
index 0000000..9981ad5
--- /dev/null
+++ b/geode-old-client-support/src/test/java/com/gemstone/gemfire/ClientDataSerializableObject.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.geode.DataSerializable;
+
+public class ClientDataSerializableObject implements DataSerializable {
+
+  public ClientDataSerializableObject() {
+
+  }
+
+  @Override
+  public void toData(final DataOutput out) throws IOException {
+
+  }
+
+  @Override
+  public void fromData(final DataInput in) throws IOException, ClassNotFoundException {
+
+  }
+}