Examples of InternalServerErrorException


Examples of org.jboss.resteasy.spi.InternalServerErrorException

      {
         return invokedMethod.invoke(resource, args);
      }
      catch (IllegalAccessException e)
      {
         throw new InternalServerErrorException("Not allowed to reflect on method: " + method.toString(), e);
      }
      catch (InvocationTargetException e)
      {
         Throwable cause = e.getCause();
         if (cause instanceof WebApplicationException)
         {
            WebApplicationException wae = (WebApplicationException) cause;
            throw wae;
         }
         throw new ApplicationException(cause);
      }
      catch (IllegalArgumentException e)
      {
         String msg = "Bad arguments passed to " + method.toString() + "  (";
         if (args != null)
         {
            boolean first = false;
            for (Object arg : args)
            {
               if (!first)
               {
                  first = true;
               }
               else
               {
                  msg += ",";
               }
               if (arg == null)
               {
                  msg += " null";
                  continue;
               }
               msg += " " + arg.getClass().getName() + " " + arg;
            }
         }
         msg += " )";
         throw new InternalServerErrorException(msg, e);
      }
   }
View Full Code Here

Examples of org.jboss.resteasy.spi.InternalServerErrorException

           throws Failure
   {
      logger.debug("PathInfo: " + request.getUri().getPath());
      if (!request.isInitial())
      {
         throw new InternalServerErrorException(request.getUri().getPath() + " is not initial request.  Its suspended and retried.  Aborting.");
      }
      preprocess(request);
      ResourceInvoker invoker = registry.getResourceInvoker(request);
      if (invoker == null)
      {
View Full Code Here

Examples of org.jboss.resteasy.spi.InternalServerErrorException

      {
         return invokedMethod.invoke(resource, args);
      }
      catch (IllegalAccessException e)
      {
         throw new InternalServerErrorException("Not allowed to reflect on method: " + method.toString(), e);
      }
      catch (InvocationTargetException e)
      {
         Throwable cause = e.getCause();
         if (cause instanceof WebApplicationException)
         {
            WebApplicationException wae = (WebApplicationException) cause;
            throw wae;
         }
         throw new ApplicationException(cause);
      }
      catch (IllegalArgumentException e)
      {
         String msg = "Bad arguments passed to " + method.toString() + "  (";
         if (args != null)
         {
            boolean first = false;
            for (Object arg : args)
            {
               if (!first)
               {
                  first = true;
               }
               else
               {
                  msg += ",";
               }
               if (arg == null)
               {
                  msg += " null";
                  continue;
               }
               msg += " " + arg.getClass().getName() + " " + arg;
            }
         }
         msg += " )";
         throw new InternalServerErrorException(msg, e);
      }
   }
View Full Code Here

Examples of org.jboss.resteasy.spi.InternalServerErrorException

      {
         in = MockHttpRequest.deepCopy(request);
      }
      catch (IOException e)
      {
         throw new InternalServerErrorException(e);
      }
      Callable<MockHttpResponse> callable = new Callable<MockHttpResponse>()
      {

         public MockHttpResponse call() throws Exception
View Full Code Here

Examples of org.jboss.resteasy.spi.InternalServerErrorException

      {
         in = MockHttpRequest.deepCopy(request);
      }
      catch (IOException e)
      {
         throw new InternalServerErrorException(e);
      }
      Runnable runnable = new Runnable()
      {

         public void run()
View Full Code Here

Examples of org.jboss.resteasy.spi.InternalServerErrorException

         return subResource;

      }
      catch (IllegalAccessException e)
      {
         throw new InternalServerErrorException(e);
      }
      catch (InvocationTargetException e)
      {
         throw new ApplicationException(e.getCause());
      }
View Full Code Here

Examples of org.jboss.resteasy.spi.InternalServerErrorException

         registry = new ResourceMethodRegistry(providerFactory);
         Class subResourceClass = GetRestful.getSubResourceClass(target.getClass());
         if (subResourceClass == null)
         {
            String msg = "Subresource for target class has no jax-rs annotations.: " + target.getClass().getName();
            throw new InternalServerErrorException(msg);
         }
         registry.addResourceFactory(null, null, subResourceClass);
         cachedSubresources.putIfAbsent(target.getClass(), registry);
      }
      ResourceInvoker invoker = registry.getResourceInvoker(request);
View Full Code Here

Examples of org.jboss.resteasy.spi.InternalServerErrorException

         {
            entry.getKey().set(target, entry.getValue().inject(request, response));
         }
         catch (IllegalAccessException e)
         {
            throw new InternalServerErrorException(e);
         }
      }
      for (SetterMethod setter : setters)
      {
         try
         {
            setter.method.invoke(target, setter.extractor.inject(request, response));
         }
         catch (IllegalAccessException e)
         {
            throw new InternalServerErrorException(e);
         }
         catch (InvocationTargetException e)
         {
            throw new ApplicationException(e);
         }
View Full Code Here

Examples of org.jboss.resteasy.spi.InternalServerErrorException

         {
            list = uriInfo.getPathParameterPathSegments().get(paramName);
         }
         if (list == null)
         {
            throw new InternalServerErrorException("Unknown @PathParam: " + paramName + " for path: " + uriInfo.getPath());
         }
         PathSegment[] segments = list.get(list.size() - 1);
         if (pathSegmentArray)
         {
            return segments;
         }
         else if (pathSegmentList)
         {
            ArrayList<PathSegment> pathlist = new ArrayList<PathSegment>();
            for (PathSegment seg : segments)
            {
               pathlist.add(seg);
            }
            return pathlist;
         }
         else
         {
            return segments[segments.length - 1];
         }
      }
      else
      {
         List<String> list = request.getUri().getPathParameters(!encode).get(paramName);
         if (list == null)
         {
            throw new InternalServerErrorException("Unknown @PathParam: " + paramName + " for path: " + request.getUri().getPath());
         }
         if (extractor.isCollectionOrArray())
         {
            return extractor.extractValues(list);
         }
View Full Code Here

Examples of org.jboss.resteasy.spi.InternalServerErrorException

      {
         target = type.newInstance();
      }
      catch (InstantiationException e)
      {
         throw new InternalServerErrorException("Failed to instantiate @Form class", e.getCause());
      }
      catch (IllegalAccessException e)
      {
         throw new InternalServerErrorException("Failed to instantiate @Form class", e);
      }
      injector.inject(request, response, target);
      return target;
   }
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.