Package java.io

Examples of java.io.NotSerializableException


        private String fieldName;

        /** Constructs a HintElement representing a serializable object. */
        public HintElement(Object obj) throws NotSerializableException {
            if(!(obj instanceof Serializable)) {
                throw new NotSerializableException();
            }
            type = TYPE_OBJECT;
            this.obj = obj;
        }
View Full Code Here


         // a null response is 99% likely to be due to a marshalling problem - we throw a NSE, this needs to be changed when
         // JGroups supports http://jira.jboss.com/jira/browse/JGRP-193
         // the serialization problem could be on the remote end and this is why we cannot catch this above, when marshalling.
         if (retval == null)
            throw new NotSerializableException("RpcDispatcher returned a null.  This is most often caused by args for "
                  + command.getClass().getSimpleName() + " not being serializable.");

         if (supportReplay) {
            boolean replay = false;
            Vector<Address> ignorers = new Vector<Address>();
View Full Code Here

     * @since 1.1.0
     */
    void writePC(ObjectOutputStream oos, PersistenceCapable pc)
        throws IOException {
        if (!Serializable.class.isAssignableFrom(_meta.getDescribedType()))
            throw new NotSerializableException(_meta.getDescribedType().getName());

        oos.writeObject(pc);
    }
View Full Code Here

  odesc = (OperationDescriptor)JAI.getDefaultInstance().
        getOperationRegistry().
      getDescriptor(modeName, operationName);

  if (odesc == null) {
      throw new NotSerializableException(operationName + " " +
          JaiI18N.getString("ParameterBlockJAI1"));
  }
    }   
View Full Code Here

   */
  @Test
  public void valueMap() throws IOException
  {
    CheckingObjectOutputStream checker = new CheckingObjectOutputStream(new ByteArrayOutputStream(),
        new ObjectSerializationChecker(new NotSerializableException()));
    checker.writeObject(new ValueMap());
  }
View Full Code Here

   */
  @Test
  public void nonSerializableTypeDetection() throws IOException
  {
    CheckingObjectOutputStream checker = new CheckingObjectOutputStream(new ByteArrayOutputStream(),
      new ObjectSerializationChecker(new NotSerializableException()));
    String exceptionMessage = null;
    try
    {
      checker.writeObject(new TestType2());
    }
View Full Code Here

        }
    }

    private void writeObject(ObjectOutputStream stream) throws IOException {
        if (rset != null) {
            throw new NotSerializableException(DBReader.class.getName() + " (due to attached ResultSet)");
        }
    }
View Full Code Here

    }

    public void encode(IoSession session, Object message,
            ProtocolEncoderOutput out) throws Exception {
        if (!(message instanceof Serializable)) {
            throw new NotSerializableException();
        }

        ByteBuffer buf = ByteBuffer.allocate(64);
        buf.setAutoExpand(true);
        buf.putObject(message);
View Full Code Here

    // REVISIT: Forbid serialization of PSVI DOM until
    // we support object serialization of grammars -- mrglavas
   
    private void writeObject(ObjectOutputStream out)
        throws IOException {
        throw new NotSerializableException(getClass().getName());
    }
View Full Code Here

        throw new NotSerializableException(getClass().getName());
    }

    private void readObject(ObjectInputStream in)
        throws IOException, ClassNotFoundException {
        throw new NotSerializableException(getClass().getName());
    }
View Full Code Here

TOP

Related Classes of java.io.NotSerializableException

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.