remplri un list avec Hibernate

1 post / 0 new
icha_7146
remplri un list avec Hibernate

Salut S'il vous plait j'ai besoin de votre aide

bref je veux remplir une List alors j'ai crée ma methode et avant que je l'affecte a ma list j'ai essaye de l'execute sous une classe main

package gestion.journaux.Service;

import gestion.journaux.metier.HibernateSessionFactory;

import java.util.Vector;

import org.hibernate.Query;


public class RemplirList {
	public static void main(String[]args){
try{
	Vector VnumJournal=new Vector();
	String queryString="select numJournal  from Journal";
	Query queryObject=HibernateSessionFactory.getSession().createQuery(queryString);
	VnumJournal.addAll(queryObject.list());
	System.out.println(VnumJournal);
	} catch (RuntimeException e) {
		throw e;
	}}

voilà l'erreur

Exception in thread "main" org.hibernate.exception.SQLGrammarException: could not execute query
	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
	at org.hibernate.loader.Loader.doList(Loader.java:2148)
	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
	at org.hibernate.loader.Loader.list(Loader.java:2024)
	at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:375)
	at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:308)
	at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)
	at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1106)
	at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
	at gestion.journaux.Service.RemplirList.main(RemplirList.java:23)
Caused by: org.postgresql.util.PSQLException: ERREUR: la relation « public.journal » n'existe pas
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1608)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1343)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:194)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:350)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254)
	at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139)
	at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
	at org.hibernate.loader.Loader.doQuery(Loader.java:662)
	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
	at org.hibernate.loader.Loader.doList(Loader.java:2145)
	... 8 more