Next, I'm studying a project involving javaWeb, with jsf
+ primefaces
. I'm using apache tomcat 7
. The problem is happening when starting the apache service and then testing my application, in which the error I identified was as follows:
fev 25, 2016 2:42:56 PM org.apache.catalina.session.StandardSession writeObject
ADVERTÊNCIA: Cannot serialize session attribute contatoController for
session 707B3CF6A468012EFA4220B84449EB6B java.io.NotSerializableException: Bean.ContatoBean
My ContactBean class is as follows:
public class ContatoBean implements Serializable{
private int id;
private String nome;
private String endereco;
private String cidade;
private String uf;
private String telefone;
private String celular;
private String email;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
public String getEndereco() {
return endereco;
}
public void setEndereco(String endereco) {
this.endereco = endereco;
}
public String getCidade() {
return cidade;
}
public void setCidade(String cidade) {
this.cidade = cidade;
}
public String getUf() {
return uf;
}
public void setUf(String uf) {
this.uf = uf;
}
public String getTelefone() {
return telefone;
}
public void setTelefone(String telefone) {
this.telefone = telefone;
}
public String getCelular() {
return celular;
}
public void setCelular(String celular) {
this.celular = celular;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
}
Even though I remove implements serializable
, it still gives error, does anyone know what it could be?