Definition Errors

2.2.2. Restricting the bean types of a bean
- bean class or producer method or field specifies a @Typed annotation, 
  and the value member specifies a class which does not correspond to a type 
  in the unrestricted set of bean types of a bean

2.4.1. Built-in scope types
- interceptor or decorator has any scope other than @Dependent (Non-Portable behavior)

2.4.3. Declaring the bean scope
- bean class or producer method or field specifies multiple scope type annotations

2.4.4. Default scope
- bean does not explicitly declare a scope when there is no default scope 
  (there are two different stereotypes declared by the bean that declare different default scopes)

2.5.3. Beans with no EL name
- interceptor or decorator has a name (Non-Portable behavior)

2.6.1. Declaring an alternative
- interceptor or decorator is an alternative (Non-Portable behavior)

2.7.1.1. Declaring the default scope for a stereotype
- stereotype declares more than one scope

2.7.1.3. Declaring a @Named stereotype
- stereotype declares a non-empty @Named annotation (Non-Portable behavior)
- stereotype declares any other qualifier annotation
- stereotype is annotated @Typed

3.1. Managed beans
- the bean class of a managed bean is annotated with both 
  the @Interceptor and @Decorator stereotypes
- managed bean with a public field declares any scope other than @Dependent
- managed bean with a parameterized bean class declares any scope other than @Dependent

3.1.4. Specializing a managed bean
- managed bean class annotated @Specializes does not directly extend 
  the bean class of another managed bean

3.2. Session beans
- session bean specifies an illegal scope (a stateless session bean must belong 
  to the @Dependent pseudo-scope; a singleton bean must belong to either the
  @ApplicationScoped scope or to the @Dependent pseudo-scope, a stateful session 
  bean may have any scope)
- bean class of a session bean is annotated @Interceptor or @Decorator
- session bean with a parameterized bean class declares any scope other than @Dependent

3.2.4. Specializing a session bean
- session bean class annotated @Specializes does not directly extend 
  the bean class of another session bean

3.3. Producer methods 
- producer method return type contains a wildcard type parameter
- producer method with a parameterized return type with a type variable declares 
  any scope other than @Dependent
- producer method return type is a type variable

3.3.2. Declaring a producer method
- producer method is annotated @Inject
- producer method has a parameter annotated @Disposes
- producer method has a parameter annotated @Observes
- non-static method of a session bean class is annotated @Produces, and the method 
  is not a business method of the session bean
- interceptor or decorator has a method annotated @Produces

3.3.3. Specializing a producer method
- method annotated @Specializes is static or does not directly override another producer method

3.3.6. Declaring a disposer method
- method has more than one parameter annotated @Disposes
- disposer method is annotated @Produces or @Inject or has a parameter annotated @Observes
- non-static method of a session bean class has a parameter annotated @Disposes, and 
  the method is not a business method of the session bean
- interceptor or decorator has a method annotated @Disposes

3.3.7. Disposer method resolution
- there is no producer method declared by the (same) bean class that is assignable 
  to the disposed parameter of a disposer method
- there are multiple disposer methods for a single producer method 

3.4. Producer fields
- producer field type contains a wildcard type parameter
- producer field with a parameterized type with a type variable declares any 
  scope other than @Dependent
- producer field type is a type variable

3.4.2. Declaring a producer field
- producer field is annotated @Inject
- non-static field of a session bean class is annotated @Produces
- interceptor or decorator has a field annotated @Produces

3.5.1. Declaring a resource
- producer field declaration specifies an EL name (together with one of 
  @Resource, @PersistenceContext, @PersistenceUnit, @EJB, @WebServiceRef)
- matching object in the Java EE component environment is not of the same type 
  as the producer field declaration (JBT: let's ignore this rule so far since we don't have any good tool to recognize such components)

3.6. Additional built-in beans
- Java EE component class has an injection point of type UserTransaction 
  and qualifier @Default, and may not validly make use of the JTA UserTransaction 
  according to the Java EE platform specification (JBT: let's ignore this rule so far since we don't have any good tool to recognize such components)

3.7.1. Declaring a bean constructor
- bean class has more than one constructor annotated @Inject
- bean constructor has a parameter annotated @Disposes, or @Observes

3.8.1. Declaring an injected field
- injected field is annotated @Produces

3.9.1. Declaring an initializer method
- generic method of a bean is annotated @Inject (initializer method is a non-abstract, 
  non-static, non-generic method of a bean class)

3.11. The qualifier @Named at injection points
- injection point other than injected field declares a @Named annotation that 
  does not specify the value member

4.3.1. Direct and indirect specialization
- X specializes Y but does not have some bean type of Y
- X specializes Y and Y has a name and X declares a name explicitly, using @Named
- interceptor or decorator is annotated @Specializes (Non-Portable behavior)

5.1.4. Inter-module injection
- a decorator can not be injected
- an interceptor can not be injected

5.2.2. Legal injection point types
- injection point type is a type variable

5.2.5. Qualifier annotations with members
- array-valued or annotation-valued member of a qualifier type is not annotated @Nonbinding (Non-Portable behavior)

5.5.7. Injection point metadata
- bean that declares any scope other than @Dependent has an injection point of type 
  InjectionPoint and qualifier @Default
- Java EE component class supporting injection that is not a bean has an injection 
  point of type InjectionPoint and qualifier @Default (JBT: let's ignore this rule so far since we don't have any good tool to recognize such components)

8.1.2. Decorator delegate injection points
- decorator has more than one delegate injection point, or
  does not have a delegate injection point
- injection point that is not an injected field, initializer method parameter 
  or bean constructor method parameter is annotated @Delegate
- bean class that is not a decorator has an injection point annotated @Delegate

8.1.3. Decorated types of a decorator
- delegate type does not implement or extend a decorated type of the decorator,
  or specifies different type parameters

9.2. Declaring the interceptor bindings of an interceptor
- interceptor for lifecycle callbacks declares an interceptor binding type 
  that is defined @Target({TYPE, METHOD})
- interceptor declared using @Interceptor does not declare any interceptor binding (Non-Portable behavior)

9.3. Binding an interceptor to a bean
- managed bean has a class level interceptor binding and is declared final 
  or has a non-static, non-private, final method
- non-static, non-private, final method of a managed bean has a method level 
  interceptor binding

9.5.2. Interceptor binding types with members
- the set of interceptor bindings of a bean or interceptor, including bindings 
  inherited from stereotypes and other interceptor bindings, has two instances 
  of a certain interceptor binding type and the instances have different values 
  of some annotation member
- array-valued or annotation-valued member of an interceptor binding type 
  is not annotated @Nonbinding (Non-Portable behavior)

10.4.2. Declaring an observer method
- method has more than one parameter annotated @Observes
- observer method is annotated @Produces or @Inject or has a parameter annotated @Disposes
- non-static method of a session bean class has a parameter annotated @Observes, 
  and the method is not a business method of the EJB
- interceptor or decorator has a method with a parameter annotated @Observes

10.4.3. Conditional observer methods
- bean with scope @Dependent has an observer method declared notifyObserver=IF_EXISTS

12.1. Bean archives
- bean class is deployed in two different bean archives (Non-Portable behavior) - (JBT: let's ignore this rule so far since we don't have any good tool to recognize such components)


Deployment problems

5.1.3. Inconsistent specialization
- Suppose an enabled bean X specializes a second bean Y. If there is another enabled bean that specializes Y we say that inconsistent 
  specialization exists. The container automatically detects inconsistent specialization and treats it as a deployment problem.

5.2.1. Unsatisfied and ambiguous dependencies
- If an unsatisfied or unresolvable ambiguous dependency exists, the container automatically detects the problem and
  treats it as a deployment problem.
  
5.2.4. Primitive types and null values
- If an injection point of primitive type resolves to a bean that may have null values, such as a producer method
  with a non-primitive return type or a producer field with a non-primitive type, the container automatically detects the problem
  and treats it as a deployment problem.

5.3.1. Ambiguous EL names 
- All unresolvable ambiguous EL names are detected by the container when the application is initialized. Suppose two beans are both available for injection in a certain war, and either: 
  • the two beans have the same EL name and the name is not resolvable, or 
  • the EL name of one bean is of the form x.y, where y is a valid bean EL name, and x is the EL name of the other bean, 
    the container automatically detects the problem and treats it as a deployment problem.

5.4.1. Unproxyable bean types 
- If an injection point whose declared type cannot be proxied by the container resolves to a bean with a normal scope, 
   the container automatically detects the problem and treats it as a deployment problem: 
a) Classes which don't have a non-private constructor with no parameters cannot be proxied by the container. 
b) Classes which are declared final or have final methods cannot be proxied by the container. 
c) Primitive types cannot be proxied by the container. 
d) Array types cannot be proxied by the container. 

6.6.4 Validation of passivation capable beans and dependencies
- If a managed bean which declares a passivating scope is not passivation capable, then the container automatically detects the problem and treats it as a deployment problem.

8.3. Decorator resolution 
- If a decorator matches a managed bean, and the managed bean class is declared final, the container automatically detects 
  the problem and treats it as a deployment problem. 
- If a decorator matches a managed bean with a non-static, non-private, final method, and the decorator also implements that method,
  the container automatically detects the problem and treats it as a deployment problem.


  Beans.xml (all of them are deployment problems)


5.1.1. Declaring selected alternatives for a bean archive
- Each child <class> element must specify the name of an alternative bean class. If there is no class with the specified
  name, or if the class with the specified name is not an alternative bean class, the container automatically detects the problem
  and treats it as a deployment problem.
- Each child <stereotype> element must specify the name of an @Alternative stereotype annotation. If there is no annotation
  with the specified name, or the annotation is not an @Alternative stereotype, the container automatically detects the
  problem and treats it as a deployment problem.
- If the same type is listed twice under the <alternatives> element, the container automatically detects the problem and
  treats it as a deployment problem.

8.2. Decorator enablement and ordering
- Each child <class> element must specify the name of a decorator bean class. If there is no class with the specified name,
  or if the class with the specified name is not a decorator bean class, the container automatically detects the problem and
  treats it as a deployment problem.
- If the same class is listed twice under the <decorators> element, the container automatically detects the problem and
  treats it as a deployment problem.
   
9.4. Interceptor enablement and ordering
- Each child <class> element must specify the name of an interceptor class. If there is no class with the specified name, or if
  the class with the specified name is not an interceptor class, the container automatically detects the problem and treats it as
  a deployment problem.
- If the same class is listed twice under the <interceptors> element, the container automatically detects the problem and treats it as
  a deployment problem.


Other errors.


2.7.1.5. Stereotypes with additional stereotypes 
- Stereotypes declared @Target(TYPE) may not be applied to stereotypes declared @Target({TYPE, METHOD, FIELD}), 
  @Target(METHOD), @Target(FIELD) or @Target({METHOD, FIELD}).

9.1.1. Interceptor binding types with additional interceptor bindings 
- Interceptor binding types declared @Target(TYPE) may not be applied to interceptor binding types declared 
  @Target({TYPE, METHOD}).

9.1.2. Interceptor bindings for stereotypes
- If a stereotype declares interceptor bindings, it must be defined as @Target(TYPE).