Package com.sun.jersey.api.container

Examples of com.sun.jersey.api.container.ContainerException


        } catch (InvocationTargetException ex) {
            Throwable target = ex.getTargetException();
            if (target instanceof WebApplicationException) {
                throw (WebApplicationException)target;
            } else {
                throw new ContainerException(target);
            }
        } catch (RuntimeException ex) {
            throw new ContainerException(ex);
        } catch (Exception ex) {
            throw new ContainerException(ex);
        }
    }
View Full Code Here


        this.m = method.getMethod();
       
        if (getDispatcher() == null) {
            String msg = ImplMessages.NOT_VALID_HTTPMETHOD(m,
                    method.getHttpMethod(), m.getDeclaringClass());
            throw new ContainerException(msg);
        }
    }
View Full Code Here

                m.getProduces(),
                m.isProducesDeclared(),
                m.getDispatcher());
       
        if (!m.getHttpMethod().equals("GET")) {
            throw new ContainerException("");
        }
       
        this.m = m;
    }
View Full Code Here

                }
                return params;
            } catch (WebApplicationException e) {
                throw e;
            } catch (RuntimeException e) {
                throw new ContainerException("Exception injecting parameters to Web resource method", e);
            }
        }       
View Full Code Here

            } catch (WebApplicationException e) {
                throw e;
            } catch (ContainerException e) {
                throw e;
            } catch (RuntimeException e) {
                throw new ContainerException("Exception injecting parameters to Web resource method", e);
            }
        }       
View Full Code Here

            try {
                Map<String, FormDataBodyPart> formMap = getFormData(form);
                context.getProperties().put("com.sun.jersey.api.representation.form", formMap);
                context.getProperties().put("com.sun.jersey.api.representation.form.multipart", form);
            } catch(Exception e) {
                throw new ContainerException(e);
            }
        } else {
            super.processForm(context);
        }
    }
View Full Code Here

                        return null;
                    else
                        return fdbp.fdcd;
                }
            } catch (Exception ex) {
                throw new ContainerException(ex);
            }
        }
View Full Code Here

                    return getAsForm((Form)o, context);                   
                } else {
                    return getAsMultipartFormData((Map<String, FormDataBodyPart>)o, context);
                }               
            } catch (Exception ex) {
                throw new ContainerException(ex);
            }                  
        }
View Full Code Here

                context.getResponse().setAnnotations(annotations);
        } catch (InvocationTargetException e) {
            // Propagate the target exception so it may be mapped to a response
            throw new MappableContainerException(e.getTargetException());
        } catch (IllegalAccessException e) {
            throw new ContainerException(e);
        }
    }
View Full Code Here

                if (!c.equals(EntityManagerFactory.class))
                    return null;
               
                // TODO localize error message
                if (!persistenceUnits.containsKey(pu.unitName()))
                    throw new ContainerException("Persistence unit '"+
                            pu.unitName()+
                            "' is not configured as a servlet parameter in web.xml");
                String jndiName = persistenceUnits.get(pu.unitName());
                ThreadLocalNamedInvoker<EntityManagerFactory> emfHandler =
                        new ThreadLocalNamedInvoker<EntityManagerFactory>(jndiName);
View Full Code Here

TOP

Related Classes of com.sun.jersey.api.container.ContainerException

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.