File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Hibernate with HSQLdb - SQLException requires collation in statement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate with HSQLdb - SQLException requires collation in statement " Watch "Hibernate with HSQLdb - SQLException requires collation in statement " New topic
Author

Hibernate with HSQLdb - SQLException requires collation in statement

Padma Priya
Ranch Hand

Joined: Feb 01, 2007
Posts: 113
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.


build.xml



hibernate.properties



log4j.properties



pom.xml


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 track.java.


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 music.properties 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]
mean


main.script



music.properties





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
Deepthi






 
jQuery in Action, 2nd edition
 
subject: Hibernate with HSQLdb - SQLException requires collation in statement
 
Similar Threads
hibernate.properties not being found? Harnessing Hibernate Chapter 2
Trouble understanding Ant('s classpath)
Maven Ant Tasks
Importing an ANT build that uses Maven ANT Tasks into Eclipse?
Classpath problems(?)