Package org.springframework.beans.factory.support

Examples of org.springframework.beans.factory.support.BeanDefinitionValidationException


  _kernel.startGBean(gd.getName());
      }
    }
    catch (Exception e)
    {
      throw new BeanDefinitionValidationException("Could not load the GBean for name: " + name + " bean: " + bean + ". Reason: " + e, e);
    }
    return bean;
  }
View Full Code Here


                beanDefinition.addPropertyValue("exportName", id);
            }
           
            if (hasExportName) {
                if (hasFilterExpression) {
                    throw new BeanDefinitionValidationException("The 'exportName' attribute has been specified, which cannot be used with the 'filterExpression' attribute " + inNameString("import"));
                }
               
                if (!hasProxyTypes && !hasExportTypes) {
                    throw new BeanDefinitionValidationException("The 'exportName' attribute has been specified, requiring also that the 'proxyTypes' be specified" + inNameString("import"));
                }
            } else {
                if (!hasProxyTypes && !hasExportTypes) {
                    throw new BeanDefinitionValidationException("Either 'exportTypes' or 'proxyTypes' must be specified" + inNameString("import"));
                }
            }
        }
View Full Code Here

            } else {
                logger.warn("Cannot return bean factory as application context is not an instance of " + ConfigurableApplicationContext.class.getName() + ": " + currentContext);
            }
        }
       
        throw new BeanDefinitionValidationException("No parent bean factory of application context [" + applicationContext.getDisplayName() + "] contains bean [" + getBeanNameToSearchFor() + "]");
    }
View Full Code Here

                beanDefinition.addPropertyValue("exportName", id);
            }
           
            if (hasExportName) {
                if (hasExportTypes || hasFilterExpression) {
                    throw new BeanDefinitionValidationException("The 'exportName' attribute has been specified, which cannot be used with the 'filterExpression' or 'exportTypes' attributes" + inNameString("import"));
                }
               
                if (!hasProxyTypes) {
                    throw new BeanDefinitionValidationException("The 'exportName' attribute has been specified, requiring also that the 'proxyTypes' be specified" + inNameString("import"));
                }
            } else {
                if (!hasProxyTypes && !hasExportTypes) {
                    throw new BeanDefinitionValidationException("Either 'exportTypes' or 'proxyTypes' must be specified" + inNameString("import"));
                }
            }
        }
View Full Code Here

                    }
                }
            }
        }
       
        throw new BeanDefinitionValidationException("No parent bean factory of application context [" + applicationContext.getDisplayName() + "] contains bean [" + getBeanNameToSearchFor() + "]");
    }
View Full Code Here

                beanDefinition.addPropertyValue("exportName", id);
            }
           
            if (hasExportName) {
                if (hasExportTypes || hasFilterExpression) {
                    throw new BeanDefinitionValidationException("The 'exportName' attribute has been specified, which cannot be used with the 'filterExpression' or 'exportTypes' attributes" + inNameString("import"));
                }
               
                if (!hasProxyTypes) {
                    throw new BeanDefinitionValidationException("The 'exportName' attribute has been specified, requiring also that the 'proxyTypes' be specified" + inNameString("import"));
                }
            } else {
                if (!hasProxyTypes && !hasExportTypes) {
                    throw new BeanDefinitionValidationException("Either 'exportTypes' or 'proxyTypes' must be specified" + inNameString("import"));
                }
            }
        }
View Full Code Here

            fail();
        }
        catch (BeanCreationException e) {
            Throwable rootCause = e.getRootCause();
            assertTrue(rootCause instanceof BeanDefinitionValidationException);
            BeanDefinitionValidationException cause = (BeanDefinitionValidationException) rootCause;
            assertTrue(cause.getMessage().startsWith("No parent bean factory of application context"));
        }
    }
View Full Code Here

       
        if (beanFactory != null) {
            return beanFactory;
        }
       
        throw new BeanDefinitionValidationException("No parent bean factory of application context [" + applicationContext.getDisplayName() + "] contains bean [" + getBeanNameToSearchFor() + "]");
    }
View Full Code Here

                beanDefinition.addPropertyValue("exportName", id);
            }
           
            if (hasExportName) {
                if (hasFilterExpression) {
                    throw new BeanDefinitionValidationException("The 'exportName' attribute has been specified, which cannot be used with the 'filterExpression' attribute " + inNameString("import"));
                }
               
                if (!hasProxyTypes && !hasExportTypes) {
                    throw new BeanDefinitionValidationException("The 'exportName' attribute has been specified, requiring also that the 'proxyTypes' be specified" + inNameString("import"));
                }
            } else {
                if (!hasProxyTypes && !hasExportTypes) {
                    throw new BeanDefinitionValidationException("Either 'exportTypes' or 'proxyTypes' must be specified" + inNameString("import"));
                }
            }
        }
View Full Code Here

                beanDefinition.addPropertyValue("exportName", id);
            }
           
            if (hasExportName) {
                if (hasFilterExpression) {
                    throw new BeanDefinitionValidationException("The 'exportName' attribute has been specified, which cannot be used with the 'filterExpression' attribute " + inNameString("import"));
                }
               
                if (!hasProxyTypes && !hasExportTypes) {
                    throw new BeanDefinitionValidationException("The 'exportName' attribute has been specified, requiring also that the 'proxyTypes' be specified" + inNameString("import"));
                }
            } else {
                if (!hasProxyTypes && !hasExportTypes) {
                    throw new BeanDefinitionValidationException("Either 'exportTypes' or 'proxyTypes' must be specified" + inNameString("import"));
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.springframework.beans.factory.support.BeanDefinitionValidationException

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.