Package com.gentics.cr.exceptions

Examples of com.gentics.cr.exceptions.CRException


      // is shared as long as the buffer content is not modified, which will
      // not occur here.
      contents = writer.getBuffer().toString();

    } catch (IOException e) {
      throw new CRException(e);
    } catch (CryptographyException e) {
      throw new CRException(e);
    } catch (InvalidPasswordException e) {
      throw new CRException(e);
    } catch (Exception e) {
      //Catch all Exceptions happening here to not disturb the indexer
      e.printStackTrace();
    } finally {
      if (pdfDocument != null) {
View Full Code Here


        }
      } else {
        LOGGER.error("Configured attribute is null. " + "Bean will not be processed");
      }
    } catch (IOException e) {
      throw new CRException("Cannot read the attribute " + attribute + ".", e);
    }
  }
View Full Code Here

          }
        }
        result.add(bean);
      }
    } catch (SQLException e) {
      throw new CRException(e);
    } catch (Exception ex) {
      throw new CRException(ex);
    } finally {
      try {
        if (rset != null) {
          rset.close();
        }
        if (stmt != null) {
          stmt.close();
        }
        if (conn != null) {
          conn.close();
        }
      } catch (SQLException e) {
        throw new CRException(e);
      }
    }
    return result;
  }
View Full Code Here

          }
        }

      } catch (ParserException e) {
        e.printStackTrace();
        throw new CRException("ParserException", e.getMessage());
      } catch (ExpressionParserException e) {
        e.printStackTrace();
        throw new CRException("ExpressionParserException", e.getMessage());
      } catch (DatasourceException e) {
        e.printStackTrace();
        throw new CRException("DatasourceException", e.getMessage());
      } finally {
        CRDatabaseFactory.releaseDatasource(ds);
        getObjectCase.stop();
      }
    }
View Full Code Here

            result.add(object);
          }
        }
        return result;
      } catch (ParserException e) {
        throw new CRException(e);
      } catch (ExpressionParserException e) {
        throw new CRException(e);
      }
    }
    return objects;
  }
View Full Code Here

    Collection<Resolvable> collection;
    Collection<CRResolvableBean> crCollection;
    String query = request.getRequestFilter();
    if (query == null) {
      log.error("Request without request filter. Please give me a parameter filter.");
      throw new CRException();
    }
    //Create search url, get XML Code from search parse it with XSLT and create Resolvables out of the code
    // TODO: make single steps optional (users shouldn't have to define a xslt or contentidfilter)
    String url = this.config.getXmlUrl().replaceAll("#query#", query);
    String code = getCleanUnicodeXML(getCode(url));
View Full Code Here

    } catch (SQLException e) {
      logger.error("Error executing query: " + statementString, e);
    } catch (ClassNotFoundException e) {
      logger.error("Datasource driver not found.", e);
      throw new CRException(e);
    } finally {
      try {
        if (rset != null)
          rset.close();
      } catch (SQLException e) {
View Full Code Here

          }
        }

      } catch (ParserException e) {
        logger.error("Error getting filter for Datasource.", e);
        throw new CRException(e);
      } catch (ExpressionParserException e) {
        logger.error("Error getting filter for Datasource.", e);
        throw new CRException(e);
      } catch (DatasourceException e) {
        logger.error("Error getting result from Datasource.", e);
        throw new CRException(e);
      } finally {
        CRDatabaseFactory.releaseDatasource(ds);
      }
    }
    return collection;
View Full Code Here

    this.config = config;
    this.plinkProc = new PlinkProcessor(config);

    if (config == null) {
      throw new CRException("CONFIG", "Config is NULL => overthink your config!",
          CRException.ERRORTYPE.FATAL_ERROR);
    }
    if (config.getPortalNodeCompMode()) {
      //Servlet will run in portal.node compatibility mode => no velocity available
      log.warn("CRRequestProcessor is running in Portal.Node 3 compatibility mode \n" + ""
          + "Therefore Velocity scripts will not work in the content.");
    }

    if (config.getBoolean(CONTENTCACHE_KEY, true)) {
      try {
        cache = JCS.getInstance("gentics-cr-" + config.getName() + "-crcontent");
        log.debug("Initialized cache zone for \"" + config.getName() + "-crcontent\".");
      } catch (CacheException e) {
        log.warn("Could not initialize Cache for PlinkProcessor.");
        throw new CRException(e);
      }
    }

  }
View Full Code Here

          if (cache != null) {
            cache.put(contentid, crBean);
          }
        } catch (CacheException e) {
          log.warn("Could not add crBean object " + crBean.getContentid() + " to cache", e);
          throw new CRException(e);
        }
      }

      // the returned attribute is always a byte[] Array
      if (b != null) {
View Full Code Here

TOP

Related Classes of com.gentics.cr.exceptions.CRException

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.