LazyInitializationException with CDI Managed Bean and Stateful Session Bean

Well, I finally solved the problem! I saw the LazyInitializationException was in the validation phase of the selectManyCheckbox. Then I started search for this and found this link:

The problem was that the JSF was trying to use the PersistentBag created by the Hibernate, but it wouldn't use it. The solution was put a atributte telling the JSF to use a ArrayList instead of the PersistentBag.

It can be done by adding this inside the selectManyCheckbox:

<f:attribute name="collectionType" value="java.util.ArrayList" />