Package java.util

Examples of java.util.ServiceConfigurationError


                    try {
                        Class<?> c = Class.forName(providerClassName, true,
                                classLoader);
                        cp = c.newInstance();
                    } catch (Exception ex) {
                        throw new ServiceConfigurationError(ex.getMessage(), ex);
                    }

                    // Put the locales supported by this provider into the map
                    LocaleServiceProvider provider = (LocaleServiceProvider) cp;
                    Locale[] locales = provider.getAvailableLocales();
View Full Code Here


                name = clazzName.substring(0, clazzName.length() - suffix.length()).toLowerCase(Locale.ROOT);
                break;
              }
            }
            if (name == null) {
              throw new ServiceConfigurationError("The class name " + service.getName() +
                " has wrong suffix, allowed are: " + Arrays.toString(suffixes));
            }
            //as if Solr 4.4. we can no longer create an instance of the Factories
            //as constructors not take the Map<String,String> with the configuration
            //(we do not have any configuration).
View Full Code Here

    }

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

    }

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

    }

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

    }

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

    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

            Class c = Class.forName(cn, true,
                                    ClassLoader.getSystemClassLoader());
            provider = (SelectorProvider)c.newInstance();
            return true;
        } catch (ClassNotFoundException x) {
            throw new ServiceConfigurationError(null, x);
        } catch (IllegalAccessException x) {
            throw new ServiceConfigurationError(null, x);
        } catch (InstantiationException x) {
            throw new ServiceConfigurationError(null, x);
        } catch (SecurityException x) {
            throw new ServiceConfigurationError(null, x);
        }
    }
View Full Code Here

    /**
     * @tests {@link java.util.ServiceConfigurationError#ServiceConfigurationError(String)}
     */
    @SuppressWarnings("nls")
    public void test_ConstructorLjava_lang_String() {
        ServiceConfigurationError e = new ServiceConfigurationError("fixture");
        assertEquals("fixture", e.getMessage());
        assertNull(e.getCause());
    }
View Full Code Here

     */
    @SuppressWarnings("nls")
    public void test_ConstructorLjava_lang_StringLjava_lang_Throwable() {
        IllegalArgumentException iae = new IllegalArgumentException(
                "info in the IAE");
        ServiceConfigurationError e = new ServiceConfigurationError("fixture",
                iae);
        assertEquals("fixture", e.getMessage());
        assertEquals(iae, e.getCause());
        assertEquals("info in the IAE", e.getCause().getMessage());
    }
View Full Code Here

TOP

Related Classes of java.util.ServiceConfigurationError

Copyright © 2018 www.massapicom. 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.