Examples of ExceptionBean


Examples of edu.indiana.dlib.metsnav.data.ExceptionBean

            navObjCache = JCS.getInstance(Globals.METSOBJ_CACHE);
            navObj = (MetsObject)navObjCache.get(Globals.METSOBJ_CACHE_KEY + oid);
        } catch (CacheException cex) {
            log.error("Corrupted Cache[" + Globals.METSOBJ_CACHE
                + "]: " + cex.getMessage());
            log.error(new ExceptionBean(cex).getStack());
        }
        if (navObj == null || forceUpdate ||
                navObj.getTimestamp() < child.getConfig().getDataSource().getTimestamp(oid)) {
            navObj = child.getMetsObject(oid);
            if (navObjCache != null) {
                try {
                    navObjCache.put(Globals.METSOBJ_CACHE_KEY + oid, navObj);
                } catch (CacheException cex) {
                    log.error("Corrupted Cache[" + Globals.METSOBJ_CACHE
                        + "]: " + cex.getMessage());
                    log.error(new ExceptionBean(cex).getStack());
                }
            }
        }
        return navObj;
    }
View Full Code Here

Examples of edu.indiana.dlib.metsnav.data.ExceptionBean

            navObjCache = JCS.getInstance(Globals.METSOBJ_CACHE);
            navObj = (JSONObject)navObjCache.get(Globals.METSOBJ_CACHE_KEY + oid);
        } catch (CacheException cex) {
            log.error("Corrupted Cache[" + Globals.METSOBJ_CACHE
                + "]: " + cex.getMessage());
            log.error(new ExceptionBean(cex).getStack());
        }
        if (navObj == null || forceUpdate ||
                parseTime((String)navObj.get("timestamp")) < child.getConfig().getDataSource().getTimestamp(oid)) {
            navObj = child.getJSONObject(oid);
            if (navObjCache != null) {
                try {
                    navObjCache.put(Globals.METSOBJ_CACHE_KEY + oid, navObj);
                } catch (CacheException cex) {
                    log.error("Corrupted Cache[" + Globals.METSOBJ_CACHE
                        + "]: " + cex.getMessage());
                    log.error(new ExceptionBean(cex).getStack());
                }
            }
        }
        return navObj;
    }
View Full Code Here

Examples of net.sf.archimede.jsf.view.ExceptionBean

                         ServletResponse response,
                         FilterChain chain)
            throws IOException, ServletException {
        HttpServletRequest httpRequest = (HttpServletRequest) request;
        HttpSession session = httpRequest.getSession();
        ExceptionBean exceptionBean = new ExceptionBean();
      try {
        chain.doFilter(request, response);
            //Before rendering the response
        } catch (ServletException e) {
            Throwable rootCause = e.getRootCause();
            while (rootCause.getCause() != null) {
                rootCause = rootCause.getCause();
            }
            rootCause.printStackTrace();
            exceptionBean.setThrowable(rootCause);
            if (rootCause instanceof AccessDeniedException) {
                //FIXME I18N
                exceptionBean.setExplanation("//Vous n'avez pas les droits nécessaires pour effectuer cette opération");
            } else {
//              FIXME I18N
                exceptionBean.setExplanation("//Une erreur générale s'est produite: ");
            }
        }
       
        if (exceptionBean.getThrowable() != null) {
            session.setAttribute(ExceptionBean.SESSION_REF, exceptionBean);
            HttpServletResponse httpResponse = (HttpServletResponse) response;
            String path = httpRequest.getContextPath() + "/pages/exception/general.xhtml";
            httpResponse.sendRedirect(httpRequest.getContextPath() + "/pages/exception/general.jsf");
        }
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.