Examples of ObjectNotFoundException


Examples of helma.objectmodel.ObjectNotFoundException

     * @throws ObjectNotFoundException
     */
    public static XmlIDGenerator getIDGenerator(File file)
            throws ObjectNotFoundException {
        if (!file.exists()) {
            throw new ObjectNotFoundException("IDGenerator not found in idgen.xml");
        }

        try {
            Document document = XmlUtil.parse(new FileInputStream(file));
            org.w3c.dom.Element tmp = (Element) document.getDocumentElement()
                    .getElementsByTagName("counter")
                    .item(0);

            return new XmlIDGenerator(Long.parseLong(XmlUtil.getTextContent(tmp)));
        } catch (Exception e) {
            throw new ObjectNotFoundException(e.toString());
        }
    }
View Full Code Here

Examples of javax.ejb.ObjectNotFoundException

    try {
      dataAccessLayer.setSql("reports.findreportcontentbypk");
      dataAccessLayer.setInt(1, pk.reportContentId);
      resultSet = dataAccessLayer.executeQueryNonParsed();
      if (!resultSet.next()) {
        throw new ObjectNotFoundException("Primary key does not exist");
      }
      return pk;
    }
    catch(SQLException e) {
      throw new EJBException("Error executing SQL SELECT reportcontentid FROM reportcontent WHERE reportcontentid = ?: " + e.toString());
View Full Code Here

Examples of javax.ejb.ObjectNotFoundException

    try {
      dataAccessLayer.setSql("reports.findreportbypk");
      dataAccessLayer.setInt(1, pk.reportId);
      resultSet = dataAccessLayer.executeQueryNonParsed();
      if (!resultSet.next()) {
        throw new ObjectNotFoundException("Cannot Find report: "+pk.toString());
      }
      return pk;
    } catch (SQLException e) {
      throw new EJBException("Error executing SQL SELECT reportid FROM report WHERE reportid = ?: " + e.toString());
    } finally {
View Full Code Here

Examples of javax.ejb.ObjectNotFoundException

    try {
      dataAccessLayer.setSqlQuery("SELECT reporttypeid FROM reporttype WHERE reporttypeid = ?");
      dataAccessLayer.setInt(1, pk.reportTypeId);
      resultSet = dataAccessLayer.executeQueryNonParsed();
      if (!resultSet.next()) {
        throw new ObjectNotFoundException("Primary key does not exist");
      }
      return pk;
    }
    catch(SQLException e) {
      throw new EJBException("Error executing SQL SELECT reporttypeid FROM reporttype WHERE reporttypeid = ?: " + e.toString());
View Full Code Here

Examples of javax.ejb.ObjectNotFoundException

        TransactionPolicy txPolicy = createTransactionPolicy(deploymentInfo.getTransactionType(callMethod), callContext);

        try {
            EntityBean bean = (EntityBean) cmpEngine.loadBean(callContext, args[0]);
            if (bean == null) {
                throw new ObjectNotFoundException(deploymentInfo.getDeploymentID() + " : " + args[0]);
            }

            // rebuild the primary key
            KeyGenerator kg = deploymentInfo.getKeyGenerator();
            Object primaryKey = kg.getPrimaryKey(bean);
View Full Code Here

Examples of javax.ejb.ObjectNotFoundException

                } else {
                    return proxies;
                }
            } else {
                if (results.size() != 1) {
                    throw new ObjectNotFoundException("A Enteprise bean with deployment_id = " + deploymentInfo.getDeploymentID() + " and primarykey = " + args[0] + " Does not exist");
                }

                // create a new ProxyInfo based on the deployment info and primary key
                EntityBean bean = (EntityBean) results.get(0);
                if (bean == null) {
View Full Code Here

Examples of javax.ejb.ObjectNotFoundException

                return proxies;
            }

            // single valued query that returned no rows, is an exception
            if (proxies.isEmpty()) {
                throw new ObjectNotFoundException();
            }

            // return the single item.... multiple return values was handled in for loop above
            Object returnValue = proxies.iterator().next();
            return returnValue;
View Full Code Here

Examples of javax.util.jcache.ObjectNotFoundException

        final CacheLogger logger = CacheImpl.getCache().getAttributes().getLogger();
        try {
            final CacheObject obj = getCacheObject(name, group);
            final CacheLoader loader = obj.getAttributes().getLoader();
            if (loader == null) {
                throw new ObjectNotFoundException("The object has no CacheLoader associated with it.");
            }
            Runnable runnable = new Runnable() {
                public void run() {
                    try {
                        loader.load(obj, arguments);
View Full Code Here

Examples of lib.exceptions.ObjectNotFoundException

      if (resultSet.next()) {
        employee = new Employee(resultSet.getString("login"), resultSet.getString("senha"),
            resultSet.getString("nome"));
      } else {
        System.out.println("not found " + login);
        throw new ObjectNotFoundException(ExceptionMessages.EXC_FALHA_PROCURA);
      }
      resultSet.close();
      stmt.close();
    } catch (PersistenceMechanismException e) {
      throw new RepositoryException(e.getMessage());
View Full Code Here

Examples of net.sf.jportlet.portlets.ObjectNotFoundException

            session.update( bk );
            tx.commit(  );
        }
        catch( cirrus.hibernate.ObjectNotFoundException o )
        {
            throw new ObjectNotFoundException( "Bookmark#" + id + " not found" );
        }
        catch ( HibernateException e )
        {
            rollback( tx );
            throw new PersistenceException( e );
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.