This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Hibernate with HSQLdb - SQLException requires collation in statement

Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am new to Hibernate. And i am at my wits end as none of the programs are working out. Could anyone please help me out with these errors.

Its a simple program from Harnessing Hibernate chapter 2. It deals with creating java files from the hbm.xml file using hbm2java and generating schema from hbm.xml file

I am using ant tasks for Maven and hibernate tools.



So according to the build file i first run

D:\JavaProjects\MyProjects\HarnessingHibernate\ch02>ant prepare

Now Under D:\JavaProjects\MyProjects\HarnessingHibernate\ch02 I have

a classes folder

Then i run D:\JavaProjects\MyProjects\HarnessingHibernate\ch02>ant codegen

My src folder now has

Then i run D:\JavaProjects\MyProjects\HarnessingHibernate\ch02>ant schema

under D:\JavaProjects\MyProjects\HarnessingHibernate\ch02 data folder is created which contains music.script music.lck and files.

All the above mentioned targets run fine without any prob

But whe i run D:\JavaProjects\MyProjects\HarnessingHibernate\ch02>ant schema

I get the follwing error.

What does

[java] java.sql.SQLException: error in script file line: 1 Unexpected token
NAME, requires COLLATION in statement [SET DATABASE NAME]


Could anyone please help me in solving this problem as this example lays a strong foundation for my future examples and under standing Hibenate.

Thanks in advance for your time and patience.

With Regard

    Bookmark Topic Watch Topic
  • New Topic