diff --git a/serializer-deserializer/src/main/java/com/amazonaws/services/schemaregistry/deserializers/protobuf/ProtobufWireFormatDecoder.java b/serializer-deserializer/src/main/java/com/amazonaws/services/schemaregistry/deserializers/protobuf/ProtobufWireFormatDecoder.java index 97fbf20c..09a17d33 100644 --- a/serializer-deserializer/src/main/java/com/amazonaws/services/schemaregistry/deserializers/protobuf/ProtobufWireFormatDecoder.java +++ b/serializer-deserializer/src/main/java/com/amazonaws/services/schemaregistry/deserializers/protobuf/ProtobufWireFormatDecoder.java @@ -69,7 +69,7 @@ private DynamicMessage deserializeToDynamicMessage(final Descriptors.Descriptor private Object deserializeToPojo(final Descriptors.Descriptor descriptor, final CodedInputStream codedInputStream) { final String className = ProtobufClassName.from(descriptor); try { - final Class classType = Class.forName(className); + final Class classType = Thread.currentThread().getContextClassLoader().loadClass(className); final Method parseMethod = classType.getMethod("parseFrom", CodedInputStream.class); return parseMethod.invoke(classType, codedInputStream); } catch (Exception e) {