-->
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: Table not found in statement [select max(uid) from EVENTS]
PostPosted: Thu Jul 14, 2005 8:11 pm 
Newbie

Joined: Thu Jul 14, 2005 7:54 pm
Posts: 11
I am trying to get my first hibernate application running, followed the introduction in hibernate doc, used the hsqldb.
but I am getting errors on following statement:

session.save(theEvent);

Caused by: java.sql.SQLException: Table not found in statement [select max(uid) from EVENTS]
at org.hsqldb.jdbc.Util.throwError(Unknown Source)
at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)
at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
at org.hibernate.id.IncrementGenerator.getNext(IncrementGenerator.java:86)
... 10 more

any ideas?

after I got this error I also checked the data dir, the content looks like this:

test.lck
test.properties
test.log
test.script



<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"

"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>

<session-factory>
<property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="hibernate.connection.url">jdbc:hsqldb:data/test</property>
<property name="hibernate.connection.username">sa</property>
<property name="hibernate.connection.password"></property>
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>
<property name="show_sql">true</property>
<property name="transaction.factory_class">
org.hibernate.transaction.JDBCTransactionFactory
</property>
<property name="hibernate.cache.provider_class">
org.hibernate.cache.HashtableCacheProvider
</property>
<property name="hibernate.hbm2ddl.auto">update</property>

<mapping resource="Event.hbm.xml"/>

</session-factory>

</hibernate-configuration>

Hibernate version:3.05


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 15, 2005 2:26 am 
Expert
Expert

Joined: Thu Dec 04, 2003 12:36 pm
Posts: 275
Location: Bielefeld, Germany
What about showing your mapping files?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 18, 2005 8:35 pm 
Newbie

Joined: Thu Jul 14, 2005 7:54 pm
Posts: 11
sven wrote:
What about showing your mapping files?


never mind, I found that I was reading wrong instruction, and I had
<property name="hbm2ddl.auto">update</property>

int the conf file, where

<property name="hbm2ddl.auto">create</property>

should be placed.


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.