Package java.io

Examples of java.io.InvalidObjectException


    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

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

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

    return rtn;
  }
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

  }

  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

    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 stub SessionFactory named: " + name);
      }
      else {
        log.debug("resolved stub SessionFactory by name");
      }
    }
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

    }

    @Override
    public void validateObject() throws InvalidObjectException {
        if (serverName == null) {
            throw new InvalidObjectException("serverName is null");
        }
        if (portOffset < 0) {
            throw new InvalidObjectException("portOffset is out of range");
        }
        if (updates == null) {
            throw new InvalidObjectException("updates is null");
        }
        if (startServices == null) {
            throw new InvalidObjectException("startServices is null");
        }
    }
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

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.