Package org.apache.tuscany.sca.core.factory

Examples of org.apache.tuscany.sca.core.factory.ObjectCreationException


                    throw new ResourceNotFoundException("Resource not found: " + mappedName);
                }
            }
            return resource;
        } catch (ResourceResolutionException e) {
            throw new ObjectCreationException(e);
        }

    }
View Full Code Here


     */
    public void inject(T instance) throws ObjectCreationException {
        try {
            field.set(instance, objectFactory.getInstance());
        } catch (IllegalAccessException e) {
            throw new ObjectCreationException("Field is not accessible [" + field + "]", e);
        }
    }
View Full Code Here

    public void inject(T instance) throws ObjectCreationException {
        try {
            method.invoke(instance, objectFactory.getInstance());
        } catch (IllegalAccessException e) {
            throw new ObjectCreationException("Method is not accessible [" + method + "]", e);
        } catch (IllegalArgumentException e) {
            throw new ObjectCreationException("Exception thrown by setter: " + method.getName(), e);
        } catch (InvocationTargetException e) {
            throw new ObjectCreationException("Exception thrown by setter: " + method.getName(), e);
        }
    }
View Full Code Here

            String name = ctr.getName();
            throw new AssertionError("Constructor is not accessible [" + name + "]");
        } catch (
            InvocationTargetException e) {
            String name = ctr.getName();
            throw new ObjectCreationException("Exception thrown by constructor: " + name, e);
        }

        if (injectors != null) {
            for (Injector<T> injector : injectors) {
                //FIXME Injectors should never be null
View Full Code Here

        public Object getInstance() throws ObjectCreationException {
            if (isSimpleType) {
                try {
                    return simpleTypeMapper.toJavaObject(property.getXSDType(), (String)propertyValue, null);
                } catch (NumberFormatException ex) {
                    throw new ObjectCreationException("Failed to create instance for property " + property.getName()
                        + " with value "
                        + propertyValue, ex);
                } catch (IllegalArgumentException ex) {
                    throw new ObjectCreationException("Failed to create instance for property " + property.getName()
                        + " with value "
                        + propertyValue, ex);
                }
            } else {
                return mediator.mediate(propertyValue, sourceDataType, targetDataType, null);
View Full Code Here

            if (proxy == null) {
                proxy = createProxy();
            }
            return businessInterface.cast(proxy);
        } catch (Exception e) {
            throw new ObjectCreationException(e);
        }
    }
View Full Code Here

                        }
                    }
                }    
  
        } catch (Exception e) {
            throw new ObjectCreationException(e);
        } finally {
            exitMethod(startBundleEntryCount);
        }
        return osgiBundle;
    }
View Full Code Here

            }
               
            return osgiServiceReference;
           
        } catch (Exception e) {
            throw new ObjectCreationException(e);
        }
    }
View Full Code Here

                packageAdmin.resolveBundles(new Bundle[] {osgiBundle});
            }
           
        } catch (Exception e) {
            e.printStackTrace();
            throw new ObjectCreationException(e);
        }        
    }
View Full Code Here

            if (proxy == null) {
                proxy = createProxy();
            }
            return businessInterface.cast(proxy);
        } catch (Exception e) {
            throw new ObjectCreationException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.core.factory.ObjectCreationException

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.