Examples of NameNotFoundException


Examples of com.acelet.lib.NameNotFoundException

        buffer.append(" ");
        buffer.append(candidates);
        buffer.append(" ");
        return buffer.toString();
      } else
        throw new NameNotFoundException("watchdogRefresh");
    } finally {
      if (statement != null)
        statement.close();
    }
  }
View Full Code Here

Examples of com.acelet.lib.NameNotFoundException

  }

  public int insertCandidateChore(String choreName) throws Exception {
    Chore chore = selectChore(choreName);
    if (chore == null)
      throw new NameNotFoundException(choreName);

    String insertSql = "INSERT INTO candidate_chores (id, name) VALUES(?,?)";
    PreparedStatement insertStatement = null;
    int nn = 0;
    long id = Common.getUniqueIdNumber();
View Full Code Here

Examples of com.acelet.lib.NameNotFoundException

        buffer.append(" ");
        buffer.append(candidates);
        buffer.append(" ");
        return buffer.toString();
      } else
        throw new NameNotFoundException("schedulerRefresh");
    } finally {
      if (statement != null)
        statement.close();
    }
  }
View Full Code Here

Examples of com.acelet.lib.NameNotFoundException

  }

  public int insertCandidateTask(String taskName) throws Exception {
    Task task = selectTask(taskName);
    if (task == null)
      throw new NameNotFoundException(taskName);

    String insertSql = "INSERT INTO candidate_tasks (id, name) VALUES(?,?)";
    PreparedStatement insertStatement = null;
    int nn = 0;
    long id = Common.getUniqueIdNumber();
View Full Code Here

Examples of javax.naming.NameNotFoundException

   * get name without the url prefix
   */
  private String getRelativeName(String name) throws NamingException {
    // We suppose that all names must be prefixed as this
    if (!name.startsWith(URL_PREFIX)) {
      throw new NameNotFoundException("Invalid name:" + name);
    }

    name = name.substring(URL_PREFIX.length());
    return name;
  }
View Full Code Here

Examples of javax.naming.NameNotFoundException

      context = namingFactory.getInitialContext(myEnv);
    }
   
    // Check context is not null to avoid nullPointerException
    if (context == null) {
      throw new NameNotFoundException("No context for this component");
    }
   
    // Build a ResolveResult object to return
    ResolveResult r = new ResolveResult(context, rname);
    return r;
View Full Code Here

Examples of javax.naming.NameNotFoundException

    String lastName = (String)path.remove(path.size() - 1);
    NamingContext nc = contextManager.getNamingContext(path);
   
    Record r = nc.getRecord(lastName);
    if (r == null) {
      NameNotFoundException nnfe =
        new NameNotFoundException();
      nnfe.setResolvedName(path);
      throw new MissingRecordException(
        nc.getId(), nc.getOwnerId(), nnfe);
    } else if (r instanceof ObjectRecord) {     
      return r;
    } else {
View Full Code Here

Examples of javax.naming.NameNotFoundException

                return nameParser.parse(stringName
                        .substring(this.myAbsoluteName.length() + 1));
            else if (this.parent != null)
                return null;
            else
                throw new NameNotFoundException(ContainerJNDIManager.JNDI_RESOURCES.getString(
                        "WinstoneContext.NameNotFound", name.toString()));
        } else if (name instanceof CompositeName)
            return nameParser.parse(name.toString());
        else
            return name;
View Full Code Here

Examples of javax.naming.NameNotFoundException

            // If the name points to something in this level, try to find it,
            // and give
            // an error if not available
            if (searchName.size() == 1) {
                if (thisValue == null)
                    throw new NameNotFoundException(ContainerJNDIManager.JNDI_RESOURCES.getString(
                            "WinstoneContext.NameNotFound", name.toString()));

                try {
                    return NamingManager.getObjectInstance(thisValue,
                            new CompositeName().add(thisName), this,
                            this.environment);
                } catch (Exception e) {
                    NamingException ne = new NamingException(ContainerJNDIManager.JNDI_RESOURCES
                            .getString("WinstoneContext.FailedToGetInstance"));
                    ne.setRootCause(e);
                    throw ne;
                }
            }

            else if (thisValue == null)
                throw new NameNotFoundException(ContainerJNDIManager.JNDI_RESOURCES.getString(
                        "WinstoneContext.NameNotFound", thisName.toString()));

            // If it's not in this level and what we found is not a context,
            // complain
            else if (!(thisValue instanceof Context))
View Full Code Here

Examples of javax.naming.NameNotFoundException

                    return ((Context) ctx).list(new CompositeName(""));
                } finally {
                    ((Context) ctx).close();
                }
            else if (ctx == null)
                throw new NameNotFoundException(ContainerJNDIManager.JNDI_RESOURCES.getString(
                        "WinstoneContext.NameNotFound", searchName.toString()));
            else
                throw new NotContextException(ContainerJNDIManager.JNDI_RESOURCES.getString(
                        "WinstoneContext.NotContext",
                        new String[] { searchName.toString(),
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.