Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » javax.ejb.EJBException and org.postgresql.util.PSQLException trying to show a list(jpa, persistence)
javax.ejb.EJBException and org.postgresql.util.PSQLException trying to show a list [message #1690725] Mon, 30 March 2015 16:16
Eclipse UserFriend
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!
Previous Topic:Sorting members of a Java file per commandline
Next Topic:Eclipse Wildfly runtime classpath
Goto Forum:
  


Current Time: Sun Apr 20 10:25:45 EDT 2025

Powered by FUDForum. Page generated in 0.02873 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top