Olá,
estou usando no meu projeto EJB + JSF.
Mas ao executar o action do button apresenta esse erro e já procurei e não encontrei resposta ao erro.
Observação: Já deixei a classe ResultVO implementando Serializable.
type Exception report
message
descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: #{LoginFacade.validate}: javax.ejb.EJBException: nested exception is: java.rmi.MarshalException: CORBA MARSHAL 1398079695 No; nested exception is:
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 207 completed: No
root cause
javax.faces.FacesException: #{LoginFacade.validate}: javax.ejb.EJBException: nested exception is: java.rmi.MarshalException: CORBA MARSHAL 1398079695 No; nested exception is:
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 207 completed: No
root cause
javax.faces.el.EvaluationException: javax.ejb.EJBException: nested exception is: java.rmi.MarshalException: CORBA MARSHAL 1398079695 No; nested exception is:
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 207 completed: No
root cause
javax.ejb.EJBException: nested exception is: java.rmi.MarshalException: CORBA MARSHAL 1398079695 No; nested exception is:
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 207 completed: No
Abaixo os código do EJB e Façade
package org.cvhnet.facade;
import javax.ejb.EJB;
import org.cvhnet.ejb.LoginBean;
import org.cvhnet.ejb.LoginRemote;
import org.cvhnet.vo.ResultVO;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author rmoraes
*/
public class LoginFacade {
private String email;
private String senha;
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getSenha() {
return senha;
}
public void setSenha(String senha) {
this.senha = senha;
}
@EJB
private LoginRemote loginBean = new LoginBean();
/** Creates a new instance of LoginFacade */
public LoginFacade() {
}
public void validate(){
ResultVO resultVO = loginBean.validate(email, senha);
System.out.println("OK");
//Messenger.errorMsg(resultVO.getErro());
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.cvhnet.ejb;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.ejb.Stateless;
import org.cvhnet.dao.LoginDAO;
import org.cvhnet.util.Criptografia;
import org.cvhnet.vo.ResultVO;
import org.cvhnet.vo.UserVO;
/**
*
* @author rmoraes
*/
@Stateless
public class LoginBean implements LoginRemote {
private static final String serial = "01";
@Override
public ResultVO validate(String pEmail, String pSenha) {
LoginDAO loginDAO = new LoginDAO();
UserVO userVO = null;
ResultVO resultVO = new ResultVO();
try {
userVO = loginDAO.validate(pEmail);
if (userVO == null) {
resultVO.setErro("loginError");
} else {
String cripto = Criptografia.criptografar(pEmail + pSenha);
resultVO.setValue(userVO);
// Validar senha
if (cripto.compareTo(userVO.getSenha()) != 0) {
// throw new Exception("Error " + serial + "01" + ": Senha inválida. Favor digitar a senha corretamente.");
resultVO.setErro("loginError");
}
}
} catch (Exception ex) {
Logger.getLogger(LoginBean.class.getName()).log(Level.SEVERE, null, ex);
}
return resultVO;
}
}