Package org.springframework.beans.factory

Examples of org.springframework.beans.factory.BeanInitializationException


    }
    catch (Exception e) {
      if (e instanceof RuntimeException) {
        throw (RuntimeException) e;
      }
      throw new BeanInitializationException("failed to initialize", e);
    }
  }
View Full Code Here


      this.onInit();
    } catch (Exception e) {
      if (e instanceof RuntimeException) {
        throw (RuntimeException) e;
      }
      throw new BeanInitializationException("failed to initialize", e);
    }
  }
View Full Code Here

      RuntimeException e = null;
      try {
        JobExecution jobExec = launcher.run(entry.getValue(), params);
        executions.add(jobExec);
        if (jobExec.getStatus().equals(BatchStatus.FAILED)) {
          e = new BeanInitializationException("Failed executing job " + entry.getKey());
        }
      } catch (Exception ex) {
        throw new BeanInitializationException("Cannot execute job " + entry.getKey(), ex);
      }
      if (e != null) {
        throw e;
      }
    }
View Full Code Here

                SchemaExport export = new SchemaExport(cfg);
                export.drop(true, true);
                export.create(true, true);
            } catch (Exception e) {
                throw new BeanInitializationException(null, e);
            }
        }
        return bean;
    }
View Full Code Here

    super.setBeanFactory(beanFactory);
    try {
      createPool();
    }
    catch (Throwable ex) {
      throw new BeanInitializationException("Could not create instance pool for TargetSource", ex);
    }
  }
View Full Code Here

        if (view instanceof InitializingBean) {
            try {
                ((InitializingBean) view).afterPropertiesSet();
            } catch (Exception e) {
                throw new BeanInitializationException("Problem running on " + view, e);
            }
        }
        return view;
    }
View Full Code Here

    if(editor instanceof InitializingBean){
       try {
         ((InitializingBean)editor).afterPropertiesSet();
           }
           catch (Exception e) {
               throw new BeanInitializationException("Problem running on " + editor, e);
           }
    }
    return editor;
  }
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(
          "DispatcherServlet needs exactly 1 strategy for interface [" + strategyInterface.getName() + "]");
    }
    return strategies.get(0);
  }
View Full Code Here

          Class clazz = ClassUtils.forName(className, DispatcherServlet.class.getClassLoader());
          Object strategy = createDefaultStrategy(context, clazz);
          strategies.add(strategy);
        }
        catch (ClassNotFoundException ex) {
          throw new BeanInitializationException(
              "Could not find DispatcherServlet's default strategy class [" + className +
              "] for interface [" + key + "]", ex);
        }
        catch (LinkageError err) {
          throw new BeanInitializationException(
              "Error loading DispatcherServlet's default strategy class [" + className +
              "] for interface [" + key + "]: problem with class file or dependent class", err);
        }
      }
    }
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

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.