Examples of ServiceConfigurationError


Examples of java.util.ServiceConfigurationError

    return urls;
  }

  private static void fail(Class service, String msg, Throwable cause)
      throws ServiceConfigurationError {
    throw new ServiceConfigurationError(
        service.getName() + ": " + msg,
        cause
    );
  }
View Full Code Here

Examples of java.util.ServiceConfigurationError

    );
  }

  private static void fail(Class service, String msg)
      throws ServiceConfigurationError {
    throw new ServiceConfigurationError( service.getName() + ": " + msg );
  }
View Full Code Here

Examples of java.util.ServiceConfigurationError

    private static <K extends Serializable, V extends Cacheable<K>, G extends Serializable> ClusteredBackingCacheEntryStoreSource<K, V, G> load() {
        for (ClusteredBackingCacheEntryStoreSource<K, V, G> source: ServiceLoader.load(ClusteredBackingCacheEntryStoreSource.class, ClusteredBackingCacheEntryStoreSourceService.class.getClassLoader())) {
            return source;
        }
        throw new ServiceConfigurationError(ClusteredBackingCacheEntryStoreSource.class.getName());
    }
View Full Code Here

Examples of java.util.ServiceConfigurationError

        try {
            en = Thread.currentThread()
                    .getContextClassLoader().getResources(name);
            url = en.nextElement();
        } catch (Exception ex) {
            throw new ServiceConfigurationError(String.format(
                    "Could not locate the resource %s on the class path.", name), ex);
        }
        if (en.hasMoreElements())
            Logger  .getLogger(Resources.class.getName())
                    .log(Level.WARNING,
View Full Code Here

Examples of java.util.ServiceConfigurationError

     */
    public static <T> T load(final Class<T> service) {
        try {
            return ServiceLoader.load(service).iterator().next();
        } catch (NoSuchElementException ex) {
            throw new ServiceConfigurationError(String.format(Locale.ENGLISH,
                    "Could not find an implementation of the service %s on the class path.",
                    service), ex);
        }
    }
View Full Code Here

Examples of java.util.ServiceConfigurationError

    static JmsUpdateManagerParameters load(final URL source) {
        try {
            return parse(JAXB.unmarshal(source,
                                        JmsUpdateManagerParametersCi.class));
        } catch (Exception ex) {
            throw new ServiceConfigurationError(String.format(
                    "Failed to load configuration from %s .", source),
                    ex);
        }
    }
View Full Code Here

Examples of java.util.ServiceConfigurationError

    static MavenUpdateServerParameters load(final URL source) {
        try {
            return parse(JAXB.unmarshal(source,
                                        MavenUpdateServerParametersCi.class));
        } catch (Exception ex) {
            throw new ServiceConfigurationError(String.format(
                    "Failed to load configuration from %s .", source),
                    ex);
        }
    }
View Full Code Here

Examples of java.util.ServiceConfigurationError

    private static SSOClusterManager load() {
        for (SSOClusterManager manager: ServiceLoader.load(SSOClusterManager.class, SSOClusterManager.class.getClassLoader())) {
            return manager;
        }
        throw new ServiceConfigurationError(SSOClusterManager.class.getName());
    }
View Full Code Here

Examples of sun.misc.ServiceConfigurationError

            Class c = Class.forName(cn, true,
                                    ClassLoader.getSystemClassLoader());
            provider = (HttpServerProvider)c.newInstance();
            return true;
        } catch (ClassNotFoundException x) {
            throw new ServiceConfigurationError(x);
        } catch (IllegalAccessException x) {
            throw new ServiceConfigurationError(x);
        } catch (InstantiationException x) {
            throw new ServiceConfigurationError(x);
        } catch (SecurityException x) {
            throw new ServiceConfigurationError(x);
        }
    }
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.