Package org.apache.uima.ducc.common.exception

Examples of org.apache.uima.ducc.common.exception.DuccRuntimeException


    return broker_url;
  }
 
  private void nonempty(String key, String value) throws DuccRuntimeException {
    if(value == null) {
      throw new DuccRuntimeException("missing value for "+key);
    }
  }
View Full Code Here


                if ( o != null ) {
                  String body = XStreamUtils.marshall(o);
                  exchange.getOut().setBody(body);
                  exchange.getOut().setHeader("content-length", body.length());
                } else {
                  duccLogger.warn("RouteBuilder.configure", null, new DuccRuntimeException("Orchestrator Has Not Provided a Reply Object."));
                  exchange.getOut().setHeader(Exchange.HTTP_RESPONSE_CODE, 500);
                }
              }
            })
            ;
View Full Code Here

            if ( o != null ) {
                String body = XStreamUtils.marshall(o);
                exchange.getOut().setBody(body);
                exchange.getOut().setHeader("content-length", body.length());
            } else {
                logger.warn("RouteBuilder.configure", null, new DuccRuntimeException("No reply object was provided."));
                exchange.getOut().setHeader(Exchange.HTTP_RESPONSE_CODE, 500);
            }
        }
View Full Code Here

        String msg = e.getMessage();
        // Only retry if AMQ failed to create a temp queue
        if (msg != null && msg.startsWith("Failed to resolve replyTo destination on the exchange")) {
          ree = e;
        } else {
          throw new DuccRuntimeException("Ducc JMS Dispatcher is unable to deliver a request.", e);
        }
      }
    }
    // when retries hit the threshold, just throw an exception
    if (i == maxRetryCount) {
      throw new DuccRuntimeException(
              "ActiveMQ failed to create temp reply queue. After 20 attempts to deliver request to the OR, Ducc JMS Dispatcher is giving up.",
              ree);
    }
    return unmarshallDuccEvent(reply);
  }
View Full Code Here

                sb.append(new String(slice, 0, bytes_read));
            }
            return (DuccEvent)XStreamUtils.unmarshall(sb.toString());
        } else {
            String body = method.getResponseBodyAsString();
            throw new DuccRuntimeException("Ducc Unable to Process Request. Http Response Code:"+method.getStatusLine().getStatusCode()+". Ducc Service (OR) Returned Exception:",new Exception(body));
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.uima.ducc.common.exception.DuccRuntimeException

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.