Examples of BadRequestException


Examples of org.apache.hadoop.yarn.webapp.BadRequestException

            entitiesItr.remove();
          }
        }
      }
    } catch (NumberFormatException e) {
      throw new BadRequestException(
          "windowStart, windowEnd or limit is not a numeric value.");
    } catch (IllegalArgumentException e) {
      throw new BadRequestException("requested invalid field.");
    } catch (IOException e) {
      LOG.error("Error getting entities", e);
      throw new WebApplicationException(e,
          Response.Status.INTERNAL_SERVER_ERROR);
    }
View Full Code Here

Examples of org.apache.hadoop.yarn.webapp.BadRequestException

            cleanupOwnerInfo(entity);
          }
        }
      }
    } catch (IllegalArgumentException e) {
      throw new BadRequestException(
          "requested invalid field.");
    } catch (IOException e) {
      LOG.error("Error getting entity", e);
      throw new WebApplicationException(e,
          Response.Status.INTERNAL_SERVER_ERROR);
View Full Code Here

Examples of org.apache.hadoop.yarn.webapp.BadRequestException

            eventsItr.remove();
          }
        }
      }
    } catch (NumberFormatException e) {
      throw new BadRequestException(
          "windowStart, windowEnd or limit is not a numeric value.");
    } catch (IOException e) {
      LOG.error("Error getting entity timelines", e);
      throw new WebApplicationException(e,
          Response.Status.INTERNAL_SERVER_ERROR);
View Full Code Here

Examples of org.apache.oodt.cas.product.jaxrs.exceptions.BadRequestException

      if (!file.exists() || file.isDirectory())
      {
        String message =
          "Could not locate the reference source file(s) in the data store.";
        LOGGER.log(Level.FINE, message);
        throw new BadRequestException(message);
      }

      httpHeaders.add("Content-Type", contentType);
      httpHeaders.add("Content-Disposition",
        "attachment; filename=\"" + file.getName() + "\"");
View Full Code Here

Examples of org.apache.rave.rest.exception.BadRequestException

    }

    @Override
    public RegionWidget createPageRegionRegionWidget(RegionWidget regionWidget) {
        if(regionWidget.getWidgetId() == null) {
            throw new BadRequestException("RegionWidget widgetId property must be defined.");
        }
        org.apache.rave.model.RegionWidget fromDb =
                pageService.addWidgetToPageRegion(page.getId(), regionWidget.getWidgetId(), region.getId());

        return new RegionWidget(fromDb);
View Full Code Here

Examples of org.archive.wayback.util.http.BadRequestException

    while(pos < max) {
      int next = in.read();
      buffer[pos] = (byte) next;
      if(next == LF) {
        if(pos == 0) {
          throw new BadRequestException(
              "Message cannot start with LF");
        }
        if(buffer[pos - 1] == CR) {
          found = true;
          break;
        }
      }
      pos++;
    }
    if(!found) {
      throw new BadRequestException("Message too long without CRLF");
    }
    return ByteOp.copy(buffer,0,pos+1);
  }
View Full Code Here

Examples of org.archive.wayback.util.http.BadRequestException

        break;
      }
      offset++;
    }
    if(found != max - 1) {
      throw new BadRequestException("Not enough fields(" + found +") " +
          "want("+max+") in (" + new String(buffer)+ ")");
    }
    return spaces;
  }
View Full Code Here

Examples of org.archive.wayback.util.http.BadRequestException

   
    byte[] buffer = new byte[MAX_HEADER_SIZE];

    int r = in.read(buffer, 0, MAX_HEADER_SIZE);
    if(r == MAX_HEADER_SIZE) {
      throw new BadRequestException("Request too long");
    }
    return new HttpRequest(message, ByteOp.copy(buffer,0,r));
  }
View Full Code Here

Examples of org.candlepin.common.exceptions.BadRequestException

        ActivationKey key1 = new ActivationKey("key1", owner);
        keys.add(key1);
        key1.setServiceLevel("I don't exist");

        Consumer consumer = new Consumer("sys.example.com", null, null, system);
        doThrow(new BadRequestException("exception")).when(serviceLevelValidator)
            .validate(eq(owner), eq(key1.getServiceLevel()));
        consumerBindUtil.handleActivationKeys(consumer, keys);
    }
View Full Code Here

Examples of org.cruxframework.crux.core.server.rest.spi.BadRequestException

            properties[i].getWriteMethod().invoke(result, params[i].inject(request));
          }
        }
        catch (Exception e)
        {
      throw new BadRequestException("Can not read request values for ValueObject parameter: " + baseClass.getCanonicalName(),
                      "Can not read request parameter for path: " + request.getUri().getPath(), e);
        }
    return result;
    }
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.