Spring Framework

org.springframework.beans.factory
Class NoSuchBeanDefinitionException

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.factory.NoSuchBeanDefinitionException
All Implemented Interfaces:
java.io.Serializable

public class NoSuchBeanDefinitionException
extends BeansException

Exception thrown when a BeanFactory is asked for a bean instance name for which it cannot find a definition.

Author:
Rod Johnson, Juergen Hoeller
See Also:
Serialized Form

Constructor Summary
NoSuchBeanDefinitionException(java.lang.Class type)
          Create a new NoSuchBeanDefinitionException.
NoSuchBeanDefinitionException(java.lang.Class type, java.lang.String message)
          Create a new NoSuchBeanDefinitionException.
NoSuchBeanDefinitionException(java.lang.Class type, java.lang.String dependencyDescription, java.lang.String message)
          Create a new NoSuchBeanDefinitionException.
NoSuchBeanDefinitionException(java.lang.String name)
          Create a new NoSuchBeanDefinitionException.
NoSuchBeanDefinitionException(java.lang.String name, java.lang.String message)
          Create a new NoSuchBeanDefinitionException.
 
Method Summary
 java.lang.String getBeanName()
          Return the name of the missing bean, if it was a lookup by name that failed.
 java.lang.Class getBeanType()
          Return the required type of bean, if it was a lookup by type that failed.
 
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

NoSuchBeanDefinitionException

public NoSuchBeanDefinitionException(java.lang.String name)
Create a new NoSuchBeanDefinitionException.

Parameters:
name - the name of the missing bean

NoSuchBeanDefinitionException

public NoSuchBeanDefinitionException(java.lang.String name,
                                     java.lang.String message)
Create a new NoSuchBeanDefinitionException.

Parameters:
name - the name of the missing bean
message - detailed message describing the problem

NoSuchBeanDefinitionException

public NoSuchBeanDefinitionException(java.lang.Class type)
Create a new NoSuchBeanDefinitionException.

Parameters:
type - required type of bean

NoSuchBeanDefinitionException

public NoSuchBeanDefinitionException(java.lang.Class type,
                                     java.lang.String message)
Create a new NoSuchBeanDefinitionException.

Parameters:
type - required type of bean
message - detailed message describing the problem

NoSuchBeanDefinitionException

public NoSuchBeanDefinitionException(java.lang.Class type,
                                     java.lang.String dependencyDescription,
                                     java.lang.String message)
Create a new NoSuchBeanDefinitionException.

Parameters:
type - required type of bean
dependencyDescription - a description of the originating dependency
message - detailed message describing the problem
Method Detail

getBeanName

public java.lang.String getBeanName()
Return the name of the missing bean, if it was a lookup by name that failed.


getBeanType

public java.lang.Class getBeanType()
Return the required type of bean, if it was a lookup by type that failed.


Spring Framework