hi this error appears when I'm trying to run my web app, I want to list o person in a a web page via jpa these are the errors in the trace
Internal Exception: org.postgresql.util.PSQLException: ERROR: no existe la relacion 'persona' Position: 116 Error Code: 0 Call: SELECT IDPERSONA, CELULAR, MAIL, ESTADO, IDENTIFICACION, NOMBRE, PRIMERAPELLIDO, SEGUNDOAPELLIDO, TECNOLOGIA FROM PERSONA Query: ReadAllQuery(referenceClass=Persona sql="SELECT IDPERSONA, CELULAR, EMAIL, ESTADO, IDENTIFICACION, NOMBRE, PRIMERAPELLIDO, SEGUNDOAPELLIDO, TECNOLOGIA FROM PERSONA") at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:340)
My facade sessionBean....
My facade sessionBean....
@Stateless
public class PersonaFacade extends AbstractFacade<Persona> {
@PersistenceContext(unitName = "jasperUtilPU")
private EntityManager em;
@Override
protected EntityManager getEntityManager() {
return em;
}
public PersonaFacade() {
super(Persona.class);
}
part of my Controller Bean...
@ManagedBean(name = "personaB")
@SessionScoped
public class PersonaBean {
private List<Persona> ListOfpersona;
@EJB PersonaFacade personaFacade;
public List<Persona> getListOfpersona() {
ListOfpersona= personaFacade.findAll();
return ListOfpersona;
}........
and the web page is....
<h:body>
<h:dataTable border="1" value="#{personaB.listOfpersona}" var="Persona">
<h:column>
<f:facet name="header">
idpersona
</f:facet>
#{Persona.idpersona}
</h:column>
is not a error for a related table (is a single table persona) like this thread
and the entity class look well...
@Entity
@NamedQuery(name="Persona.findAll", query="SELECT p FROM Persona p")
public class Persona implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@SequenceGenerator(name="PERSONA_IDPERSONA_GENERATOR", sequenceName="SEQ_GENA")
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="PERSONA_IDPERSONA_GENERATOR")
private Long idpersona;
I don't know where the error is??
this code run perfectly in netbeans!