org.springframework.config.java.support
Class FactoryBeanObjectCreationException

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.config.java.support.FactoryBeanObjectCreationException
All Implemented Interfaces:
java.io.Serializable

public class FactoryBeanObjectCreationException
extends org.springframework.beans.FatalBeanException

Unchecked exception thrown by ConfigurationSupport.getObject(FactoryBean) in the event that the underlying FactoryBean.getObject() method throws an exception. It is important that ConfigurationSupport's getObject method does not propagate checked exceptions, as it would make usage cumbersome within @Bean methods.

The original FactoryBean exception is simply wrapped and propagated along as the root cause.

Author:
Chris Beams
See Also:
Serialized Form

Constructor Summary
FactoryBeanObjectCreationException(org.springframework.beans.factory.FactoryBean factoryBean, java.lang.Exception cause)
          Create a new FactoryBeanObjectCreationException with the specified root cause.
FactoryBeanObjectCreationException(java.lang.String message)
          Create a new FactoryBeanObjectCreationException with the specified message explaining the failure.
 
Method Summary
 
Methods inherited from class org.springframework.beans.BeansException
equals, hashCode
 
Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getMessage, getMostSpecificCause, getRootCause
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FactoryBeanObjectCreationException

public FactoryBeanObjectCreationException(org.springframework.beans.factory.FactoryBean factoryBean,
                                          java.lang.Exception cause)
Create a new FactoryBeanObjectCreationException with the specified root cause.

Parameters:
factoryBean - the FactoryBean that threw the exception
cause - the root cause

FactoryBeanObjectCreationException

public FactoryBeanObjectCreationException(java.lang.String message)
Create a new FactoryBeanObjectCreationException with the specified message explaining the failure.

Parameters:
message - reason for failure