Package org.apache.commons.proxy.exception

Examples of org.apache.commons.proxy.exception.ObjectProviderException


        {
            return new BurlapProxyFactory().create( serviceInterface, url );
        }
        catch( MalformedURLException e )
        {
            throw new ObjectProviderException( "Invalid url given.", e );
        }
    }
View Full Code Here


            final Method createMethod = homeObject.getClass().getMethod( "create", ProxyUtils.EMPTY_ARGUMENT_TYPES );
            return createMethod.invoke( homeObject, ProxyUtils.EMPTY_ARGUMENTS );
        }
        catch( NoSuchMethodException e )
        {
            throw new ObjectProviderException(
                    "Unable to find no-arg create() method on home interface " + homeInterface.getName() + ".", e );
        }
        catch( IllegalAccessException e )
        {
            throw new ObjectProviderException(
                    "No-arg create() method on home interface " + homeInterface.getName() + " is not accessible.",
                    e ); // Should never happen!
        }
        catch( NamingException e )
        {
            throw new ObjectProviderException( "Unable to lookup EJB home object in JNDI.", e );
        }
        catch( InvocationTargetException e )
        {
            throw new ObjectProviderException(
                    "No-arg create() method on home interface " + homeInterface.getName() + " threw an exception.", e );
        }
    }
View Full Code Here

            return portQName == null ? service.getPort( serviceInterface ) :
                   service.getPort( portQName, serviceInterface );
        }
        catch( ServiceException e )
        {
            throw new ObjectProviderException( "Unable to create JAX-RPC service proxy.", e );
        }
        catch( MalformedURLException e )
        {
            throw new ObjectProviderException( "Invalid URL given.", e );
        }
    }
View Full Code Here

            reg = getRegistry();
            return reg.lookup( name );
        }
        catch( NotBoundException e )
        {
            throw new ObjectProviderException( "Name " + name + " not found in registry at " + host + ":" + port + ".",
                                               e );
        }
        catch( RemoteException e )
        {
            throw new ObjectProviderException(
                    "Unable to lookup service named " + name + " in registry at " + host + ":" + port + ".", e );
        }
    }
View Full Code Here

                return LocateRegistry.getRegistry( host, port );
            }
        }
        catch( RemoteException e )
        {
            throw new ObjectProviderException( "Unable to locate registry at " + host + ":" + port + ".", e );
        }
    }
View Full Code Here

        {
            return new HessianProxyFactory().create( serviceInterface, url );
        }
        catch( MalformedURLException e )
        {
            throw new ObjectProviderException( "Invalid url given.", e );
        }
    }
View Full Code Here

                }
                return classPool.get( ProxyUtils.getJavaClassName( clazz ) );
            }
            catch( NotFoundException e )
            {
                throw new ObjectProviderException(
                        "Unable to find class " + clazz.getName() + " in default Javassist class pool.", e );
            }
        }
    }
View Full Code Here

            {
                cloneMethod = cloneable.getClass().getMethod( "clone", ProxyUtils.EMPTY_ARGUMENT_TYPES );
            }
            catch( NoSuchMethodException e )
            {
                throw new ObjectProviderException(
                        "Class " + cloneable.getClass().getName() + " does not have a public clone() method." );
            }
        }
        return cloneMethod;
    }
View Full Code Here

        {
            return getCloneMethod().invoke( cloneable, ProxyUtils.EMPTY_ARGUMENTS );
        }
        catch( IllegalAccessException e )
        {
            throw new ObjectProviderException(
                    "Class " + cloneable.getClass().getName() + " does not have a public clone() method.", e );
        }
        catch( InvocationTargetException e )
        {
            throw new ObjectProviderException(
                    "Attempt to clone object of type " + cloneable.getClass().getName() + " threw an exception.", e );
        }
    }
View Full Code Here

    {
        try
        {
            if( beanClass == null )
            {
                throw new ObjectProviderException( "No bean class provided." );
            }
            return beanClass.newInstance();
        }
        catch( InstantiationException e )
        {
            throw new ObjectProviderException( "Class " + beanClass.getName() + " is not concrete.", e );
        }
        catch( IllegalAccessException e )
        {
            throw new ObjectProviderException( "Constructor for class " + beanClass.getName() + " is not accessible.",
                                               e );
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.proxy.exception.ObjectProviderException

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.