Package org.springframework.beans.factory

Examples of org.springframework.beans.factory.BeanInitializationException


            }
            @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


            }
            @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

                logger.error("Error in logging results of check: " + checkAndResult, t);
            }
           
            if (fatalErrorMsg.length() > 0) {
                throw new BeanInitializationException(fatalErrorMsg.toString());
            }
        }

    }
View Full Code Here

    }

    @SuppressWarnings("serial")
    private void checkPositive(long value, String variable) {
        if (value < 0) {
            throw new BeanInitializationException(
                    "Invalid configuration value for environment variable " + variable
                            + ". It should be a positive integer.") {
            };
        }
    }
View Full Code Here

        log.debug("Creating Shiro Filter instance.");

        SecurityManager securityManager = getSecurityManager();
        if (securityManager == null) {
            String msg = "SecurityManager property must be set.";
            throw new BeanInitializationException(msg);
        }

        if (!(securityManager instanceof WebSecurityManager)) {
            String msg = "The security manager does not implement the WebSecurityManager interface.";
            throw new BeanInitializationException(msg);
        }

        FilterChainManager manager = createFilterChainManager();

        //Expose the constructed FilterChainManager by first wrapping it in a
View Full Code Here

    this.userAccess = new Properties();
    try {
      this.userAccess.load(userAccess.getInputStream());
    }
    catch (final IOException e) {
      throw new BeanInitializationException("can't find resource", e);
    }
  }
View Full Code Here

      // Let the subclass process the properties.
      processProperties(beanFactory, mergedProps);
    }
    catch (IOException ex) {
      throw new BeanInitializationException("Could not load properties", ex);
    }
  }
View Full Code Here

        processKey(beanFactory, key, props.getProperty(key));
      }
      catch (BeansException ex) {
        String msg = "Could not process key '" + key + "' in PropertyOverrideConfigurer";
        if (!this.ignoreInvalidKeys) {
          throw new BeanInitializationException(msg, ex);
        }
        if (logger.isDebugEnabled()) {
          logger.debug(msg, ex);
        }
      }
View Full Code Here

  protected void processKey(ConfigurableListableBeanFactory factory, String key, String value)
      throws BeansException {

    int separatorIndex = key.indexOf(this.beanNameSeparator);
    if (separatorIndex == -1) {
      throw new BeanInitializationException("Invalid key '" + key +
          "': expected 'beanName" + this.beanNameSeparator + "property'");
    }
    String beanName = key.substring(0, separatorIndex);
    String beanProperty = key.substring(separatorIndex+1);
    this.beanNames.put(beanName, Boolean.TRUE);
View Full Code Here

          if (isRequiredProperty(pd) && !pvs.contains(pd.getName())) {
            invalidProperties.add(pd.getName());
          }
        }
        if (!invalidProperties.isEmpty()) {
          throw new BeanInitializationException(buildExceptionMessage(invalidProperties, beanName));
        }
      }
      this.validatedBeanNames.put(beanName, Boolean.TRUE);
    }
    return pvs;
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.