Package org.springframework.beans.factory

Examples of org.springframework.beans.factory.BeanInitializationException


      }
      for (NamedStyleInfo style : namedStyleMap.values()) {
        postProcess(style);
      }
    } catch (LayerException e) {
      throw new BeanInitializationException("Invalid configuration", e);
    }
  }
View Full Code Here


  }

  private void checkTreeNode(ClientMapInfo map, ClientLayerTreeNodeInfo node) throws BeansException {
    for (ClientLayerInfo layer : node.getLayers()) {
      if (!mapContains(map, layer)) {
        throw new BeanInitializationException(
            "A LayerTreeNodeInfo object can only reference layers which are part of the map, layer "
                + layer.getId() + " is not part of map " + map.getId() + ".");
      }
    }
    for (ClientLayerTreeNodeInfo child : node.getTreeNodes()) {
View Full Code Here

            }
            @SuppressWarnings("unchecked")
            X ar[] = (X[])o;
            return Arrays.asList(ar);
        } 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

              }
              if (result instanceof InitializingBean) {
                try {
                  ((InitializingBean) result).afterPropertiesSet();
                } catch (Exception e) {
                  throw new BeanInitializationException("failed to initialize annotated component", e);
                }
              }
              if (result instanceof Lifecycle) {
                lifecycles.add((Lifecycle) result);
                if (result instanceof SmartLifecycle && ((SmartLifecycle) result).isAutoStartup()) {
View Full Code Here

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

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

    
     * <p>The location property must be set, and be a directory
     */
    public void afterPropertiesSet() throws Exception {
        if( location==null ) {
          throw new BeanInitializationException("Must specify a location property");
        }

    File locationFile=location.getFile();
    if( !locationFile.exists() ) {
      throw new BeanInitializationException("location does not exist");
    }
        if( !locationFile.isDirectory() ) {
          throw new BeanInitializationException("location must be a directory");
        }
        this.directory=FSDirectory.getDirectory(locationFile,create);
    }
View Full Code Here

    }
  }

  public void afterPropertiesSet() throws Exception {
        if (propertiesFileName == null) {
            throw new BeanInitializationException(
                    "Must specify a name of a property file");
        }
  }
View Full Code Here

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

      this.template = new DefaultLuceneSearchTemplate(searcherFactory, analyzer);
    }
  }
View Full Code Here

    
     * <p>The location property must be set, and be a directory
     */
    public void checkFactoryBeanConfiguration() {
        if (location == null) {
            throw new BeanInitializationException(
                    "Must specify a location property");
        }
    }
View Full Code Here

     */
  protected Directory initializeDirectory() throws IOException {
        File locationFile = location.getFile();
        boolean locationExists = locationFile.exists();
        if (!locationExists && !create) {
            throw new BeanInitializationException("location does not exist");
        } else if (locationExists && !locationFile.isDirectory()) {
            throw new BeanInitializationException(
                    "location must be a directory");
        }

        return FSDirectory.getDirectory(locationFile, !locationExists?create:false);
    }
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.