Package org.springframework.beans.factory.support

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


            } 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


      RefreshableScriptTargetSource ts = new RefreshableScriptTargetSource(this.scriptBeanFactory,
          scriptedObjectBeanName, scriptFactory, scriptSource, isFactoryBean);
      boolean proxyTargetClass = resolveProxyTargetClass(bd);
      String language = (String) bd.getAttribute(LANGUAGE_ATTRIBUTE);
      if (proxyTargetClass && (language==null || !language.equals("groovy"))) {
        throw new BeanDefinitionValidationException(
            "Cannot use proxyTargetClass=true with script beans where language is not groovy (found "
                + language + ")");
      }
      ts.setRefreshCheckDelay(refreshCheckDelay);
      return createRefreshableProxy(ts, interfaces, proxyTargetClass);
View Full Code Here

      RefreshableScriptTargetSource ts = new RefreshableScriptTargetSource(this.scriptBeanFactory,
          scriptedObjectBeanName, scriptFactory, scriptSource, isFactoryBean);
      boolean proxyTargetClass = resolveProxyTargetClass(bd);
      String language = (String) bd.getAttribute(LANGUAGE_ATTRIBUTE);
      if (proxyTargetClass && (language==null || !language.equals("groovy"))) {
        throw new BeanDefinitionValidationException(
            "Cannot use proxyTargetClass=true with script beans where language is not groovy (found "
                + language + ")");
      }
      ts.setRefreshCheckDelay(refreshCheckDelay);
      return createRefreshableProxy(ts, interfaces, proxyTargetClass);
View Full Code Here

            else {
                kernel.loadGBean(objectName, gbean);
            }
        }
        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

            ReplaceAndRefreshableScriptTargetSource ts = new ReplaceAndRefreshableScriptTargetSource(this.scriptBeanFactory,
                    scriptedObjectBeanName, scriptFactory, scriptSource, isFactoryBean);
            boolean proxyTargetClass = resolveProxyTargetClass(bd);
            String language = (String) bd.getAttribute(LANGUAGE_ATTRIBUTE);
            if (proxyTargetClass && (language == null || !language.equals("groovy"))) {
                throw new BeanDefinitionValidationException(
                        "Cannot use proxyTargetClass=true with script beans where language is not groovy (found "
                                + language + ")");
            }
            ts.setRefreshCheckDelay(refreshCheckDelay);
            return createRefreshableProxy(ts, interfaces, proxyTargetClass);
View Full Code Here

            else {
                kernel.loadGBean(objectName, gbean);
            }
        }
        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

      RefreshableScriptTargetSource ts = new RefreshableScriptTargetSource(this.scriptBeanFactory,
          scriptedObjectBeanName, scriptFactory, scriptSource, isFactoryBean);
      boolean proxyTargetClass = resolveProxyTargetClass(bd);
      String language = (String) bd.getAttribute(LANGUAGE_ATTRIBUTE);
      if (proxyTargetClass && (language == null || !language.equals("groovy"))) {
        throw new BeanDefinitionValidationException(
            "Cannot use proxyTargetClass=true with script beans where language is not 'groovy': '" +
            language + "'");
      }
      ts.setRefreshCheckDelay(refreshCheckDelay);
      return createRefreshableProxy(ts, interfaces, proxyTargetClass);
View Full Code Here

            aggregateFactory = genericBeanDefinition(GenericAggregateFactory.class)
                    .addConstructorArgValue(aggregateType)
                    .addConstructorArgValue(SpringContextParameterResolverFactoryBuilder.getBeanReference(registry))
                    .getBeanDefinition();
        } else {
            throw new BeanDefinitionValidationException(
                    "You must provide either an aggregate-type or an aggregate-factory in each "
                            + "event-sourcing-repository element.");
        }
        builder.getConstructorArgumentValues()
               .addIndexedArgumentValue(0, aggregateFactory);
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.