Package org.apache.marmotta.platform.core.exception

Examples of org.apache.marmotta.platform.core.exception.MarmottaException


                connection.begin();
                BooleanQuery ask = connection.prepareBooleanQuery(queryLanguage, query);
                result = ask.evaluate();
                connection.commit();
            } catch (MalformedQueryException e) {
                throw new MarmottaException("malformed query, update failed",e);
            } catch (QueryEvaluationException e) {
                throw new MarmottaException("error evaluating querry",e);
            } finally {
                connection.close();
            }
        } catch(RepositoryException ex) {
            log.error("error while getting repository connection", ex);
            throw new MarmottaException("error while getting repository connection",ex);
        }
        log.debug("SPARQL update execution took {}ms",System.currentTimeMillis()-start);
        return result;
    }
View Full Code Here


            } finally {
                connection.close();
            }
        } catch(RepositoryException e) {
            log.error("error while getting repository connection: {}", e);
            throw new MarmottaException("error while getting repository connection", e);
        } catch (QueryEvaluationException e) {
          log.error("error while evaluating query: {}", e);
            throw new MarmottaException("error while writing query result in format ", e);
        }

        log.debug("SPARQL execution took {}ms", System.currentTimeMillis()-start);
    }
View Full Code Here

      } finally {
                connection.close();
            }
        } catch(RepositoryException e) {
            log.error("error while getting repository connection: {}", e);
            throw new MarmottaException("error while getting repository connection", e);
        } catch (QueryEvaluationException e) {
          log.error("error while evaluating query: {}", e);
            throw new MarmottaException("error while writing query result in format ", e);
        } catch (MalformedQueryException e) {
          log.error("error because malformed query: {}", e);
            throw new MarmottaException("error because malformed query result in format ", e);
        }

        log.debug("SPARQL execution took {}ms", System.currentTimeMillis()-start);
    }
View Full Code Here

            } finally {
                connection.close();
            }
        } catch(RepositoryException ex) {
            log.error("error while getting repository connection");
            throw new MarmottaException("error while getting repository connection",ex);
        } catch (QueryEvaluationException e) {
            throw new MarmottaException("error while evaluating SPARQL query "+query,e);
        } catch (MalformedQueryException e) {
            throw new InvalidArgumentException("malformed SPARQL query ("+query+") for language "+queryLanguage,e);
        }

        log.debug("SPARQL execution took {}ms",System.currentTimeMillis()-start);
View Full Code Here

                Update update = connection.prepareUpdate(queryLanguage,query,configurationService.getBaseUri());
                update.execute();
                connection.commit();
            } catch (UpdateExecutionException e) {
                connection.rollback();
                throw new MarmottaException("error while executing update",e);
            } catch (MalformedQueryException e) {
                connection.rollback();
                throw new MarmottaException("malformed query, update failed",e);
            } finally {
                connection.close();
            }
        } catch(RepositoryException ex) {
            log.error("error while getting repository connection", ex);
            throw new MarmottaException("error while getting repository connection",ex);
        }
        log.debug("SPARQL update execution took {}ms",System.currentTimeMillis()-start);

    }
View Full Code Here

                connection.begin();
                BooleanQuery ask = connection.prepareBooleanQuery(queryLanguage, query);
                result = ask.evaluate();
                connection.commit();
            } catch (MalformedQueryException e) {
                throw new MarmottaException("malformed query, update failed",e);
            } catch (QueryEvaluationException e) {
                throw new MarmottaException("error evaluating querry",e);
            } finally {
                connection.close();
            }
        } catch(RepositoryException ex) {
            log.error("error while getting repository connection", ex);
            throw new MarmottaException("error while getting repository connection",ex);
        }
        log.debug("SPARQL update execution took {}ms",System.currentTimeMillis()-start);
        return result;
    }
View Full Code Here

TOP

Related Classes of org.apache.marmotta.platform.core.exception.MarmottaException

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.