Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unexpected token UNIQUE, requires COLLATION in statement [SET DATABASE UNIQUE])

Whenever I connect to HSQLDB from my application deployed on JBoss 5.1, it throws exception as : Caused by: org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: error in script file line: 1 Unexpected token UNIQUE, requires COLLATION in statement [SET DATABASE UNIQUE]) .

My HSQLDB script file reads something as below : `SET DATABASE UNIQUE NAME HSQLDB2E0BAD63B3

SET DATABASE GC 0

SET DATABASE DEFAULT RESULT MEMORY ROWS 0

SET DATABASE EVENT LOG LEVEL 0

.....`

Does anyone have idea what thos exception means or should I change something in my HSQLDB configuration?

Regards, Satya

like image 266
Satya Avatar asked Feb 09 '11 18:02

Satya


1 Answers

Your database files are created with version 2.x, but the version of database engine running on JBoss 5.1 is 1.8.x. You should be able to replace the hsqldb.jar in the JBoss configuration with a new version.

like image 144
fredt Avatar answered Oct 10 '22 20:10

fredt