-->
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.  [ 4 posts ] 
Author Message
 Post subject: ERROR: relation "scheme.tableName" does not exist
PostPosted: Tue Sep 20, 2005 10:39 am 
Newbie

Joined: Mon Jul 11, 2005 8:34 am
Posts: 12
I'm getting this error when trying to insert data to a table:

Code:
WARNING: SQL Error: 0, SQLState: 42P01
20/09/2005 11:24:22 net.sf.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: ERROR: relation "quant.concurso" does not exist


The problem is that when I retrieve or delete data from this very same table it works perfectly! So I believe its hbm.xml file is correct, otherwise retrieving and deleting data wouldn't be possible, right? But whenever I try to insert data to the same table, using the same persistent class I get the above error!!! :( this is nuts!!
"quant.concurso" is the scheme + table name, here's its xml

Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
   "hibernate-mapping-2.0.dtd">
<hibernate-mapping>
   <class name="br.gov.embrapa.quantPessoal.po.ConcursoPO" table="quant.concurso" >
      <id name="codigo" unsaved-value="-1" type="int">
         <column name="CODIGO" not-null="true" />
         <generator class="increment"/>
      </id>
      <property name="descricao" type="java.lang.String">
         <column name="descricao" length="30" />
      </property>
      
   </class>
</hibernate-mapping>


Any info is much appreciated. thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 20, 2005 2:00 pm 
Newbie

Joined: Mon Jul 11, 2005 8:34 am
Posts: 12
OMG!!!!! Someone please give me a light! I'm going nuts here! I just found out it not only retrieves, deletes but also updates successfully!! hibernate's accusing the class/table of not existing when it's the same for deleting/updating/retrieving in this case! why this error when trying to insert? has anything even close to this happened to anyone?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 20, 2005 2:33 pm 
Expert
Expert

Joined: Wed Apr 06, 2005 5:03 pm
Posts: 273
Location: Salt Lake City, Utah, USA
did you try using the schema attribute instead of putting the schema in the table name?

Code:
<class name="br.gov.embrapa.quantPessoal.po.ConcursoPO" table="concurso" schema="quant" >


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 20, 2005 2:57 pm 
Newbie

Joined: Mon Jul 11, 2005 8:34 am
Posts: 12
Problem solved! Yes, I did try using the schema attribute, but didn't work. Then after a little search in the forum I realized there are issues with hibernate and postgre (I think) So I decided to delete the table and recreate it, I had nothing to loose. And guess what!?! it worked! I still can't believe it! all is fine now! thanks for the suggestion anyway, nathanmoon! It might have been a case sensetive problem, maybe?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.