Package java.io

Examples of java.io.InvalidObjectException


    return (EntityManagerFactory)result;
  }

  private void writeObject(ObjectOutputStream oos) throws IOException {
    if (entityManagerFactoryName == null) {
      throw new InvalidObjectException( "could not serialize entity manager factory with null entityManagerFactoryName" );
    }
    oos.defaultWriteObject();
  }
View Full Code Here


      case 2:
        memberName = in.readUTF();
        methodSig = in.readUTF();
        break;
      default:
        throw new InvalidObjectException("Unexpected input");
    }
    sourceLine = in.readInt();
    sourceUri = (String) in.readObject();
    symbolName = in.readUTF();
    typeId = in.readInt();
View Full Code Here

      {
         return ENUMERATION[ordinal];
      }
      else
      {
         throw new InvalidObjectException("Corrupted ordinal value" + ordinal);
      }
   }
View Full Code Here

    if (result==null) {
      // in case we were deserialized in a different JVM, look for an instance with the same name
      // (alternatively we could do an actual JNDI lookup here....)
      result = SessionFactoryObjectFactory.getNamedInstance(name);
      if (result==null) {
        throw new InvalidObjectException("Could not find a SessionFactory named: " + name);
      }
      else {
        log.debug("resolved SessionFactory by name");
      }
    }
View Full Code Here

      log.trace( "could not locate session factory by uuid [" + uuid + "] during session deserialization; trying name" );
      if ( isNamed ) {
        result = SessionFactoryObjectFactory.getNamedInstance( name );
      }
      if ( result == null ) {
        throw new InvalidObjectException( "could not resolve session factory during session deserialization [uuid=" + uuid + ", name=" + name + "]" );
      }
    }
    return ( SessionFactoryImpl ) result;
  }
View Full Code Here

    if ( name.equals(READ_ONLY.name) ) return READ_ONLY;
    if ( name.equals(DELETED.name) ) return DELETED;
    if ( name.equals(GONE.name) ) return GONE;
    if ( name.equals(LOADING.name) ) return LOADING;
    if ( name.equals(SAVING.name) ) return SAVING;
    throw new InvalidObjectException( "invalid Status" );
  }
View Full Code Here

        rtn.nullifiableEntityKeys.add( EntityKey.deserialize( ois, session ) );
      }

    }
    catch ( HibernateException he ) {
      throw new InvalidObjectException( he.getMessage() );
    }

    return rtn;
  }
View Full Code Here

  }

  private Object readResolve() throws ObjectStreamException {
    Object resolved = parse( name );
    if ( resolved == null ) {
      throw new InvalidObjectException( "unknown result style [" + name + "]" );
    }
    return resolved;
  }
View Full Code Here

  private static EntityManagerFactory getNamedEntityManagerFactory(String entityManagerFactoryName) throws InvalidObjectException {
    Object result = EntityManagerFactoryRegistry.INSTANCE.getNamedEntityManagerFactory(entityManagerFactoryName);

    if ( result == null ) {
      throw new InvalidObjectException( "could not resolve entity manager factory during entity manager deserialization [name=" + entityManagerFactoryName + "]" );
    }

    return (EntityManagerFactory)result;
  }
View Full Code Here

    return (EntityManagerFactory)result;
  }

  private void writeObject(ObjectOutputStream oos) throws IOException {
    if (entityManagerFactoryName == null) {
      throw new InvalidObjectException( "could not serialize entity manager factory with null entityManagerFactoryName" );
    }
    oos.defaultWriteObject();
  }
View Full Code Here

TOP

Related Classes of java.io.InvalidObjectException

Copyright © 2018 www.massapicom. 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.