-->
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.  [ 2 posts ] 
Author Message
 Post subject: SEVERE: Table not found
PostPosted: Thu Mar 25, 2004 9:23 am 
Beginner
Beginner

Joined: Thu Mar 25, 2004 9:13 am
Posts: 20
I have followed the instruction of the demo application in http://www.onjava.com/pub/a/onjava/2004/01/14/hibernate.html?page=1 using HSQL

My properties file is:
Code:
hibernate.connection.username=sa
hibernate.connection.password=
hibernate.connection.url=[b]jdbc:hsqldb:D:\db\order[/b]
hibernate.connection.driver_class=org.hsqldb.jdbcDriver
hibernate.dialect=net.sf.hibernate.dialect.HSQLDialect

I can access my database and tables using both HSQL Database Manager and Data Studio, my hbm XML for this matter is
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping
    PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">

<hibernate-mapping>
    <class name="test.hibernate.Product"
           table="products">

        <id name="id" type="string"
            unsaved-value="null">
            <column name="id" sql-type="char(32)"
                    not-null="true"/>
            <generator class="uuid.hex"/>
        </id>
        <property name="name">
            <column name="name" sql-type="char(255)"
                    not-null="true"/>
        </property>
        <property name="price">
            <column name="price" sql-type="double"
                    not-null="true"/>
        </property>
        <property name="amount">
            <column name="amount" sql-type="integer"
                    not-null="true"/>
        </property>
    </class>
</hibernate-mapping>


And when I run my demo application I get the following exception:
Code:
SEVERE: could not insert: [test.hibernate.Product#2c999c44fb821dc300fb821dc64c0001]
java.sql.SQLException: Table not found: PRODUCTS in statement [insert into products (name, price, amount, id) values (?, ?, ?, ?)]
   at org.hsqldb.jdbcDriver.throwError(Unknown Source)
   at org.hsqldb.jdbcPreparedStatement.<init>(Unknown Source)
   at org.hsqldb.jdbcConnection.prepareStatement(Unknown Source)
   at net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:249)
   at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:61)
   at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:56)
   at net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:109)
   at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:460)
   at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:442)
   at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29)
   at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2382)
   at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2335)
   at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2204)
   at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61)
   at test.InsertProduct.main(InsertProduct.java:33)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:324)
   at com.intellij.rt.execution.application.AppMain.main(Unknown Source)

TIA Oren

_________________
Oren Gross


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 25, 2004 10:05 am 
Beginner
Beginner

Joined: Thu Mar 25, 2004 9:13 am
Posts: 20
Fond the problem... should have used jdbc:hsqldb:D:\\db\\order

_________________
Oren Gross


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