Menu

MemoryTimer#activeConnection is not set to 0, so the cache does not disappear in memory.

Help
2021-09-01
2021-09-03
  • takumi inoue

    takumi inoue - 2021-09-01

    Hello.
    I'm using an internet translation, so sorry if it's hard to understand.

    When I perform the following operations, the HSQLDB in memory is not deleted and remains.

    1. Set memory=true and password=password to the connection URL, and use UcanAccessDriver#connect to connect to the accdb file with no password set. The connection succeeds.
    2. With the HSQLDB in memory, connect to the accdb file connected in step 1 again with the password unset. The connection will fail and the following Exception will be thrown.
    3. The activeConnection that was incremented in step 2 continues to remain, so the DbReference#shutdown set in the Timer is not called.

    stack trace

    net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::5.0.1 invalid authorization specification: ""
        at net.ucanaccess.jdbc.UcanaccessConnection.<init>(UcanaccessConnection.java:113)
        at net.ucanaccess.jdbc.UcanaccessDriver.connect(UcanaccessDriver.java:226)
        ... 34 more
    Caused by: java.sql.SQLInvalidAuthorizationSpecException: invalid authorization specification: ""
        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(DriverManager.java:664)
        at java.sql.DriverManager.getConnection(DriverManager.java:247)
        at net.ucanaccess.jdbc.DBReference.getHSQLDBConnection(DBReference.java:447)
        at net.ucanaccess.jdbc.UcanaccessConnection.<init>(UcanaccessConnection.java:110)
        ... 35 more
    Caused by: org.hsqldb.HsqlException: invalid authorization specification: ""
        at org.hsqldb.error.Error.error(Unknown Source)
        at org.hsqldb.error.Error.error(Unknown Source)
        at org.hsqldb.rights.User.checkPassword(Unknown Source)
        at org.hsqldb.rights.UserManager.getUser(Unknown Source)
        at org.hsqldb.Database.connect(Unknown Source)
        at org.hsqldb.DatabaseManager.newSession(Unknown Source)
        ... 42 more
    

    I believe there are two problems.

    The first is that UCanAccess is behaving in such a way that if I connect to an accdb file that does not have a password set by including the password in the connection URL, the password will be set in the HSQLDB.

    The second is that DbReference#shutdown set to Timer is not called if an Exception occurs after the activeConnection is incremented in the UcanaccessConnection constructor.

    Are there any countermeasures or fixes planned for these?

    The version I'm using
    ucanaccess-5.0.1
    jackcess-3.0.1
    jackcess-encrypt-3.0.0
    hsqldb-2.5.0

     

    Last edit: takumi inoue 2021-09-01
  • Marco Amadei

    Marco Amadei - 2021-09-03

    No, they were unknown errors, but I'll verify the bugs ASAP and let you know here when the fixes will be released.

     

    Last edit: Marco Amadei 2021-09-03
  • HONMA Hirotaka

    HONMA Hirotaka - 2021-09-03
    Post awaiting moderation.

Log in to post a comment.