Uploaded image for project: 'Apache Lens (Retired)'
  1. Apache Lens (Retired)
  2. LENS-244

HSQL Database lock acquisition failure when populating examples second time in separate db.

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.2
    • examples
    • None

    Description

      When we populate examples in more than db, seeing the following :

      java.sql.SQLException: Database lock acquisition failure: lockFile: org.hsqldb.persist.LockFile@ac3a4182[file =/private/tmp/db-storage.db.lck, exists=true, locked=false, valid=false, ] method: checkHeartbeat read: 2015-01-29 01:17:15 heartbeat - read: -7434 ms.
      	at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
      	at org.hsqldb.jdbc.Util.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:579)
      	at java.sql.DriverManager.getConnection(DriverManager.java:221)
      	at org.apache.lens.examples.DatabaseUtil.initalizeDatabaseStorage(DatabaseUtil.java:46)
      	at org.apache.lens.examples.PopulateSampleMetastore.populateDimTables(PopulateSampleMetastore.java:108)
      	at org.apache.lens.examples.PopulateSampleMetastore.populateAll(PopulateSampleMetastore.java:64)
      	at org.apache.lens.examples.PopulateSampleMetastore.main(PopulateSampleMetastore.java:54)
      Caused by: org.hsqldb.HsqlException: Database lock acquisition failure: lockFile: org.hsqldb.persist.LockFile@ac3a4182[file =/private/tmp/db-storage.db.lck, exists=true, locked=false, valid=false, ] method: checkHeartbeat read: 2015-01-29 01:17:15 heartbeat - read: -7434 ms.
      	at org.hsqldb.error.Error.error(Unknown Source)
      	at org.hsqldb.error.Error.error(Unknown Source)
      	at org.hsqldb.persist.LockFile.newLockFileLock(Unknown Source)
      	at org.hsqldb.persist.Logger.acquireLock(Unknown Source)
      	at org.hsqldb.persist.Logger.openPersistence(Unknown Source)
      	at org.hsqldb.Database.reopen(Unknown Source)
      	at org.hsqldb.Database.open(Unknown Source)
      	at org.hsqldb.DatabaseManager.getDatabase(Unknown Source)
      	at org.hsqldb.DatabaseManager.newSession(Unknown Source)
      	... 9 more
      

      Restarting the server solves the lock issue.

      Attachments

        1. LENS-244.patch
          1 kB
          Amareshwari Sriramadasu

        Activity

          People

            amareshwari Amareshwari Sriramadasu
            amareshwari Amareshwari Sriramadasu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: