Package org.picocontainer

Examples of org.picocontainer.PicoInitializationException


                result.put(key, container.getComponentInstance(key));
            }
            return result;
        } catch (InstantiationException e) {
            ///CLOVER:OFF
            throw new PicoInitializationException(e);
            ///CLOVER:ON
        } catch (IllegalAccessException e) {
            ///CLOVER:OFF
            throw new PicoInitializationException(e);
            ///CLOVER:ON
        }
    }
View Full Code Here


        try {
            Constructor constructor = getAspectsCopyConstructor();
            constructor.setAccessible(true);
            return (Aspects) constructor.newInstance(new Object[]{aspects});
        } catch (SecurityException e) {
            throw new PicoInitializationException("security exception copying dynaop.Aspects", e);
        } catch (IllegalArgumentException e) {
            throw new PicoInitializationException("illegal argument passed to dynaop.Aspects copy constructor", e);
        } catch (InstantiationException e) {
            throw new PicoInitializationException("error instantiating dynaop.Aspects copy constructor object", e);
        } catch (IllegalAccessException e) {
            throw new PicoInitializationException("illegal access exception while trying to make dynaop.Aspects copy constructor accessible", e);
        } catch (InvocationTargetException e) {
            throw new PicoInitializationException("dynaop.Aspects copy constructor threw an exception", e);
        }
    }
View Full Code Here

            Constructor constructor = constructors[i];
            if (Arrays.equals(params, constructor.getParameterTypes())) {
                return constructor;
            }
        }
        throw new PicoInitializationException("dynaop.Aspects copy constructor not found");
    }
View Full Code Here

     * @return the loaded <code>PicoContainer</code> object.
     * @throws PicoInitializationException if the container has not been set.
     */
    PicoContainer getContainer() {
        if (container == null) {
            throw new PicoInitializationException("Container has not been set");
        }
        return container;
    }
View Full Code Here

        }
        if (container == null) {
            container = getApplicationContainer(request.getSession().getServletContext());
        }
        if (container == null) {
            throw new PicoInitializationException("No Container found in request, session or application."
                    + " Please make sure nanocontainer-nanowar is configured properly in web.xml.");
        }
        return container;
    }
View Full Code Here

        if (delegateClassName != null) {
            try {
                Class delegateClass = getClassLoader().loadClass(delegateClassName);
                delegate = (Filter) pico.getComponentInstanceOfType(delegateClass);
            } catch (ClassNotFoundException e) {
                throw new PicoInitializationException("Cannot load " + delegateClassName, e);
            }
        } else if (delegateKey != null) {
            delegate = (Filter) pico.getComponentInstance(delegateKey);
        } else {
            throw new PicoInitializationException("You must specify one of delegate-class or delegate-key in the filter config");
        }

        if (delegate == null) {
            throw new PicoInitializationException("Cannot find delegate for class " + delegateClassName + " or key "+ delegateKey);
        }
    }
View Full Code Here

            }

            return poa;
        } catch (UserException e)
        {
            throw new PicoInitializationException("Error enabling BiDirectional GIOP for POA", e);
        }
    }
View Full Code Here

            Repository repository = RepositoryHelper.narrow(orb.resolve_initial_references("InterfaceRepository"));

            return repository;
        } catch (InvalidName e)
        {
            throw new PicoInitializationException("could not resolve RootPOA", e);
        }
    }
View Full Code Here

            return repository;
        }
        catch (InvalidName e)
        {
            throw new PicoInitializationException("could not resolve InterfaceRepository", e);
        }
    }
View Full Code Here

            ORB orb = (ORB) container.getComponentInstance(ORB.class);

            return DynAnyFactoryHelper.narrow(orb.resolve_initial_references("DynAnyFactory"));
        } catch (InvalidName e)
        {
            throw new PicoInitializationException("Could not resolve DynAnyFactory", e);
        }
    }
View Full Code Here

TOP

Related Classes of org.picocontainer.PicoInitializationException

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.