Search code examples
hsqldb

HSQLDB - invalid authorization specification


I need help with an issue during the database connection via JPA/Hibernate on hsqldb-2.2.8:

[AWT-EventQueue-0] ERROR org.hibernate.util.JDBCExceptionReporter - invalid authorization specification - not found: manasouza

I created some user (manasouza) with some password as:

CREATE USER manasouza PASSWORD 123 ADMIN

I'm using SQLWorkbench as my database visualizer, and with it I can log on normally. Using JPA/Hibernate I already tried the username on uppercase and the password as '123' or as the value cryptographed showed on the PASSWORD_DIGEST column at SYSTEM_USERS database table, but had no success at all.


Solution

  • When you use CREATE USER manasouza PASSWORD 123 ADMIN, HSQLDB 2.2.8 throws an exception. Therefore you must have used a different password.

    The user name is converted to all uppercase because it is not double quoted. For the password, you should use single quotes around the string. If you define the password without the single quotes, it must start with a letter and is converted to all uppercase. Therefore if you want the exact case, use CREATE USER "manasouza" PASSWORD '123' ADMIN