Examples of ResolutionException


Examples of org.jboss.gravia.resolver.ResolutionException

            final List<Capability> providers = context.findProviders(req);

            // Fail early if there are no providers for a non-optional requirement
            if (!optres.contains(req.getResource()) && !req.isOptional() && providers.isEmpty()) {
                Set<Requirement> unresolved = Collections.singleton(req);
                throw new ResolutionException("Cannot find provider for: " + req, null, unresolved);
            }

            return new Iterator<Wire>() {
                Iterator<Capability> delagate = providers.iterator();
View Full Code Here

Examples of org.jboss.shrinkwrap.resolver.api.ResolutionException

            }
         });
      }
      catch (final PrivilegedActionException pae)
      {
         throw new ResolutionException("Could not manually set authenticator to accessible on "
                  + LightweightHttpWagon.class.getName(), pae);
      }
      try
      {
         authenticator.set(wagon, new LightweightHttpWagonAuthenticator());
      }
      catch (final Exception e)
      {
         throw new ResolutionException("Could not manually set authenticator on "
                  + LightweightHttpWagon.class.getName(), e);
      }

      // SHRINKRES-69
      // Needed to ensure that we do not cache BASIC Auth values
View Full Code Here

Examples of org.jboss.shrinkwrap.resolver.api.ResolutionException

    for (Dependency dependency : dependencies) {
      try {
        Artifact artifact = new MavenCache().getArtifact(dependency.getArtifact(), altUrl);
        files.add(artifact.getFile());
      } catch (Exception e) {
        throw new ResolutionException("Unable to resolve an artifact", e);
      }
    }

    return files.toArray(FILE_CAST);
  }
View Full Code Here

Examples of org.osgi.service.resolver.ResolutionException

        if (sashForm == null)
            throw new IllegalStateException("Control not created");
        else if (sashForm.isDisposed())
            throw new IllegalStateException("Control already disposed");

        ResolutionException resolutionException = resolutionResult.getResolutionException();
        Collection<Requirement> unresolved = resolutionException != null ? resolutionException.getUnresolvedRequirements() : Collections.<Requirement> emptyList();

        unresolvedViewer.setInput(unresolved);
        processingErrorsText.setText(formatFailureStatus(resolutionResult.getStatus()));

        unresolvedViewer.expandToLevel(2);
View Full Code Here

Examples of org.osgi.service.resolver.ResolutionException

        if (composite == null)
            throw new IllegalStateException("Control not created");
        else if (composite.isDisposed())
            throw new IllegalStateException("Control already disposed");

        ResolutionException resolutionException = resolutionResult.getResolutionException();
        Collection<Requirement> unresolved = resolutionException != null ? resolutionException.getUnresolvedRequirements() : Collections.<Requirement> emptyList();

        if (resolutionException != null && resolutionException.getUnresolvedRequirements() != null && !resolutionException.getUnresolvedRequirements().isEmpty()) {
            //
            // In this case I think we need to close the upper sash (right name?) with the exception
            // and only show the bottom one (the resolution result. The previous exception trace was
            // kind of silly
            //
View Full Code Here

Examples of org.osgi.service.resolver.ResolutionException

            }

            // Process the candidates, removing any candidates that
            // cannot resolve.
            List<Capability> candidates = rc.findProviders(req);
            ResolutionException rethrow = processCandidates(rc, resource, candidates);

            // First, due to cycles, makes sure we haven't already failed in
            // a deeper recursion.
            Object result = m_populateResultCache.get(resource);
            if (result instanceof ResolutionException)
            {
                throw (ResolutionException) result;
            }
            // Next, if are no candidates remaining and the requirement is not
            // not optional, then record and throw a resolve exception.
            else if (candidates.isEmpty() && !Util.isOptional(req))
            {
                if (Util.isFragment(resource) && rc.getWirings().containsKey(resource))
                {
                    // This is a fragment that is already resolved and there is no unresolved hosts to attach it to.
                    m_populateResultCache.put(resource, Boolean.TRUE);
                    return;
                }
                String msg = "Unable to resolve " + resource
                    + ": missing requirement " + req;
                if (rethrow != null)
                {
                    msg = msg + " [caused by: " + rethrow.getMessage() + "]";
                }
                rethrow = new ResolutionException(msg, null, Collections.singleton(req));
                m_populateResultCache.put(resource, rethrow);
                throw rethrow;
            }
            // Otherwise, if we actually have candidates for the requirement, then
            // add them to the local candidate map.
View Full Code Here

Examples of org.osgi.service.resolver.ResolutionException

                            }
                            else
                            {
                                String msg = "Unable to resolve " + dependent.getResource()
                                        + ": missing requirement " + dependent;
                                throw new ResolutionException(msg, null, Collections.singleton(dependent));
                            }
                        }
                    }
                }
            }
View Full Code Here

Examples of org.osgi.service.resolver.ResolutionException

        // Add the dynamic imports candidates.
        add(req, candidates);

        // Process the candidates, removing any candidates that
        // cannot resolve.
        ResolutionException rethrow = processCandidates(rc, resource, candidates);

        if (candidates.isEmpty())
        {
            if (rethrow == null)
            {
                rethrow = new ResolutionException(
                    "Dynamic import failed.", null, Collections.singleton(req));
            }
            throw rethrow;
        }
View Full Code Here

Examples of org.osgi.service.resolver.ResolutionException

        ResolveContext rc,
        Resource resource,
        List<Capability> candidates)
    {
        // Get satisfying candidates and populate their candidates if necessary.
        ResolutionException rethrow = null;
        Set<Capability> fragmentCands = null;
        for (Iterator<Capability> itCandCap = candidates.iterator();
            itCandCap.hasNext();)
        {
            Capability candCap = itCandCap.next();
View Full Code Here

Examples of org.osgi.service.resolver.ResolutionException

        // Step 3
        for (Resource fragment : unselectedFragments)
        {
            removeResource(fragment,
                new ResolutionException(
                    "Fragment was not selected for attachment: " + fragment));
        }

        // Step 4
        for (WrappedResource hostResource : hostResources)
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.