Examples of NoSuchObjectException


Examples of com.cloud.bridge.service.exception.NoSuchObjectException

        int maxKeys = request.getMaxKeys();
        if(maxKeys <= 0) maxKeys = 1000;

        //
        SBucketVO sbucket = bucketDao.getByName(bucketName);
        if (sbucket == null) throw new NoSuchObjectException("Bucket " + bucketName + " does not exist");

        PolicyActions action = (includeVersions ? PolicyActions.ListBucketVersions : PolicyActions.ListBucket);
        S3PolicyContext context = new S3PolicyContext( action, bucketName );
        context.setEvalParam( ConditionKeys.MaxKeys, new String( "" + maxKeys ));
        context.setEvalParam( ConditionKeys.Prefix, prefix );
View Full Code Here

Examples of com.google.appengine.tools.pipeline.NoSuchObjectException

        attempts++;
        try {
          slot = backEnd.querySlot(key, false);
        } catch (NoSuchObjectException e) {
          if (attempts >= 5) {
            throw new NoSuchObjectException("There is no promise with handle " + promiseHandle);
          }
          try {
            Thread.sleep((long) Math.pow(2.0, attempts - 1) * 1000L);
          } catch (InterruptedException f) {
            interrupted = true;
          }
        }
      }
    } finally {
      // TODO(user): replace with Uninterruptibles#sleepUninterruptibly once we use guava
      if (interrupted) {
        Thread.currentThread().interrupt();
      }
    }
    Key generatorJobKey = slot.getGeneratorJobKey();
    if (null == generatorJobKey) {
      throw new RuntimeException(
          "Pipeline is fatally corrupted. Slot for promised value has no generatorJobKey: " + slot);
    }
    JobRecord generatorJob = backEnd.queryJob(generatorJobKey, JobRecord.InflationType.NONE);
    if (null == generatorJob) {
      throw new RuntimeException("Pipeline is fatally corrupted. "
          + "The generator job for a promised value slot was not found: " + generatorJobKey);
    }
    String childGraphGuid = generatorJob.getChildGraphGuid();
    if (null == childGraphGuid) {
      // The generator job has not been saved with a childGraphGuid yet. This can happen if the
      // promise handle leaked out to an external thread before the job that generated it
      // had finished.
      throw new NoSuchObjectException(
          "The framework is not ready to accept the promised value yet. "
          + "Please try again after the job that generated the promis handle has completed.");
    }
    if (!childGraphGuid.equals(slot.getGraphGuid())) {
      // The slot has been orphaned
View Full Code Here

Examples of java.rmi.NoSuchObjectException

     * @return the converted exception or the original exception
     */
    protected Throwable convertThrowable(final Throwable throwable) {
        // see 14.3.9 chapter EJB3
        if (isExtendingRmiRemote() && throwable instanceof NoSuchEJBException) {
            NoSuchObjectException ne = new NoSuchObjectException(throwable.getMessage());
            ne.detail = throwable;
            return ne;
        }

        // see 14.4.2.2 chapter EJB3
View Full Code Here

Examples of java.rmi.NoSuchObjectException

            // insert
            cache.put(id, instance);
         }
         catch(Throwable x)
         {
            throw new NoSuchObjectException(x.getMessage());
         }
      }
      return instance;
   }
View Full Code Here

Examples of java.rmi.NoSuchObjectException

               cache.insert(id, ctx);
            }
            catch (Throwable x)
            {
               log.debug("Activation failure", x);
               throw new NoSuchObjectException(x.getMessage());
            }
         }
      }

      return ctx;
View Full Code Here

Examples of java.rmi.NoSuchObjectException

    */
   public Object invokeRemote(Object proxy, Method method, Object[] args) throws Throwable
   {
      boolean trace = log.isTraceEnabled();
      HARMIServer target = (HARMIServer)getRemoteTarget();
      NoSuchObjectException nsoe = null;
      Exception lastException = null;
      while (target != null)
      {        
         try
         {
View Full Code Here

Examples of java.rmi.NoSuchObjectException

         }
         catch(NoSuchEJBException e)
         {
            if(log.isTraceEnabled())
               log.trace("Throwing " + e.getClass().getName(), e);
            throw new NoSuchObjectException(e.getMessage());
         }

         InvocationResponse response = new InvocationResponse(null);
         return response;
      }
View Full Code Here

Examples of java.rmi.NoSuchObjectException

      // If remote EJB2.x Client
      else if (Remote.class.isAssignableFrom(actualInvokingClass)
            || EJBObject.class.isAssignableFrom(actualInvokingClass)
            || EJBHome.class.isAssignableFrom(actualInvokingClass))
      {
         t = new NoSuchObjectException(original.getMessage());
      }
      // Business interface
      else
      {
         // Take no action, this is here just for readability
View Full Code Here

Examples of java.rmi.NoSuchObjectException

    }

    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        if (isInvalidReference) {
            if (remote || java.rmi.Remote.class.isAssignableFrom(method.getDeclaringClass())){
                throw new NoSuchObjectException("reference is invalid");
            } else {
                throw new NoSuchEJBException("reference is invalid");
            }
        }
View Full Code Here

Examples of java.rmi.NoSuchObjectException

                    throw new SystemException("Unexpected load exception", e);
                }

                // Did we find the instance?
                if (instance == null) {
                    throw new InvalidateReferenceException(new NoSuchObjectException("Not Found"));
                }

               
                // remember instance until it is returned to the cache               
                checkedOutInstances.put(primaryKey, instance);
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.