Examples of InternalServerErrorException


Examples of javax.ws.rs.InternalServerErrorException

        try {
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
            IOUtils.copy(is, bos, 1024);
            return new String(bos.toByteArray(), encoding);
        } catch (Exception ex) {
            throw new InternalServerErrorException(ex);
        }
    }
View Full Code Here

Examples of javax.ws.rs.InternalServerErrorException

                params.add(HttpUtils.urlDecode(name),
                           decode ? HttpUtils.urlDecode(value) : value);
            } catch (IllegalArgumentException ex) {
                LOG.warning("Illegal URL-encoded characters, make sure that no "
                    + "@FormParam and @Multipart annotations are mixed up");
                throw new InternalServerErrorException();
            } catch (IOException ex) {
                throw new BadRequestException();
            }
        }
    }
View Full Code Here

Examples of javax.ws.rs.InternalServerErrorException

            int maxPartsCount = Integer.valueOf(maxPartsCountProp);
            if (maxPartsCount != -1 && numberOfParts >= maxPartsCount) {
                throw new WebApplicationException(413);
            }
        } catch (NumberFormatException ex) {
            throw new InternalServerErrorException();
        }
    }
View Full Code Here

Examples of javax.ws.rs.InternalServerErrorException

                                                   parameter);
        LOG.severe(errorMessage.toString());
        Response r = Response.status(Response.Status.INTERNAL_SERVER_ERROR)
                         .type(MediaType.TEXT_PLAIN_TYPE)
                         .entity(errorMessage.toString()).build();
        throw new InternalServerErrorException(r);
    }
View Full Code Here

Examples of javax.ws.rs.InternalServerErrorException

                    + " due to InvocationTargetException";
                throw new WebApplicationException(Response.serverError().entity(msg).build());
            } catch (IllegalAccessException ex) {
                String msg = "Method " + method.getName() + " can not be invoked"
                    + " due to IllegalAccessException";
                throw new InternalServerErrorException(Response.serverError().entity(msg).build());
            }
        }
    }
View Full Code Here

Examples of net.fortytwo.twitlogic.services.twitter.errors.InternalServerErrorException

                        showRequestInfo(request);
                        throw new NotAcceptableException();
                    case 420:
                        throw new EnhanceYourCalmException();
                    case 500:
                        throw new InternalServerErrorException();
                    case 502:
                        throw new BadGatewayException();
                    case 503:
                        throw new ServiceUnavailableException();
                    default:
View Full Code Here

Examples of ninja.exceptions.InternalServerErrorException

                try (OutputStream outputStream = responseStreams.getOutputStream()) {

                    outputStream.write(bytes);
                   
                } catch (IOException ioException) {
                    throw new InternalServerErrorException(ioException);
                }
            }
        };
                   
        render(renderable);
View Full Code Here

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

    }
    catch (ParserConfigurationException e)
    {
      String message = "Unable to create RSS XML document for RSS response.";
      LOGGER.log(Level.WARNING, message, e);
      throw new InternalServerErrorException(message);
    }
    catch (ParseException e)
    {
      String message = "Unable to create RSS XML document for RSS response.";
      LOGGER.log(Level.WARNING, message, e);
      throw new InternalServerErrorException(message);
    }
  }
View Full Code Here

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

    this.method = method;
    this.genericReturnType = ClassUtils.getGenericReturnTypeOfGenericInterfaceMethod(clazz, method);
    this.hasReturnType = genericReturnType != null && !genericReturnType.equals(Void.class) && !genericReturnType.equals(Void.TYPE);
    if (!hasReturnType && httpMethod.equals("GET"))
    {
      throw new InternalServerErrorException("Invalid rest method: " + method.toString() + ". @GET methods " +
          "can not be void.", "Can not execute requested service");
    }

    this.methodInvoker = new MethodInvoker(resourceClass, method, httpMethod);
    this.cacheInfo = HttpMethodHelper.getCacheInfoForGET(method);
View Full Code Here

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

    {
      throw e;
    }
    catch (Exception e)
    {
      throw new InternalServerErrorException("Error invoking rest service endpoint", "Error processing requested service", e);
    }
  }
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.