Exceptions thrown by the Web Bean manager fall into three groups:
Definition errors—occur when a single Web Bean definition violates the rules of this specification
Deployment problems—occur when there are problems resolving dependencies, or inconsistent specialization, in a particular deployment
Execution errors—occur at runtime
Definition errors are developer errors. They may be detected by tooling at development time, and are also detected by the Web Bean manager at initialization time. If a definition error exists in a deployment, the deployment will be aborted by the Web Bean manager.
Deployment problems are detected by the Web Bean manager at initialization time. If a deployment problem exists in a deployment, the deployment will be aborted by the Web Bean manager.
Execution errors may not be detected until they actually occur at runtime.
All exceptions defined by this specification are runtime exceptions.
Definition errors are represented by instances of DefinitionException and its subclasses.
public class DefinitionException extends RuntimeException { public DefinitionException(String message) { ... } }
This specification defines the following subclasses:
NonexistentTypeException
NonexistentMemberException
NonexistentFieldException
NonexistentMethodException
NonexistentConstructorException
Web Bean manager implementations may define their own subclasses of DefinitionException, and throw an instance of a subclass anywhere that this specification requires a DefinitionException to be thrown.
Deployment problems are represented by instances of DeploymentException and its subclasses.
public class DeploymentException extends RuntimeException { public DeploymentException(String message) { ... } }
This specification defines the following subclasses:
UnsatisfiedDependencyException
AmbiguousDependencyException
UnserializableDependencyException
NullableDependencyException
UnproxyableDependencyException
InconsistentSpecializationException
Execution errors are represented by instances of ExecutionException and its subclasses.
public class ExecutionException extends RuntimeException { public ExecutionException(String message) { ... } }
This specification defines the following subclasses:
CreationException
UnremovedException
IllegalProductException
ObserverException
DuplicateBindingTypeException
ContextNotActiveException