Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

invalid authorization specification

Help
MichaeL
2013-10-15
2014-01-19
  • MichaeL
    MichaeL
    2013-10-15

    Hi,

    I test hsqldb 2.3.1 on windows and linux in an application. _Sometimes_, I get an exception, when I open a database with 2.3.1, which was created by an older hsqldb version:

    java.sql.SQLInvalidAuthorizationSpecException: invalid authorization specification - not found: SA
            at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
            at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
            at org.hsqldb.jdbc.JDBCConnection.<init>(Unknown Source)
            at org.hsqldb.jdbc.JDBCDriver.getConnection(Unknown Source)
            at org.hsqldb.jdbc.JDBCDriver.connect(Unknown Source)
            at java.sql.DriverManager.getConnection(Unknown Source)
            at java.sql.DriverManager.getConnection(Unknown Source)
            at tools.sql.DataBase.getConnection(DataBase.java:173)
    ...
    

    The code from line 173 is:

    private Connection getConnection() throws ClassNotFoundException, SQLException {
        Class.forName( this.getDBDriver() );
        Connection con = DriverManager.getConnection(
                this.getURI(),
                this.username,
                this.password
        );
        return con;
    }
    public String getURI() {
        return "jdbc:hsqldb:file:" + this.dbFile + ";shutdown=true";
    }
    

    I got this error on linux and windows 3 or 4 times, but I can not reproduce it. Both systems are using java 1.7 (64bit). If it is helpful, I can provide a crashed database. (Maybe, the db was first open on linux and then on window, or twice versa.)

    Any ideas?

    regards
    Micha

     
  • Fred Toussi
    Fred Toussi
    2013-10-15

    Which version of HSQLDB was used to create the database?

    You can send the database files to : fredt (at) users.sourceforge.net

     
  • MichaeL
    MichaeL
    2013-10-16

    Hi fredt,

    > Which version of HSQLDB was used to create the database?
    The new 2.3.1 was used. If the data exchange between linux and windows is the reason, the problem _can_ also with 2.3.0 - I don't test it.

    I've sent a mail to you with the crashed db. I can't re-open the db.

    kind regards
    Micha

     
  • MichaeL
    MichaeL
    2013-10-18

    Hi,

    for the archive: it seems to be a problem with one of my test database. Up to now, I couldn't reproduce the error with another one. Thank you, Fred, for your fast help!

    all the best
    Micha