Examples of WebAppException


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

  public void render() {
    int nestLevel = context().nestLevel();
    LOG.debug("Rendering {} @{}", getClass(), nestLevel);
    render(block());
    if (block.nestLevel() != nestLevel) {
      throw new WebAppException("Error rendering block: nestLevel="+
                                block.nestLevel() +" expected "+ nestLevel);
    }
    context().set(nestLevel, block.wasInline());
  }
View Full Code Here

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

  static boolean needsEscaping(String eleName) {
    return !eleName.equals("SCRIPT") && !eleName.equals("STYLE");
  }

  static void throwUnhandled(String className, Method method) {
    throw new WebAppException("Unhandled " + className + "#" + method);
  }
View Full Code Here

Examples of webapp.WebAppException

//            marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);

            unmarshaller = ctx.createUnmarshaller();

        } catch (JAXBException e) {
            throw new WebAppException("Jaxb init failed", e);
        }
    }
View Full Code Here

Examples of webapp.WebAppException

    public <T> T unmarshall(Reader reader)  {
        try {
            return (T) unmarshaller.unmarshal(reader);
        } catch (JAXBException e) {
            throw new WebAppException("Jaxb unmarshall failed", e);
        }
    }
View Full Code Here

Examples of webapp.WebAppException

    public void marshall(Object instance, Writer writer) {
        try {
            marshaller.marshal(instance, writer);
        } catch (JAXBException e) {
            throw new WebAppException("Jaxb marshal failed", e);
        }
    }
View Full Code Here

Examples of webapp.WebAppException

    public DirectConnection()  {
        try {
            Class.forName("org.postgresql.Driver").newInstance();
        } catch (Exception e) {
            throw new WebAppException("Driver initialization exception", e);
        }
    }
View Full Code Here

Examples of webapp.WebAppException

        try (Connection conn = CONN_FACTORY.getConnection(); PreparedStatement st = conn.prepareStatement(sql)) {
            T res =  executor.execute(st);
            st.execute();
            return res;
        } catch (SQLException e) {
            throw new WebAppException("Error executing '" + sql + "'", e);
        }
    }
View Full Code Here

Examples of webapp.WebAppException

            } catch (SQLException e) {
                conn.rollback();
                throw e;
            }
        } catch (SQLException e) {
            throw new WebAppException("Transaction failed", e);
        }
    }
View Full Code Here

Examples of webapp.WebAppException

        Assert.assertEquals(new MinMax<String>(null).new Pair("-5", "9"), p2);
    }

    @Test(expected = WebAppException.class)
    public void testException() throws Exception {
        throw new WebAppException("test");
    }
View Full Code Here

Examples of webapp.WebAppException

                                while (rs.next()) {
                                    addContact(rs, resume);
                                }
                                return resume;
                            }
                            throw new WebAppException("Resume " + uuid + " is not found");
                        }
                    }
                }
        );
    }
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.