protected void increaseNestCollectionLevel() { nestCollectionLevel++; if (nestCollectionLevel > context.maxCollectionNestLevel) { SerializationException se = new SerializationException(); se.setMessage(10316, new Object[] {context.maxCollectionNestLevel}); throw se; } }
protected void increaseNestObjectLevel() { nestObjectLevel++; if (nestObjectLevel > context.maxObjectNestLevel) { SerializationException se = new SerializationException(); se.setMessage(10315, new Object[] {context.maxObjectNestLevel}); throw se; } }
protected void increaseNestCollectionLevel() { nestCollectionLevel++; if (nestCollectionLevel > context.maxCollectionNestLevel) { SerializationException se = new SerializationException(); se.setMessage(10316, new Object[] {context.maxCollectionNestLevel}); throw se; } }
protected void increaseNestObjectLevel() { nestObjectLevel++; if (nestObjectLevel > context.maxObjectNestLevel) { SerializationException se = new SerializationException(); se.setMessage(10315, new Object[] {context.maxObjectNestLevel}); throw se; } }
/** * A utility method that is used by subclasses to perform max-string-bytes * checks. By default, max-string-bytes is limited to 25MB for security * but this can be changed via JVM option called max-string-bytes. * * @param utflen The UTF string length to check. * @throws <tt>SerializationException</tt> if max-string-bytes has been exceeded. */ protected void checkUTFLength(int utflen) { if (utflen > maxStringBytes) { // Error deserializing the string with length ''{0}'', it exceeds the max-string-bytes limit of ''{1}''. SerializationException ex = new SerializationException(); ex.setMessage(10314, new Object[] {utflen, maxStringBytes}); throw ex; } }
/** * A utility method that is used by subclasses to perform max-string-bytes * checks. By default, max-string-bytes is limited to 25MB for security * but this can be changed via JVM option called max-string-bytes. * * @param utflen The UTF string length to check. * @throws <tt>SerializationException</tt> if max-string-bytes has been exceeded. */ protected void checkUTFLength(int utflen) { if (utflen > maxStringBytes) { // Error deserializing the string with length ''{0}'', it exceeds the max-string-bytes limit of ''{1}''. SerializationException ex = new SerializationException(); ex.setMessage(10314, new Object[] {utflen, maxStringBytes}); throw ex; } }
/** * */ protected void readExternalizable(String className, Object object) throws ClassNotFoundException, IOException { if (object instanceof Externalizable) { if (isDebug) trace.startExternalizableObject(className, objectTable.size() - 1); ((Externalizable)object).readExternal(this); } else { //Class '{className}' must implement java.io.Externalizable to receive client IExternalizable instances. SerializationException ex = new SerializationException(); ex.setMessage(10305, new Object[] {object.getClass().getName()}); throw ex; } }
/** * */ protected void readExternalizable(String className, Object object) throws ClassNotFoundException, IOException { if (object instanceof Externalizable) { if (isDebug) trace.startExternalizableObject(className, objectTable.size() - 1); ((Externalizable)object).readExternal(this); } else { //Class '{className}' must implement java.io.Externalizable to receive client IExternalizable instances. SerializationException ex = new SerializationException(); ex.setMessage(10305, new Object[] {object.getClass().getName()}); throw ex; } }
/** * @exclude */ protected void readExternalizable(String className, Object object) throws ClassNotFoundException, IOException { if (object instanceof Externalizable) { if (isDebug) { trace.startExternalizableObject(className, objectTable.size() - 1); } ((Externalizable)object).readExternal(this); } else { //Class '{className}' must implement java.io.Externalizable to receive client IExternalizable instances. SerializationException ex = new SerializationException(); ex.setMessage(10305, new Object[] {object.getClass().getName()}); throw ex; } }
SerializationException se = new SerializationException(); se.setMessage(10313, new Object[]{obj == null? NULL : obj.getClass().getName(), index}); se.setRootCause(e); SerializationException se = new SerializationException(); se.setMessage(10313, new Object[]{obj == null? NULL : obj.getClass().getName(), index}); throw se;
SerializationException se = new SerializationException(); se.setMessage(10313, new Object[]{obj == null? NULL : obj.getClass().getName(), index}); se.setRootCause(e); SerializationException se = new SerializationException(); se.setMessage(10313, new Object[]{obj == null? NULL : obj.getClass().getName(), index}); throw se;
SerializationException se = new SerializationException(); se.setMessage(10312, new Object[]{obj == null? NULL : obj.getClass().getName(), propName}); se.setRootCause(e); SerializationException se = new SerializationException(); se.setMessage(10312, new Object[]{obj == null? NULL : obj.getClass().getName(), propName}); throw se;
SerializationException se = new SerializationException(); se.setMessage(10311, new Object[]{cls == null? NULL : cls.getName()}); se.setRootCause(e); SerializationException se = new SerializationException(); se.setMessage(10311, new Object[]{cls == null? NULL : cls.getName()}); throw se;
SerializationException se = new SerializationException(); se.setMessage(10311, new Object[]{cls == null? NULL : cls.getName()}); se.setRootCause(e); SerializationException se = new SerializationException(); se.setMessage(10311, new Object[]{cls == null? NULL : cls.getName()}); throw se;
methodResult = new SerializationException(); methodResult.setMessage(UNHANDLED_ERROR); methodResult.setRootCause(t);
/** * An unhandled error happened somewhere between the SerializationFilter and the * ErrorFilter... we ignore all request bodies and attempt to send back a single response * body to the client. It will not make it back to a custom responder, but the NetConnection * Debugger will show the event. */ private void unhandledError(ActionContext context, Throwable t) { ActionMessage responseMessage = new ActionMessage(); context.setResponseMessage(responseMessage); MessageBody responseBody = new MessageBody(); responseBody.setTargetURI(context.getRequestMessageBody().getResponseURI()); context.getResponseMessage().addBody(responseBody); MessageException methodResult; if (t instanceof MessageException) { methodResult = (MessageException)t; } else { // An unhandled error occurred while processing client request(s). methodResult = new SerializationException(); methodResult.setMessage(UNHANDLED_ERROR); methodResult.setRootCause(t); } responseBody.setData(methodResult); responseBody.setReplyMethod(MessageIOConstants.STATUS_METHOD); logger.info(t.getMessage()); }
methodResult = new SerializationException(); methodResult.setMessage(UNHANDLED_ERROR); methodResult.setRootCause(t);
methodResult = new SerializationException(); methodResult.setMessage(UNHANDLED_SERIALIZATION_ERROR); methodResult.setRootCause(t);
methodResult = new SerializationException(); methodResult.setMessage(REQUEST_ERROR); methodResult.setRootCause(t);
methodResult = new SerializationException(); methodResult.setMessage(REQUEST_ERROR); methodResult.setRootCause(t);