Package com.persistit.exception

Examples of com.persistit.exception.ConversionException


        if (target instanceof Externalizable) {
            try {
                ((Externalizable) target).readExternal(value.getObjectInputStream());
            } catch (final Exception e) {
                throw new ConversionException("Invoking readExternal for " + _clazz, e);
            }
        } else if (_readObjectMethod != null) {
            invokeMethod(value, _readObjectMethod, target, new Object[] { value.getObjectInputStream() }, true);
        } else {
            renderDefaultFields(value, target);
View Full Code Here


            for (int index = 0; index < accessors.length; index++) {
                accessor = accessors[index];
                accessor.fromValue(target, value);
            }
        } catch (final Exception e) {
            throw new ConversionException("Decoding " + accessor.toString() + " for " + _clazz, e);
        }
    }
View Full Code Here

        abstract void fromValue(Object object, Value value) throws Exception;

        abstract void toValue(Object object, Value value) throws Exception;

        protected void cantModifyFinalField() {
            throw new ConversionException("Can not modify final field " + _field.getName());
        }
View Full Code Here

            for (int index = 0; index < count; index++) {
                accessor = keyBuilder.getAccessor(index);
                accessor.toKey(object, key);
            }
        } catch (final Exception e) {
            throw new ConversionException("Encoding " + accessor.toString() + " for " + getClientClass(), e);
        }
    }
View Full Code Here

                    + " does not match requested class " + clazz.getName());
        Object instance;
        try {
            instance = getClientClass().newInstance();
        } catch (final Exception e) {
            throw new ConversionException("Unable to instantiate an instance of " + getClientClass(), e);

        }
        renderKeySegment(key, instance, clazz, context);

        return readResolve(instance);
View Full Code Here

            for (int index = 0; index < count; index++) {
                accessor = _keyBuilder.getAccessor(index);
                accessor.fromKey(target, key);
            }
        } catch (final Exception e) {
            throw new ConversionException("Decoding " + accessor.toString() + " for " + getClientClass(), e);
        }
    }
View Full Code Here

                if (context == _secondaryKeyTupleList.get(index)) {
                    return (Builder) context;
                }
            }
        }
        throw new ConversionException("No such Builder " + context);
    }
View Full Code Here

        throw new ConversionException("No such Builder " + context);
    }

    private void checkKeyAccessors() {
        if (_keyBuilder.getSize() == 0) {
            throw new ConversionException("ObjectCoder for class " + getClientClass().getName()
                    + " has no Key fields or properties");
        }
    }
View Full Code Here

        ObjectStreamClass _classDescriptor;

        private OldValueInputStream(final Value value, final ObjectStreamClass classDescriptor) throws IOException {
            this(value);
            if (classDescriptor == null) {
                throw new ConversionException("Null class descriptor");
            }
            _value = value;
            _classDescriptor = classDescriptor;
        }
View Full Code Here

                ObjectStreamClass classDescriptor = null;
                if (classInfo != null) {
                    classDescriptor = classInfo.getClassDescriptor();
                }
                if (classDescriptor == null) {
                    throw new ConversionException("Unknown class handle " + handle);
                }
                return classDescriptor;
            } else {
                _innerClassDescriptor = true;
                return _classDescriptor;
View Full Code Here

TOP

Related Classes of com.persistit.exception.ConversionException

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.