-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: PostgreSQL -JDBC : insertion problem
PostPosted: Tue Dec 04, 2007 12:01 pm 
Newbie

Joined: Tue Jul 17, 2007 9:52 am
Posts: 15
Hello,

i have an error while inserting data. I don't know what causes this error; the INSERTIOn query is correct but the error message reference a relation that does not exist in the database.
the error raises when i execute a session.flush() to persist new instances in the database. The called to session.save() which is lade just before perform well

DBMS: PostgreSQL
Hibernate 3
JDBC 3
Error message:

Hibernate: insert into CLASS_E

(EXIST_EN, EXIST_FR, SOURCE_DOC_OF_DEFINITION, DEFINITION_EN, DEFINITION_FR, NOTE_EN, NOTE_FR, REMARK_EN,
REMARK_FR, PREFERRED_NAME_EN, PREFERRED_NAME_FR, SHORT_NAME_EN, SHORT_NAME_FR, ICON, SYNONYMOUS_NAMES_EN_1,
SYNONYMOUS_NAMES_EN_2, SYNONYMOUS_NAMES_FR_1, SYNONYMOUS_NAMES_FR_2, DATE_OF_CURRENT_VERSION,
DATE_OF_ORIGINAL_DEFINITION, DATE_OF_CURRENT_REVISION, REVISION, ITS_SUPERCLASS, CODE, VERSION,
DEFINED_BY, ORIGIN, SIMPLIFIED_DRAWING, CODED_NAME, RTYPE, RID)

values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'ITEM_CLASS', ?)


Hibernate: select nextval ('hibernate_sequence')


org.hibernate.exception.SQLGrammarException: could not insert: [fr.ensma.lisi.flatlib.Item_Class]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:59)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1869)
at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:2200)
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:46)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:223)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:136)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:730)
at fr.ensma.lisi.tree.test.main(test.java:93)
Caused by: org.postgresql.util.PSQLException: ERROR: relation "class" does not exist
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1548)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1316)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:191)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:351)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:305)
at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22)
at org.hibernate.persister.entity.BasicEntityPersister.insert(BasicEntityPersister.java:1853)
... 9 more
[b]Any help would be welcome, thank in advance


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 04, 2007 4:40 pm 
Newbie

Joined: Tue Oct 16, 2007 3:42 pm
Posts: 11
try to check if the session is open before using flush on it.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 06, 2007 10:59 am 
Newbie

Joined: Tue Jul 17, 2007 9:52 am
Posts: 15
resolved
the error was caused by a stired procedure


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.