Package java.io

Examples of java.io.InvalidObjectException


    {
      return ((DataGraphImpl)dataGraph).getWriteReplacement((EObject)dataObject);
    }
    else
    {
      throw new InvalidObjectException("The object must be in a datagraph to be serialized " + dataObject);
    }
  }
View Full Code Here


        }

        try {
            return PortableRemoteObject.narrow(getOrb().string_to_object(ior), type);
        } catch (Exception e) {
            throw (InvalidObjectException) new InvalidObjectException("Unable to convert IOR into object").initCause(e);
        }
    }
View Full Code Here

        }
        throw new IllegalArgumentException("Event is not a serialized LogEvent: " + event.toString());
    }

    private void readObject(final ObjectInputStream stream) throws InvalidObjectException {
        throw new InvalidObjectException("Proxy required");
    }
View Full Code Here

         }
         return remoteReadResolve();
      }
      catch (Exception e)
      {
         InvalidObjectException ex = new InvalidObjectException(e.getMessage());
         ex.setStackTrace(e.getStackTrace());
         ex.initCause(e);
         throw ex;
      }
   }  
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 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

    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

  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.