Package com.hp.hpl.jena.sdb

Examples of com.hp.hpl.jena.sdb.SDBException


        PreparedNode pNode = new PreparedNode(row[i]); //, false);
        deleteTuples.setLong(i + 1, pNode.hash);
      }
      deleteTuples.addBatch();
    } catch (SQLException e) {
      throw new SDBException("Problem adding to prepared delete statements", e);
    }
   
    tupleNum++;
    if (tupleNum >= chunkSize) flush();
  }
View Full Code Here


          connection().getSqlConnection().rollback();
        } catch (SQLException e1) {
          e1.printStackTrace();
        }
      }
      throw new SDBException("Exception mass deleting", e);
    }
  }
View Full Code Here

    boolean handleTransaction = false; // is somebody handling transactions already?
    try {
      handleTransaction = connection.getSqlConnection().getAutoCommit();
      if (handleTransaction) connection.getSqlConnection().setAutoCommit(false);
    } catch (SQLException e) {
      throw new SDBException("Failed to get autocommit status", e);
    }
    return handleTransaction;
  }
View Full Code Here

        try {
          connection().getSqlConnection().rollback();
        } catch (SQLException e1) {
          e1.printStackTrace();
        }
      throw new SDBException("Exception flushing", e);
    } finally {
      tupleNum = 0;
      seenNodes = new HashSet<Long>();
    }
  }
View Full Code Here

            rsx = conn.execQuery(sqlStmt) ;
            ResultSet rs = rsx.get();
            if ( ! rs.next() )
            {
                if ( ! create )
                    throw new SDBException("No such node in table: "+node) ;
                insertNode(conn, lex, node) ;
                // And get it again to find the auto-allocate ID.
                return getIndex(conn, node, false) ;
            }
View Full Code Here

        LayoutType t = registry.lookup(layoutTypeName) ;
        if ( t != null )
            return t ;

        LoggerFactory.getLogger(LayoutType.class).warn("Can't turn '"+layoutTypeName+"' into a layout type") ;
        throw new SDBException("Can't turn '"+layoutTypeName+"' into a layout type") ;
    }
View Full Code Here

        }
      }
      catch (Exception e)
      {
        log.error("Problem closing loader: " + e.getMessage());
        throw new SDBException("Problem closing loader", e);
      }
      finally
      {
        for (TupleLoader loader: this.tupleLoaders.values()) loader.close();
        this.initialized = false;
View Full Code Here

            queue.put(tuple);
          }
          catch (InterruptedException e)
          {
            log.error("Issue adding to queue: " + e.getMessage());
            throw new SDBException("Issue adding to queue" + e.getMessage(), e);
          }
      }
      else
      {
      updateOneTuple(tuple);
View Full Code Here

   */
  private void flushTriples()
  {
    if (threading)
      {
      if (!commitThread.isAlive()) throw new SDBException("Thread has died");
        // finish up threaded load
        try {
          synchronized (threadFlushing) {
            queue.put(flushSignal);
            threadFlushing.wait();
          }
        }
        catch (InterruptedException e)
        {
          log.error("Problem sending flush signal: " + e.getMessage());
          throw new SDBException("Problem sending flush signal", e);
        }
        checkThreadStatus();
      }
    else
    {
View Full Code Here

          if (e instanceof SQLException)
            throw new SDBExceptionSQL("Loader thread exception", (SQLException) e);
          else if (e instanceof RuntimeException)
            throw (RuntimeException) e;
          else
            throw new SDBException("Loader thread exception", e);
        }
      if (!commitThread.isAlive())
        throw new SDBException("Thread has died");
    }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sdb.SDBException

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.