Package org.springframework.beans.factory

Examples of org.springframework.beans.factory.BeanInitializationException


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

        Constructor ctor = BurlapSkeleton.class.getConstructor(new Class[] {Object.class});
        this.skeleton = (BurlapSkeleton) ctor.newInstance(new Object[] {getProxyForService()});
      }
    }
    catch (Exception ex) {
      throw new BeanInitializationException("Burlap skeleton initialization failed", ex);
    }
  }
View Full Code Here

        Constructor ctor = HessianSkeleton.class.getConstructor(new Class[] {Object.class});
        skeleton = (HessianSkeleton) ctor.newInstance(new Object[] {getProxyForService()});
      }
    }
    catch (Throwable ex) {
      throw new BeanInitializationException("Hessian skeleton initialization failed", ex);
    }

    if (hessian2Available) {
      // Hessian 2 (version 3.0.20+).
      this.skeletonInvoker = new Hessian2SkeletonInvoker(skeleton, this.serializerFactory);
View Full Code Here

    GenericServlet servlet = new GenericServletAdapter();
    try {
      servlet.init(new DelegatingServletConfig());
    }
    catch (ServletException ex) {
      throw new BeanInitializationException("Initialization of GenericServlet adapter failed", ex);
    }
    this.servletContextHashModel = new ServletContextHashModel(servlet, getObjectWrapper());

    checkTemplate();
  }
View Full Code Here

    }
    catch (BeansException ex) {
      throw ex;
    }
    catch (Exception ex) {
      throw new BeanInitializationException("Could not retrieve PathMap attributes", ex);
    }
  }
View Full Code Here

  public final void setFilterConfig(FilterConfig filterConfig) {
    try {
      init(filterConfig);
    }
    catch (ServletException ex) {
      throw new BeanInitializationException("Could not initialize filter bean", ex);
    }
  }
View Full Code Here

   * @see #getDefaultStrategies
   */
  protected Object getDefaultStrategy(ApplicationContext context, Class strategyInterface) throws BeansException {
    List strategies = getDefaultStrategies(context, strategyInterface);
    if (strategies.size() != 1) {
      throw new BeanInitializationException(
          "DispatcherPortlet needs exactly 1 strategy for interface [" + strategyInterface.getName() + "]");
    }
    return strategies.get(0);
  }
View Full Code Here

          Class clazz = ClassUtils.forName(className, getClass().getClassLoader());
          Object strategy = createDefaultStrategy(context, clazz);
          strategies.add(strategy);
        }
        catch (ClassNotFoundException ex) {
          throw new BeanInitializationException(
              "Could not find DispatcherPortlet's default strategy class [" + className +
              "] for interface [" + key + "]", ex);
        }
        catch (LinkageError err) {
          throw new BeanInitializationException(
              "Error loading DispatcherPortlet's default strategy class [" + className +
              "] for interface [" + key + "]: problem with class file or dependent class", err);
        }
      }
    }
View Full Code Here

        if (StringUtils.hasText(label)) {
          configurable.setLabelInfo(LabelInfo.valueOf(label));
        }
      }
      catch (NoSuchMessageException e) {
        throw new BeanInitializationException("Unable to initialize bean " + name, e);
      }
    }

    return bean;
  }
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.