Package org.springframework.beans.factory

Examples of org.springframework.beans.factory.BeanInitializationException


   * and analyzer properties if it is not injected.
   */
  public void afterPropertiesSet() throws Exception {
    if( this.template==null ) {
      if( this.indexFactory==null ) {
        throw new BeanInitializationException("indexFactory property required");
      }

      this.template = new DefaultLuceneIndexTemplate(indexFactory, analyzer);
    }
  }
View Full Code Here


   * This method constructs a LuceneSearchTemplate basing indexFactory
   * and analyzer properties if it is not injected.
   */
  public void afterPropertiesSet() throws Exception {
    if (this.searcherFactory == null)
      throw new BeanInitializationException("directory property required");
    if (this.analyzer == null)
      throw new BeanInitializationException("analyzer property required");       

    if( this.template==null ) {
      this.template=new LuceneSearchTemplate(searcherFactory,analyzer);
    }
  }
View Full Code Here

            Method method = pd.getReadMethod();
            Collection<String> c = CastUtils.cast((Collection<?>)method.invoke(bean, new Object[0]));

            return c;
        } catch (IllegalArgumentException e) {
            throw new BeanInitializationException("Could not retrieve ids.", e);
        } catch (IllegalAccessException e) {
            throw new BeanInitializationException("Could not access id getter.", e);
        } catch (InvocationTargetException e) {
            throw new BeanInitializationException("Could not invoke id getter.", e);
        } catch (SecurityException e) {
            throw new BeanInitializationException("Could not invoke id getter.", e);
        }
    }
View Full Code Here

        for ( Notifier notifier : beans.values() )
        {

            if ( notifiers.containsKey( notifier.getType() ) )
            {
                throw new BeanInitializationException(
                    "There are two Notifier beans in the appllication context for Notifier type " + notifier.getType() +
                        ". Probably two conflicting scm implementations are present in the classpath." );
            }

            if ( log.isDebugEnabled() )
View Full Code Here

                logger.debug("Using " + ClassUtils.getShortName(type) + " [" + entry.getKey() + "]");
            }
            return entry.getValue();
        }
        else {
            throw new BeanInitializationException(
                    "Could not find exactly 1 " + ClassUtils.getShortName(type) + " in application context");
        }
    }
View Full Code Here

            }
            Collections.sort(result, new OrderComparator());
            return result;
        }
        catch (ClassNotFoundException ex) {
            throw new BeanInitializationException("Could not find default strategy class for interface [" + key + "]",
                    ex);
        }
    }
View Full Code Here

     */
    public <T> T getDefaultStrategy(Class<T> strategyInterface, ApplicationContext applicationContext)
            throws BeanInitializationException {
        List<T> result = getDefaultStrategies(strategyInterface, applicationContext);
        if (result.size() != 1) {
            throw new BeanInitializationException(
                    "Could not find exactly 1 strategy for interface [" + strategyInterface.getName() + "]");
        }
        return result.get(0);
    }
View Full Code Here

            }
            initWebServiceMessageFactory(context);
            messageReceiverHandlerAdapter.afterPropertiesSet();
        }
        catch (Exception ex) {
            throw new BeanInitializationException("Could not initialize WebServiceMessageReceiverHandlerAdapter", ex);
        }
    }
View Full Code Here

            wsdlDefinitionHandlerAdapter.setTransformLocations(isTransformWsdlLocations());
            wsdlDefinitionHandlerAdapter.setTransformSchemaLocations(isTransformSchemaLocations());
            wsdlDefinitionHandlerAdapter.afterPropertiesSet();
        }
        catch (Exception ex) {
            throw new BeanInitializationException("Could not initialize WsdlDefinitionHandlerAdapter", ex);
        }
    }
View Full Code Here

            }
            xsdSchemaHandlerAdapter.setTransformSchemaLocations(isTransformSchemaLocations());
            xsdSchemaHandlerAdapter.afterPropertiesSet();
        }
        catch (Exception ex) {
            throw new BeanInitializationException("Could not initialize XsdSchemaHandlerAdapter", ex);
        }
    }
View Full Code Here

TOP

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

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.