Examples of ObjectCreationException


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

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

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

            injector.inject(wrapper.getInstance());
          } else {
            injector.injectNull(wrapper.getInstance());
          }
        } catch (Exception e) {                    
          throw new ObjectCreationException("Exception invoking injector - " + e.getMessage(), e);
        }
      }
    }
   
  }
View Full Code Here

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

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

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

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

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

        public T getInstance() throws ObjectCreationException {
            try {
                return (T)scopeContainer.getWrapper(null).getInstance();
            } catch (TargetResolutionException e) {
                throw new ObjectCreationException(e);
            }
        }
View Full Code Here

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

        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);
                // return null;
View Full Code Here

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

                List<Object> values = new ArrayList<Object>();
                for (String aValue : (List<String>)propertyValue) {
                    try {
                        values.add(simpleTypeMapper.toJavaObject(property.getXSDType(), aValue, null));
                    } catch (NumberFormatException ex) {
                        throw new ObjectCreationException("Failed to create instance for property "
                                + property.getName() + " with value " + aValue
                                + " from value list of " + propertyValue, ex);
                    } catch (IllegalArgumentException ex) {
                        throw new ObjectCreationException("Failed to create instance for property "
                                + property.getName() + " with value " + aValue
                                + " from value list of " + propertyValue, ex);
                    }
                }
                return values;
View Full Code Here

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

                Object values = Array.newInstance(javaType, ((List<Object>)propertyValue).size());
                for (String aValue : (List<String>)propertyValue) {
                    try {
                        Array.set(values, count++, simpleTypeMapper.toJavaObject(property.getXSDType(), aValue, null));
                    } catch (NumberFormatException ex) {
                        throw new ObjectCreationException("Failed to create instance for property "
                                + property.getName() + " with value " + aValue
                                + " from value list of " + propertyValue, ex);
                    } catch (IllegalArgumentException ex) {
                        throw new ObjectCreationException("Failed to create instance for property "
                                + property.getName() + " with value " + aValue
                                + " from value list of " + propertyValue, ex);
                    }
                }
                return values;
View Full Code Here

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

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

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

            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
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.