Package tigase.db

Examples of tigase.db.TigaseDBException


      if (autoCreateUser) {
        try {
          addUser(user);
          return xmldb.getSubnodes(user, subnode);
        } catch (Exception ex) {
          throw new TigaseDBException("Unknown repository problem: ", ex);
        }
      } else {
        throw new UserNotFoundException(USER_STR+user+NOT_FOUND_STR, e);
      }
    } // end of try-catch
View Full Code Here


      if (autoCreateUser) {
        try {
          addUser(user);
          return xmldb.getKeys(user, subnode);
        } catch (Exception ex) {
          throw new TigaseDBException("Unknown repository problem: ", ex);
        }
      } else {
        throw new UserNotFoundException(USER_STR+user+NOT_FOUND_STR, e);
      }
    } // end of try-catch
View Full Code Here

        rs = node_add_sp.executeQuery();
        if (rs.next()) {
          return rs.getLong(1);
        } else {
          log.warning("Missing NID after adding new node...");
          throw new TigaseDBException("Propeblem adding new node. "
            + "The SP should return nid or fail");
        } // end of if (isnext) else
      } finally {
        release(null, rs);
      }
View Full Code Here

        schema_version = rs.getString(1);
        if ("4.0".equals(schema_version)) {
          return;
        }
      }
      throw new TigaseDBException("Incorect DB schema version.");
    } catch (Exception e) {
      System.err.println("\n\nPlease upgrade database schema now.");
      System.err.println("Current scheme version is: " + schema_version
        + ", expected: 4.0");
      System.err.println("Check the schema upgrade guide at the address:");
View Full Code Here

      while (rs.next()) {
        users.add(rs.getString(1));
      } // end of while (rs.next())
      return users;
    } catch (SQLException e) {
      throw new TigaseDBException("Problem loading user list from repository", e);
    } finally {
      release(null, rs);
      rs = null;
    }
  }
View Full Code Here

        if (rs.next()) {
          uid = rs.getLong(1);
          //addNode(uid, -1, root_node);
        } else {
          log.warning("Missing UID after adding new user...");
          throw new TigaseDBException("Propeblem adding new user to repository. "
            + "The SP should return uid or fail");
        } // end of if (isnext) else
      } finally {
        release(null, rs);
      }
View Full Code Here

      stmt.executeUpdate(query);
      // Remove user account from users table
      user_del_sp.setString(1, user_id);
      user_del_sp.executeUpdate();
    } catch (SQLException e) {
      throw new TigaseDBException("Error removing user from repository: "
        + query, e);
    } finally {
      release(stmt, rs);
      stmt = null;
      cache.remove(user_id);
View Full Code Here

        } else {
          return null;
        } // end of if (nid > 0) else
      }
    } catch (SQLException e) {
      throw new TigaseDBException("Error getting data list.", e);
    } finally {
      release(null, rs);
    }
  }
View Full Code Here

        } else {
          return null;
        } // end of if (nid > 0) else
      }
    } catch (SQLException e) {
      throw new TigaseDBException("Error getting subnodes list.", e);
    } finally {
      release(null, rs);
    }
  }
View Full Code Here

      if (nid > 0) {
        deleteSubnode(nid);
        cache.remove(user_id+"/"+subnode);
      }
    } catch (SQLException e) {
      throw new TigaseDBException("Error getting subnodes list.", e);
    }
  }
View Full Code Here

TOP

Related Classes of tigase.db.TigaseDBException

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.