Package org.springframework.beans.factory.support

# Class ScopeNotActiveException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.core.NestedRuntimeException
org.springframework.beans.BeansException
org.springframework.beans.FatalBeanException
org.springframework.beans.factory.BeanCreationException
org.springframework.beans.factory.support.ScopeNotActiveException

All Implemented Interfaces:
  `Serializable`

public class ScopeNotActiveException extends BeanCreationException
A subclass of `BeanCreationException` which indicates that the target scope is not active, for example, in case of request or session scope.

Since:
  5.3
Author:
  Juergen Hoeller
See Also:
  - `BeanFactory.getBean(java.lang.String)`
  - `Scope`
  - `AbstractBeanDefinition.setScope(java.lang.String)`
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`ScopeNotActiveException(String beanName, String scopeName, IllegalStateException cause)`
Create a new ScopeNotActiveException.

## Method Summary

### Methods inherited from class org.springframework.beans.factory.BeanCreationException

`addRelatedCause, contains, getBeanName, getRelatedCauses, getResourceDescription, printStackTrace, printStackTrace, toString`

### Methods inherited from class org.springframework.core.NestedRuntimeException

`getMostSpecificCause, getRootCause`

### Methods inherited from class java.lang.Throwable

`addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### ScopeNotActiveException

public ScopeNotActiveException(String beanName, String scopeName, IllegalStateException cause)
Create a new ScopeNotActiveException.

Parameters:
  `beanName` - the name of the bean requested
  `scopeName` - the name of the target scope
  `cause` - the root cause, typically from `Scope.get(java.lang.String, org.springframework.beans.factory.ObjectFactory<?>)`