Greetings to the entire community, I have an error when deploying, the glassfish log indicates:
Severe: Undeployment failed for context / CPAVAN Information: /file:/C:/SISTEMAS/JAVA/CPAVAN/target/CPAVAN-1.0-SNAPSHOT/WEB-INF/classes/_primePU logout successful Grave: Exception while loading the app: CDI deployment failure: WELD-000072: Bean declaring to passivating scope must be passivation capable. Bean: Managed Bean [class com.mycompany.controller.UsuarioController] with qualifiers [@Default @Any @Named] org.jboss.weld.exceptions.DeploymentException: WELD-000072: Bean declaring to passivating scope must be passivation capable. Bean: Managed Bean [class com.mycompany.controller.UsuarioController] with qualifiers [@Default @Any @Named] at org.jboss.weld.bean.ManagedBean.checkType (ManagedBean.java:216)
The project is done in NetBeans 8.2, java 7, Maven and jsf 2.2. The error occurs when I add the following class to the code:
package com.mycompany.controller;
import java.io.Serializable;
import javax.faces.view.ViewScoped;
import javax.inject.Named;
@Named()
@ViewScoped
public class UsuarioController implements Serializable{
}
When I delete this code, the deploy does not indicate an error. So I have reviewed this error occurs when class does not have implements, but as you can see if it has it. Please, if you can help me, thank you very much.
Atte.
Larry Santibáñez