在OSGi环境下采用以下方式对其它bundle的类进行反序列化时,会出现ClassNotFoundException异常. ByteArrayInputStream bi = new ByteArrayInputStream(bytes); ObjectInputStream oi = new ObjectInputStream(bi); Object obj = oi.readObject(); 经检查java.io.ObjectInputStream.resolveClass(ObjectS…