Amigos,
Estou com o seguinte problema ao acessar o meu banco de dados pelo hibernate.
Hibernate: select this_.ID_QUESTIONARIO as ID1_0_0_, this_.DESCRICAO as DESCRICAO0_0_ from QUESTIONARIO this_ where this_.ID_QUESTIONARIO=?
[org.hibernate.util.JDBCExceptionReporter] - [ERROR] - [JCLLoggerAdapter.error:457] - ERROR: relation "questionario" does not exist
[org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/ProgenesWeb].[default]] - [ERROR] - [StandardWrapperValve.invoke:253] - Servlet.service() for servlet default threw exception
org.postgresql.util.PSQLException: ERROR: relation "questionario" does not exist
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1512)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1297)
Procurei pelo erro no google, mas não achei nada que representasse alguma coisa.
Minha entidade está mapeada assim:
[code]
@Entity
@Table(name=“QUESTIONARIO”)
public class Questionario implements Serializable{
private static final long serialVersionUID = 1L;
@Id
@SequenceGenerator(name = "SEQ", sequenceName = "SEQ_QUESTIONARIO", allocationSize = 1)
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator="SEQ")
@Column(name = "ID_QUESTIONARIO")
private Long id;
@Column(name="DESCRICAO")
private String descricao;
//...gets and seters
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((id == null) ? 0 : id.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Questionario other = (Questionario) obj;
if (id == null) {
if (other.id != null)
return false;
} else if (!id.equals(other.id))
return false;
return true;
}
}[/code]
Meu hibernate-config.xml
[code]
org.postgresql.Driver
org.hibernate.dialect.PostgreSQLDialect
jdbc:postgresql://192.168.0.26:5432/progenes
postgres
postgres
<property name="hibernate.show_sql">true</property>
<mapping class="br.gov.inca.progenesdomain.domain.entity.Familia" />
<mapping class="br.gov.inca.progenesdomain.domain.entity.Questionario" />
</session-factory>
[/code]
Alguma dica?
Sds,
Vinicius