Examples of SerializationException


Examples of com.google.gwt.user.client.rpc.SerializationException

            return AutoBeanCodex.encode(bean).getPayload();

        } catch (RuntimeException e) {

            throw new SerializationException(e);

        }
    }
View Full Code Here

Examples of com.google.gwt.user.client.rpc.SerializationException

                Serializer serializer = getRPCSerializer();
                ClientSerializationStreamReader reader = new ClientSerializationStreamReader(serializer);
                reader.prepareToRead(message);
                objects.add(reader.readObject());
            } catch (RuntimeException e) {
                throw new SerializationException(e);
            }
        }

        return objects;
    }
View Full Code Here

Examples of com.google.gwt.user.client.rpc.SerializationException

            ClientSerializationStreamWriter writer = new ClientSerializationStreamWriter(serializer, GWT.getModuleBaseURL(), GWT.getPermutationStrongName());
            writer.prepareToWrite();
            writer.writeObject(message);
            return writer.toString();
        } catch (RuntimeException e) {
            throw new SerializationException(e);
        }
    }
View Full Code Here

Examples of com.netflix.astyanax.connectionpool.exceptions.SerializationException

        if (compareByteArrays(prefixBytes.array(),
                prefixBytes.arrayOffset() + prefixBytes.position(),
                prefixBytes.remaining(), dup.array(), dup.arrayOffset()
                        + dup.position(), prefixBytes.remaining()) != 0) {
            log.error("Unprefixed value received, throwing exception...");
            throw new SerializationException("Unexpected prefix value");
        }
        dup.position(prefixBytes.remaining());
        S s = suffixSerializer.fromByteBuffer(dup);
        return s;
     }
View Full Code Here

Examples of com.nokia.dempsy.serialization.SerializationException

                try
                {
                    info = objectMapper.readValue(jsonData, ArrayList.class);
                } catch (final Exception e)
                {
                    throw new SerializationException("Error occured while deserializing data " + jsonData, e);
                }
            }
            return (info != null && info.size() > 0) ? info.get(0) : null;
        }
View Full Code Here

Examples of com.nokia.dempsy.serialization.SerializationException

                try
                {
                    jsonData = objectMapper.writeValueAsString(arr);
                } catch (final Exception e)
                {
                    throw new SerializationException("Error occured during serializing class " +
                            SafeString.valueOfClass(data) + " with information " + SafeString.valueOf(data), e);
                }
            }
            return (jsonData != null) ? jsonData.getBytes() : null;
        }
View Full Code Here

Examples of com.nokia.dempsy.serialization.SerializationException

         k.kryo.writeClassAndObject(k.output, object);
         return k.output.toBytes();
      }
      catch (KryoException ke)
      {
         throw new SerializationException("Failed to serialize.",ke);
      }
      catch (IllegalArgumentException e) // this happens when requiring registration but serializing an unregistered class
      {
         throw new SerializationException("Failed to serialize " + SafeString.objectDescription(object) +
               " (did you require registration and attempt to serialize an unregistered class?)", e);
      }
      finally
      {
         if (k != null)
View Full Code Here

Examples of com.nokia.dempsy.serialization.SerializationException

         k.input.setBuffer(data);
         return (T)(k.kryo.readClassAndObject(k.input))
      }
      catch (KryoException ke)
      {
         throw new SerializationException("Failed to deserialize.",ke);
      }
      catch (IllegalArgumentException e) // this happens when requiring registration but deserializing an unregistered class
      {
         throw new SerializationException("Failed to deserialize. Did you require registration and attempt to deserialize an unregistered class?", e);
      }
      finally
      {
         if (k != null)
            kryopool.offer(k);
View Full Code Here

Examples of com.nokia.dempsy.serialization.SerializationException

         in = new ObjectInputStream(bis);
         @SuppressWarnings("unchecked")
         T readObject = (T) ((ObjectInputStream)in).readObject();
         return readObject;
      }
      catch(IOException e) { throw new SerializationException(e); }
      catch(ClassNotFoundException e) { throw new SerializationException(e); }
   }
View Full Code Here

Examples of com.nokia.dempsy.serialization.SerializationException

      {
         out = new ObjectOutputStream(bos);
         out.writeObject(object); // no need to reset the stream since we're tossing it.
         out.flush();
      }
      catch(IOException e) { throw new SerializationException(e); }

      byte[] data = bos.toByteArray();
      return data;
   }
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.