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

1

12

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

Corium answered 9/2, 2011 at 18:37 Comment(0)
S
23

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.

Savage answered 9/2, 2011 at 18:58 Comment(2)
It could be the same problem when you use grails hsqldb and access the data base with squirrelsql? I have the same exception in grailsLauritz
Yes, you can replace the jar in Grails with a 2.2.x jar.Savage

© 2022 - 2024 — McMap. All rights reserved.