Passivation beans must satisfy passivation dependencies

I have a problem with OmniFaces Viewscoped. Even when my Managedbean implements Serializable, I get the following error:

Passivation beans must satisfy passivation dependencies.

With some research, I found some answers to this problem, but with no success. I solved the serialization problem of my other class that I am embedding CDI.

Do my other classes really implement Serializable for Inject in my Managedbean?

Environment - WebSphere Application Server 8.5.5.2 - Apache MyFaces 2.0.2 - OmniFaces 1.7 - PrimeFaces 5.0

My class:

public class AgrupamentoAcoRN{

@Inject
public TbSiglaAcoAgrupadaDAO dao;

public void insereDados(TbSiglaAcoAgrupada tbSiglaAcoAgrupada) throws BancoDeDadosException{
    dao.insereRegistro(tbSiglaAcoAgrupada);
}
}

      

My Bean:

@Named("agrupamentoAcoMb")
@ViewScoped
public class AgrupamentoAcoMB implements Serializable{

/**
 * 
 */
private static final long serialVersionUID = 1L;

@Inject
private AgrupamentoAcoRN rn;
}

      

+3


source to share


1 answer


All fields of the Serializable java class must be serializable, so every field in your viewScoped bean must be serializable as well.



Your problem has nothing to do with Omnifaces

+6


source







All Articles