-->
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.  [ 1 post ] 
Author Message
 Post subject: schema creating error
PostPosted: Thu Dec 16, 2004 9:57 pm 
Newbie

Joined: Thu Oct 21, 2004 3:24 pm
Posts: 1
Hi, I failed to create table because hbm2ddl creates DDL which HSQLDB cannot understand. I don't know what's wrong.

I verified it was working if I use "hilo" or "increment" in id generator.

Thanks, in advance.
won

Hibernate version:
Hibernate-extension 2.1.3
Hibernate 2.1.7c
Mapping documents:

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping
PUBLIC "-/Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class name="com.macinc.hh.Track" table="TRACK">
<meta attribute="class-descripiton">
Represents a single playable track in the music database.
@author Wonman Lee
</meta>

<id name="id" type="long" column="TRACK_ID"> <meta attribute="scope-set">protected</meta>
<generator class="native"/>
</id>

<property name="title" type="string" not-null="true"/>

<property name="filepath" type="string" not-null="true"/>

<property name="playtime" type="time"/>

<property name="added" type="date">
<meta attribute="field-description">When the track was created</meta>
</property>

<property name="volumn" type="short">
<meta attribute="field-description">How loud to play track</meta>
</property>

</class>
</hibernate-mapping>

Full stack trace of any exception that occurs:
Buildfile: build.xml

prepare:
[copy] Copying 1 file to C:\Projects\ch01\classes

compile:

schema:
[schemaexport] Dec 16, 2004 8:21:26 PM net.sf.hibernate.cfg.Environment <clinit>

[schemaexport] INFO: Hibernate 2.1.7
[schemaexport] Dec 16, 2004 8:21:26 PM net.sf.hibernate.cfg.Environment <clinit>

[schemaexport] INFO: loaded properties from resource hibernate.properties: {hibe
rnate.connection.username=sa, hibernate.cglib.use_reflection_optimizer=true, hib
ernate.dialect=net.sf.hibernate.dialect.HSQLDialect, hibernate.connection.url=jd
bc:hsqldb:data/music, hibernate.connection.driver_class=org.hsqldb.jdbcDriver, h
ibernate.connection.passwd=}
[schemaexport] Dec 16, 2004 8:21:26 PM net.sf.hibernate.cfg.Environment <clinit>

[schemaexport] INFO: using CGLIB reflection optimizer
[schemaexport] Dec 16, 2004 8:21:26 PM net.sf.hibernate.cfg.Environment <clinit>

[schemaexport] INFO: using JDK 1.4 java.sql.Timestamp handling
[schemaexport] Dec 16, 2004 8:21:26 PM net.sf.hibernate.cfg.Configuration addFil
e
[schemaexport] INFO: Mapping file: C:\Projects\ch01\classes\com\macinc\hh\Track.
hbm.xml
[schemaexport] Dec 16, 2004 8:21:27 PM net.sf.hibernate.cfg.Binder bindRootClass

[schemaexport] INFO: Mapping class: com.macinc.hh.Track -> TRACK
[schemaexport] Dec 16, 2004 8:21:27 PM net.sf.hibernate.dialect.Dialect <init>
[schemaexport] INFO: Using dialect: net.sf.hibernate.dialect.HSQLDialect
[schemaexport] Dec 16, 2004 8:21:27 PM net.sf.hibernate.cfg.Configuration second
PassCompile
[schemaexport] INFO: processing one-to-many association mappings
[schemaexport] Dec 16, 2004 8:21:27 PM net.sf.hibernate.cfg.Configuration second
PassCompile
[schemaexport] INFO: processing one-to-one association property references
[schemaexport] Dec 16, 2004 8:21:27 PM net.sf.hibernate.cfg.Configuration second
PassCompile
[schemaexport] INFO: processing foreign key constraints
[schemaexport] Dec 16, 2004 8:21:28 PM net.sf.hibernate.cfg.Configuration second
PassCompile
[schemaexport] INFO: processing one-to-many association mappings
[schemaexport] Dec 16, 2004 8:21:28 PM net.sf.hibernate.cfg.Configuration second
PassCompile
[schemaexport] INFO: processing one-to-one association property references
[schemaexport] Dec 16, 2004 8:21:28 PM net.sf.hibernate.cfg.Configuration second
PassCompile
[schemaexport] INFO: processing foreign key constraints
[schemaexport] Dec 16, 2004 8:21:28 PM net.sf.hibernate.tool.hbm2ddl.SchemaExpor
t execute
[schemaexport] INFO: Running hbm2ddl schema export
[schemaexport] Dec 16, 2004 8:21:28 PM net.sf.hibernate.tool.hbm2ddl.SchemaExpor
t execute
[schemaexport] INFO: exporting generated schema to database
[schemaexport] Dec 16, 2004 8:21:28 PM net.sf.hibernate.connection.DriverManager
ConnectionProvider configure
[schemaexport] INFO: Using Hibernate built-in connection pool (not for productio
n use!)
[schemaexport] Dec 16, 2004 8:21:28 PM net.sf.hibernate.connection.DriverManager
ConnectionProvider configure
[schemaexport] INFO: Hibernate connection pool size: 20
[schemaexport] Dec 16, 2004 8:21:28 PM net.sf.hibernate.connection.DriverManager
ConnectionProvider configure
[schemaexport] INFO: using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:dat
a/music
[schemaexport] Dec 16, 2004 8:21:28 PM net.sf.hibernate.connection.DriverManager
ConnectionProvider configure
[schemaexport] INFO: connection properties: {user=sa, passwd=}
[schemaexport] drop table TRACK if exists;
[schemaexport] create table TRACK (
[schemaexport] TRACK_ID bigint generated by default as identity (start with 1
),

[schemaexport] title varchar(255) not null,
[schemaexport] filepath varchar(255) not null,
[schemaexport] playtime time,
[schemaexport] added date,
[schemaexport] volumn smallint
[schemaexport] );
[schemaexport] Dec 16, 2004 8:21:28 PM net.sf.hibernate.tool.hbm2ddl.SchemaExpor
t execute
[schemaexport] SEVERE: Unsuccessful: create table TRACK (TRACK_ID bigint generat
ed by default as identity (start with 1), title varchar(255) not null, filepath
varchar(255) not null, playtime time, added date, volumn smallint)
[schemaexport] Dec 16, 2004 8:21:28 PM net.sf.hibernate.tool.hbm2ddl.SchemaExpor
t execute
[schemaexport] SEVERE: Unexpected token: GENERATED in statement [create table TR
ACK (TRACK_ID bigint generated by default as identity (start with 1), title varc
har(255) not null, filepath varchar(255) not null, playtime time, added date, vo
lumn smallint)]
[schemaexport] Dec 16, 2004 8:21:28 PM net.sf.hibernate.tool.hbm2ddl.SchemaExpor
t execute
[schemaexport] INFO: schema export complete
[schemaexport] Dec 16, 2004 8:21:28 PM net.sf.hibernate.connection.DriverManager
ConnectionProvider close
[schemaexport] INFO: cleaning up connection pool: jdbc:hsqldb:data/music

BUILD SUCCESSFUL
Total time: 4 seconds
C:\Projects\ch01>

Name and version of the database you are using:
HSQLDB 1.7.1


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

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.