Package org.springframework.beans.factory

Examples of org.springframework.beans.factory.BeanCreationException


                    this.setServiceBeans(createBeans(classes.get(Path.class)));
                }
            } catch (IOException ex) {
                throw new BeanDefinitionStoreException("I/O failure during classpath scanning", ex);
            } catch (ClassNotFoundException ex) {
                throw new BeanCreationException("Failed to create bean from classfile", ex);
            }
           
            if (bus == null) {
                setBus(BusWiringBeanFactoryPostProcessor.addDefaultBus(ctx));
            }
View Full Code Here


  /* (non-Javadoc)
   * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
   */
  public void afterPropertiesSet() throws Exception {
    if (accountManager == null)
      throw new BeanCreationException("Must set accountManager");
  }
View Full Code Here

 
  /* (non-Javadoc)
   * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
   */
  public final void afterPropertiesSet() throws Exception {
    if (accountDao == null) throw new BeanCreationException("Must set accountDao");
    if (historyDao == null) throw new BeanCreationException("Must set historyDao");
    initManager();
  }
View Full Code Here

  /* (non-Javadoc)
   * @see com.apress.prospring.ch12.business.AbstractAccountManager#initManager()
   */
  protected void initManager() {
    if (connectionFactory == null) throw new BeanCreationException("Must set connectionFactory");
    if (queue == null) throw new BeanCreationException("Must set queue");
    jmsTemplate = new JmsTemplate102(connectionFactory, false);
  }
View Full Code Here

          advisors.add(this.beanFactory.getBean(name));
        }
        catch (BeanCreationException ex) {
          Throwable rootCause = ex.getMostSpecificCause();
          if (rootCause instanceof BeanCurrentlyInCreationException) {
            BeanCreationException bce = (BeanCreationException) rootCause;
            if (this.beanFactory.isCurrentlyInCreation(bce.getBeanName())) {
              if (logger.isDebugEnabled()) {
                logger.debug("Ignoring currently created advisor '" + name + "': " + ex.getMessage());
              }
              // Ignore: indicates a reference back to the bean we're trying to advise.
              // We want to find advisors other than the currently created bean itself.
View Full Code Here

    InjectionMetadata metadata = findPersistenceMetadata(bean.getClass());
    try {
      metadata.injectFields(bean, beanName);
    }
    catch (Throwable ex) {
      throw new BeanCreationException(beanName, "Injection of persistence fields failed", ex);
    }
    return true;
  }
View Full Code Here

    InjectionMetadata metadata = findPersistenceMetadata(bean.getClass());
    try {
      metadata.injectMethods(bean, beanName, pvs);
    }
    catch (Throwable ex) {
      throw new BeanCreationException(beanName, "Injection of persistence methods failed", ex);
    }
    return pvs;
  }
View Full Code Here

                    this.logger.info(msg + " " + e.getMessage() + " (enable debug for stack trace)");
                }
            }
        }
       
        throw new BeanCreationException("None of the configured bean names could be loaded. BeanNames: " + this.delegateBeanNames);
    }
View Full Code Here

    @Override
    protected TransactionManager createInstance() throws Exception
    {
        if (muleContext.getTransactionManager() == null)
        {
            throw new BeanCreationException("you must have a transaction manager configured inside the context when using " + getClass().getName());
        }
        return muleContext.getTransactionManager();
    }
View Full Code Here

                    {
                        returnData = IOUtils.getResourceAsString(file, getClass());
                    }
                    catch (IOException e)
                    {
                        throw new BeanCreationException("Failed to load test-data resource: " + file, e);
                    }
                }
                else
                {
                    returnData = rData.getTextContent();
View Full Code Here

TOP

Related Classes of org.springframework.beans.factory.BeanCreationException

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.