Examples of ObjectNotFoundException


Examples of net.sf.jportlet.portlets.ObjectNotFoundException

           
            return bookmark;
        }
        catch( cirrus.hibernate.ObjectNotFoundException o )
        {
            throw new ObjectNotFoundException( "Bookmark#" + id + " not found" );
        }
        catch ( HibernateException e )
        {
            throw new PersistenceException( e );
        }
View Full Code Here

Examples of org.apache.ambari.server.ObjectNotFoundException

      TaskStatusResponse taskStatusResponse = new TaskStatusResponse(command);
      responses.add(taskStatusResponse);
    }

    if (responses.size() == 0) {
      throw new ObjectNotFoundException("Task resource doesn't exist.");
    }

    return responses;
  }
View Full Code Here

Examples of org.apache.ambari.server.ObjectNotFoundException

        User u = users.getAnyUser(r.getUsername());
        if (null == u) {
          if (requests.size() == 1) {
            // only throw exceptin if there is a single request
            // if there are multiple requests, this indicates an OR predicate
            throw new ObjectNotFoundException("Cannot find user '"
                + r.getUsername() + "'");
          }
        } else {
          UserResponse resp = new UserResponse(u.getUserName(), u.isLdapUser());
          resp.setRoles(new HashSet<String>(u.getRoles()));
View Full Code Here

Examples of org.apache.isis.core.runtime.persistence.ObjectNotFoundException

        }
        final ObjectSpecification objectSpec = getSpecificationLookup().lookupBySpecId(oid.getObjectSpecId());
        final ObjectStoreInstances ins = instancesFor(objectSpec.getSpecId());
        final ObjectAdapter adapter = ins.getObjectAndMapIfRequired(oid);
        if (adapter == null) {
            throw new ObjectNotFoundException(oid);
        }
        return adapter;
    }
View Full Code Here

Examples of org.apache.isis.core.runtime.persistence.ObjectNotFoundException

            // else recreate
            try {
                final Object pojo = pojoRecreator.recreatePojo(typedOid);
                adapter = mapRecreatedPojo(typedOid, pojo);
            } catch(RuntimeException ex) {
                throw new ObjectNotFoundException(typedOid, ex);
            }
        }

        // sync versions of original, with concurrency checking if required
        Oid adapterOid = adapter.getOid();
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.runtime.persistence.ObjectNotFoundException

    public ObjectAdapter getObject(final Oid oid, final ObjectSpecification hint) throws ObjectNotFoundException, ObjectPersistenceException {
        LOG.debug("getObject " + oid);
        final ObjectStoreInstances ins = instancesFor(hint);
        final ObjectAdapter object = ins.retrieveObject(oid);
        if (object == null) {
            throw new ObjectNotFoundException(oid);
        } else {
            setupReferencedObjects(object);
            return object;
        }
    }
View Full Code Here

Examples of org.apache.jcs.access.exception.ObjectNotFoundException

        throws CacheException, IOException
    {
        CacheElement ce = ( CacheElement ) get( key );
        if ( ce == null )
        {
            throw new ObjectNotFoundException( "key " + key + " is not found" );
        }
        return ce.getElementAttributes();
    }
View Full Code Here

Examples of org.apache.maven.archiva.database.ObjectNotFoundException

            pomArtifact = handleGenericSnapshots( groupId, artifactId, version, pomArtifact );
        }

        if ( pomArtifact == null )
        {
            throw new ObjectNotFoundException( "Unable to find artifact [" + Keys.toKey( groupId, artifactId, version )
                + "]" );
        }

        // Allowed to see this?
        if ( observableRepositoryIds.contains( pomArtifact.getModel().getRepositoryId() ) )
        {
            return pomArtifact;
        }
        else
        {
            throw new ObjectNotFoundException( "Unable to find artifact " + Keys.toKey( groupId, artifactId, version )
                + " in observable repository [" + StringUtils.join( observableRepositoryIds.iterator(), ", " )
                + "] for user " + principle );
        }
    }
View Full Code Here

Examples of org.apache.openjpa.util.ObjectNotFoundException

        if (oid == null)
            return null;

        Object obj = sctx.find(oid, null, null, null, 0);
        if (obj == null)
            throw new ObjectNotFoundException(oid);
        return obj;
    }
View Full Code Here

Examples of org.apache.openjpa.util.ObjectNotFoundException

                    .setFailedObject(toAttach);

            sm = manager.assertManaged(into);
            if (meta.getDescribedType()
                != sm.getMetaData().getDescribedType()) {
                throw new ObjectNotFoundException(_loc.get
                    ("attach-wrongclass", id, toAttach.getClass(),
                        sm.getMetaData().getDescribedType())).
                    setFailedObject(toAttach);
            }
        } else
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.