Examples of FactoryException


Examples of org.opengis.referencing.FactoryException

            try {
                workers.clear();
            } catch (FactoryException e) {
                throw e;
            } catch (Exception e) {
                throw new FactoryException( e );
            }
            workers = null;
        }
    }
View Full Code Here

Examples of org.opengis.referencing.FactoryException

        try {
            epsg.load( definition.openStream() );
        }
        catch (IOException io ){
            // could not load properties file
            throw new FactoryException("Could not load properties file: " + definition)
        }
    }
View Full Code Here

Examples of org.opengis.referencing.FactoryException

        final String EPSG_NUMBER = code.substring( code.indexOf(':')+1 ).trim();
       
        if( cache.containsKey( EPSG_NUMBER ) ){
            Object value = cache.get( EPSG_NUMBER );
            if( value instanceof Throwable ){
                throw new FactoryException( "WKT for "+code+" could not be parsed", (Throwable) value );
            }
            if( value instanceof CoordinateReferenceSystem){
                return (CoordinateReferenceSystem) value;
            }           
        }
View Full Code Here

Examples of org.opengis.util.FactoryException

    public static Envelope fromWKT(final CharSequence wkt) throws FactoryException {
        ensureNonNull("wkt", wkt);
        try {
            return new GeneralEnvelope(wkt);
        } catch (RuntimeException e) {
            throw new FactoryException(Errors.format(
                    Errors.Keys.UnparsableStringForClass_2, Envelope.class), e);
        }
    }
View Full Code Here

Examples of org.opengis.util.FactoryException

    public static Envelope fromWKT(final CharSequence wkt) throws FactoryException {
        ensureNonNull("wkt", wkt);
        try {
            return new GeneralEnvelope(wkt);
        } catch (IllegalArgumentException e) {
            throw new FactoryException(Errors.format(
                    Errors.Keys.UnparsableStringForClass_2, Envelope.class), e);
        }
    }
View Full Code Here

Examples of org.ow2.easybeans.api.FactoryException

        super.init();

        // Load the listener interface
        String listenerInterfaceName = getMessageDrivenInfo().getMessageListenerInterface();
        if (listenerInterfaceName == null) {
            throw new FactoryException("No MessageListener interface found for MDB '" + getClassName() + "' of container '"
                    + getContainer().getName() + "'");
        }
        try {
            this.listenerInterface = getContainer().getClassLoader().loadClass(listenerInterfaceName.replace("/", "."));
        } catch (ClassNotFoundException e) {
            throw new FactoryException("Cannot load MessageListener interface '" + listenerInterfaceName + "' found for MDB '"
                    + getClassName() + "' of container '" + getContainer().getName() + "'");
        }


        initActivationSpec();
View Full Code Here

Examples of org.ow2.easybeans.api.FactoryException

            String jndiName = null;
            try {
                jndiName = getContainer().getConfiguration().getContainerJNDIResolver().getMessageDestinationJNDIUniqueName(
                        messageDestinationLink);
            } catch (EZBJNDIResolverException e) {
                throw new FactoryException("Unable to resolve message destination link '" + messageDestinationLink
                        + "' for bean '" + getBeanInfo().getName() + "'.", e);
            }
            properties.add(new JActivationConfigProperty("destination", jndiName));
            logger.info("Message destination link ''{0}'' resolved to ''{1}'' for bean ''{2}''", messageDestinationLink,
                    jndiName, getBeanInfo().getName());
View Full Code Here

Examples of org.ow2.easybeans.api.FactoryException

        // get Method (reflection)
        Method m = null;
        try {
            m = this.activationSpec.getClass().getMethod(methodName, new Class[] {String.class});
        } catch (SecurityException e) {
            throw new FactoryException("Cannot get a method named '" + methodName
                    + "' on activation spec object '" + this.activationSpec + "'.", e);
        } catch (NoSuchMethodException e) {
            throw new FactoryException("Cannot get a method named '" + methodName
                    + "' on activation spec object '" + this.activationSpec + "'.", e);
        }

        // invoke method
        try {
            m.invoke(this.activationSpec, value);
        } catch (IllegalArgumentException e) {
            throw new FactoryException("Cannot invoke method named '" + methodName + "' with value '" + value
                    + "' on activation spec object '" + this.activationSpec + "'.", e);
        } catch (IllegalAccessException e) {
            throw new FactoryException("Cannot invoke method named '" + methodName + "' with value '" + value
                    + "' on activation spec object '" + this.activationSpec + "'.", e);
        } catch (InvocationTargetException e) {
            throw new FactoryException("Cannot invoke method named '" + methodName + "' with value '" + value
                    + "' on activation spec object '" + this.activationSpec + "'.", e);
        }


    }
View Full Code Here

Examples of org.ow2.easybeans.api.FactoryException

     */
    protected void validateActivationSpec() throws FactoryException {
        try {
            this.activationSpec.validate();
        } catch (InvalidPropertyException e) {
            throw new FactoryException(
                    "Cannot validate the validation spec object for bean '" + getBeanInfo().getName() + "'.", e);
        }
    }
View Full Code Here

Examples of org.ow2.easybeans.api.FactoryException

     */
    protected void activate() throws FactoryException {
        try {
            this.resourceAdapter.endpointActivation(this, this.activationSpec);
        } catch (ResourceException e) {
            throw new FactoryException(
                    "Cannot activate the activationspec object and us (MessageEndPointFactory) on the resource adapter",
                    e);
        }
    }
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.