Package org.picocontainer

Examples of org.picocontainer.PicoInitializationException


            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


            }

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

            POA poa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));

            return poa;
        } 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

            final Set nonMatching = new HashSet();
            final Constructor[] constructors = getComponentImplementation().getDeclaredConstructors();
            for (int i = 0; i < constructors.length; i++) {
                nonMatching.add(constructors[i]);
            }
            throw new PicoInitializationException("Either do the specified parameters not match any of the following constructors: " + nonMatching.toString() + " or the constructors were not accessible for '" + getComponentImplementation() + "'");
        }
        return greediestConstructor;
    }
View Full Code Here

                        throw new PicoInvocationTargetInitializationException(e.getTargetException());
                    } catch (InstantiationException e) {
                        // can't get here because checkConcrete() will catch it earlier, but see PICO-191
                        ///CLOVER:OFF
                        componentMonitor.instantiationFailed(constructor, e);
                        throw new PicoInitializationException("Should never get here");
                        ///CLOVER:ON
                    } catch (IllegalAccessException e) {
                        // can't get here because either filtered or access mode set
                        ///CLOVER:OFF
                        componentMonitor.instantiationFailed(constructor, e);
                        throw new PicoInitializationException(e);
                        ///CLOVER:ON
                    }
                }
            };
        }
View Full Code Here

            }
        }
        if (unsatisfiableDependencyTypes.size() > 0) {
            throw new UnsatisfiableDependenciesException(this, unsatisfiableDependencyTypes);
        } else  if (nonMatchingParameterPositions.size() > 0) {
            throw new PicoInitializationException("Following parameters do not match any of the setters for "
                    + getComponentImplementation() + ": " + nonMatchingParameterPositions.toString());
        }
        return (Parameter[]) matchingParameterList.toArray(new Parameter[matchingParameterList.size()]);
    }
View Full Code Here

                    throw new PicoInvocationTargetInitializationException(e);
                }
                try {
                    setter.invoke(componentInstance, new Object[]{value});
                } catch (final Exception e) {
                    throw new PicoInitializationException("Failed to set property " + propertyName + " to " + propertyValue + ": " + e.getMessage(), e);
                }
            }
        }
        return componentInstance;
    }
View Full Code Here

            return new File(value);
        } else if (typeName.equals(URL.class.getName()) || typeName.equals("url")) {
            try {
                return new URL(value);
            } catch (MalformedURLException e) {
                throw new PicoInitializationException(e);
            }
        } else if (typeName.equals(Class.class.getName()) || typeName.equals("class")) {
            return classLoader.loadClass(value);
        }
        return null;
View Full Code Here

                result.add(container.getComponentInstance(componentAdapter.getComponentKey()));
            }
            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

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.