站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 1.2.9 API 文档英文版

FactoryBeanNotInitializedException (Spring Framework) - Spring Framework 1.2.9 API 文档英文版


org.springframework.beans.factory
Class FactoryBeanNotInitializedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.springframework.core.NestedRuntimeException
                  extended by org.springframework.beans.BeansException
                      extended by org.springframework.beans.FatalBeanException
                          extended by org.springframework.beans.factory.BeanCreationException
                              extended by org.springframework.beans.factory.FactoryBeanNotInitializedException
All Implemented Interfaces:
Serializable

public class FactoryBeanNotInitializedException
extends BeanCreationException

Exception thrown if a FactoryBean is not fully initialized, for example because it is involved in a circular reference. Usually indicated by the getObject method returning null.

A circular reference with a FactoryBean cannot be solved by eagerly caching singleton instances like with normal beans. The reason is that every FactoryBean needs to be fully initialized before it can return the created bean, while only specific normal beans need to be initialized - that is, if a collaborating bean actually invokes them on initialization instead of just storing the reference.

Since:
30.10.2003
Author:
Juergen Hoeller
See Also:
FactoryBean.getObject(), Serialized Form

Constructor Summary
FactoryBeanNotInitializedException(String beanName, String msg)
          Create a new FactoryBeanNotInitializedException.
 
Method Summary
 
Methods inherited from class org.springframework.beans.factory.BeanCreationException
getBeanName, getResourceDescription
 
Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getCause, getMessage, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FactoryBeanNotInitializedException

public FactoryBeanNotInitializedException(String beanName,
                                          String msg)
Create a new FactoryBeanNotInitializedException.

Parameters:
beanName - the name of the bean requested
msg - the detail message


Copyright (c) 2002-2007 The Spring Framework Project.