Package org.springframework.beans

Examples of org.springframework.beans.FatalBeanException


   * or <code>null</code> if none found
   * @throws BeansException in case of errors
   * @deprecated as of Spring 2.0.1: Override <code>findAutowireCandidates</code> instead
   */
  protected Map findMatchingBeans(Class requiredType) throws BeansException {
    throw new FatalBeanException("Bean lookup by type not supported by this factory");
  }
View Full Code Here


    ResourcePatternResolver resourcePatternResolver = new PathMatchingResourcePatternResolver();

    try {
      Resource[] configResources = resourcePatternResolver.getResources(resourceLocation);
      if (configResources.length == 0) {
        throw new FatalBeanException("Unable to find resource for specified definition. " +
            "Group resource name [" + this.resourceLocation + "], factory key [" + factoryKey + "]");
      }
      reader.loadBeanDefinitions(configResources);
    }
    catch (IOException ex) {
      throw new BeanDefinitionStoreException(
          "Error accessing bean definition resource [" + this.resourceLocation + "]", ex);
    }
    catch (BeanDefinitionStoreException ex) {
      throw new FatalBeanException("Unable to load group definition: " +
          "group resource name [" + this.resourceLocation + "], factory key [" + factoryKey + "]", ex);
    }

    return factory;
  }
View Full Code Here

          handlerClass = ClassUtils.forName(className,
              this.bundleClassLoader);
        }

        if (!NamespaceHandler.class.isAssignableFrom(handlerClass)) {
          throw new FatalBeanException("Class [" + className
              + "] for namespace [" + namespaceUri
              + "] does not implement the ["
              + NamespaceHandler.class.getName() + "] interface");
        }
        NamespaceHandler namespaceHandler = (NamespaceHandler) BeanUtils
            .instantiateClass(handlerClass);
        namespaceHandler.init();
        handlerMappings.put(namespaceUri, namespaceHandler);
        return namespaceHandler;
      } catch (ClassNotFoundException ex) {
        throw new FatalBeanException("NamespaceHandler class ["
            + className + "] for namespace [" + namespaceUri
            + "] not found", ex);
      } catch (LinkageError err) {
        throw new FatalBeanException(
            "Invalid NamespaceHandler class ["
                + className
                + "] for namespace ["
                + namespaceUri
                + "]: problem with handler class file or dependent class",
View Full Code Here

        if (referenceObj != null) {
            try {
                pd.getWriteMethod().invoke(bean, new Object[] {referenceObj});
            } catch (Throwable e) {
                throw new FatalBeanException("Problem injecting reference:  " + e.getMessage(), e);
            }
        }
    }
View Full Code Here

        if (propertyObj != null) {
            try {
                pd.getWriteMethod().invoke(bean, new Object[] {propertyObj});
            } catch (Throwable e) {
                throw new FatalBeanException("Problem injecting property:  " + e.getMessage(), e);
            }
        }
    }
View Full Code Here

                        Object nameObj = componentName;
                        if (nameObj != null) {
                            try {
                                pd.getWriteMethod().invoke(bean, new Object[] {nameObj});
                            } catch (Throwable e) {
                                throw new FatalBeanException("Problem injecting reference:  " + e.getMessage(), e);
                            }
                        }
                    } else {
                        throw new IllegalStateException(
                                                        "ComponentName annotation is supported only on java.lang.String field type.");
View Full Code Here

       
        if (referenceObj != null) {
            try {                                                      
                pd.getWriteMethod().invoke(bean, new Object[] { referenceObj });
            } catch (Throwable e) {
                throw new FatalBeanException("Problem injecting reference:  " + e.getMessage(), e);
            }
        }
    }
View Full Code Here

       
        if (propertyObj != null) {
            try {                                                      
                pd.getWriteMethod().invoke(bean, new Object[] { propertyObj });
            } catch (Throwable e) {
                throw new FatalBeanException("Problem injecting property:  " + e.getMessage(), e);
            }
        }
    }
View Full Code Here

                        Object nameObj = componentName;                   
                        if (nameObj != null) {
                            try {                                                      
                                pd.getWriteMethod().invoke(bean, new Object[] { nameObj });
                            } catch (Throwable e) {
                                throw new FatalBeanException("Problem injecting reference:  " + e.getMessage(), e);
                            }
                        }
                    } else {
                        throw new IllegalStateException("ComponentName annotation is supported only on java.lang.String field type.");
                    }
View Full Code Here

        if (referenceObj != null) {
            try {
                pd.getWriteMethod().invoke(bean, new Object[] {referenceObj});
            } catch (Throwable e) {
                throw new FatalBeanException("Problem injecting reference:  " + e.getMessage(), e);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.springframework.beans.FatalBeanException

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.