Examples of ObjectIOException


Examples of com.sun.sgs.app.ObjectIOException

     * the return value is not null.
     */
    private ManagedObject deserialize(byte[] data) {
  Object obj = SerialUtil.deserialize(data, context.classSerial);
  if (obj == null) {
      throw new ObjectIOException(
    "Managed object must not deserialize to null", false);
  } else if (!(obj instanceof ManagedObject)) {
      throw new ObjectIOException(
    "Deserialized object must implement ManagedObject", false);
  }
  return (ManagedObject) obj;
    }
View Full Code Here

Examples of com.sun.sgs.app.ObjectIOException

  try {
      in = new CustomClassDescriptorObjectInputStream(
    new CompressByteArrayInputStream(data), classSerial);
      return in.readObject();
  } catch (ClassNotFoundException e) {
      throw new ObjectIOException(
    "Class not found while deserializing object: " +
    e.getMessage(),
    e, false);
  } catch (IOException e) {
      throw new ObjectIOException(
    "Problem deserializing object: " + e.getMessage(), e, false);
  } finally {
      if (in != null) {
    try {
        in.close();
View Full Code Here

Examples of com.sun.sgs.app.ObjectIOException

      throw new TransactionNotActiveException(
    "Attempt to perform an operation during serialization that " +
    "requires a active transaction: " + e.getMessage(),
    e);
  } catch (IOException e) {
      throw new ObjectIOException(
    "Problem serializing object: " + e.getMessage(), e, false);
  } finally {
      if (out != null) {
    try {
        out.close();
View Full Code Here

Examples of com.sun.sgs.app.ObjectIOException

      if (object == null) {
    return null;
      }
      Class<?> cl = object.getClass();
      if (object != topLevelObject && object instanceof ManagedObject) {
    throw new ObjectIOException(
        "ManagedObject was not referenced through a " +
        "ManagedReference: " + Objects.safeToString(object),
        false);
      } else if (object instanceof Serializable) {
    classSerial.checkInstantiable(ObjectStreamClass.lookup(cl));
View Full Code Here

Examples of com.sun.sgs.app.ObjectIOException

      {
    Class<?> cl = object.getClass();
    if (object != topObject && object instanceof ManagedObject) {
        stack.push("object (class \"" + cl.getName() + "\", " +
             Objects.safeToString(object) + ")");
        throw new ObjectIOException(
      "ManagedObject was not referenced through a " +
      "ManagedReference:\n" + stack,
      cause, false);
    }
    seen.put(object, Boolean.TRUE);
View Full Code Here

Examples of com.sun.sgs.app.ObjectIOException

      if (!cl.isLocalClass() && !Modifier.isStatic(cl.getModifiers())) {
    Class<?> enclosingClass = cl.getEnclosingClass();
    if (enclosingClass != null &&
        ManagedObject.class.isAssignableFrom(enclosingClass))
    {
        throw new ObjectIOException(
      "ManagedObject of type " + enclosingClass.getName() +
      " was not referenced through a ManagedReference" +
      " because of a reference from an inner class:\n" +
      stack,
      cause, false);
View Full Code Here

Examples of com.sun.sgs.app.ObjectIOException

  try {
      UpdateMapsResult result = updateMaps(
    classId, getClassDesc(store.getClassInfo(txn, classId)));
      return result.classDesc;
  } catch (ClassInfoNotFoundException e) {
      throw new ObjectIOException(
    "Problem deserializing class descriptor: " + e.getMessage(),
    e, false);
  }
    }
View Full Code Here

Examples of com.sun.sgs.app.ObjectIOException

      objectOut = new ObjectOutputStream(byteOut);
      objectOut.writeObject(classDesc);
      objectOut.flush();
      return byteOut.toByteArray();
  } catch (IOException e) {
      throw new ObjectIOException(
    "Problem serializing class descriptor: " + e.getMessage(),
    e, false);
  } finally {
      if (objectOut != null) {
    try {
View Full Code Here

Examples of com.sun.sgs.app.ObjectIOException

        in.close();
    } catch (IOException e) {
    }
      }
  }
  throw new ObjectIOException(
      "Problem obtaining class descriptor: " + exception.getMessage(),
      exception, false);
    }
View Full Code Here

Examples of com.sun.sgs.app.ObjectIOException

     * the return value is not null.
     */
    private ManagedObject deserialize(byte[] data) {
  Object obj = SerialUtil.deserialize(data, context.classSerial);
  if (obj == null) {
      throw new ObjectIOException(
    "Managed object must not deserialize to null", false);
  } else if (!(obj instanceof ManagedObject)) {
      throw new ObjectIOException(
    "Deserialized object must implement ManagedObject", false);
  }
  return (ManagedObject) obj;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.