When the ActiveMQ client attempts to unpack an ObjectMessage that contains a proxy with a mix of JDK and non-JDK interfaces the ClassLoadingAwareObjectInputStream chooses ONLY the ClassLoader from the first interface in the array of interfaces represented by the proxy. This means that if a proxy's first interface is a JDK class (java.util.List, java.sql.Blob) the core ClassLoader is used. In the event that a non-JDK interface is present in the list of proxied interfaces the same core ClassLoader is used. The Proxy.getProxyClass subsequently throws an IllegalArgumentException because the non-JDK interface class cannot be loaded by the core ClassLoader.
This problem is extant during deserialization of an ObjectMessage payload that contains a proxy that implements [java.sql.Blob, org.hibernate.engine.jdbc.WrappedBlob, java.io.Serializable] (a blob proxy created by hibernate SerializableBlobProxy). The impact of this bug is that users of Hibernate cannot use ActiveMQ as a messaging framework if they need to package ValueObjects that have mapped lobs.