Greeting!
I am experiencing an issue with the MEGAN Community Edition (version 6.25.3, built 15 Sep 2023) when trying to run the daa-meganizer
tool. I am working with long reads, and every time I run the tool with my .daa
files and the SQLite database (megan-map-Feb2022.db
), I encounter a database locking error. Here’s the command I used:
~/megan/tools/daa-meganizer -i ./myseq0.fa.faa.daa -mdb ./megan-map-Feb2022.db --longReads
And this is the error message I receive:
Version MEGAN Community Edition (version 6.25.3, built 15 Sep 2023)
Author(s) Daniel H. Huson
Copyright (C) 2023 Daniel H. Huson. This program comes with ABSOLUTELY NO WARRANTY.
Java version: 20.0.2; max memory: 293G
Loading ncbi.map: 2,396,736
Loading ncbi.tre: 2,396,740
Caught:
java.io.IOException: org.sqlite.SQLiteException: [SQLITE_BUSY] The database file is locked (database is locked)
at megan/megan.classification.IdMapper.loadMappingFile(IdMapper.java:144)
at megan/megan.tools.DAAMeganizer.run(DAAMeganizer.java:220)
at megan/megan.tools.DAAMeganizer.main(DAAMeganizer.java:58)
Caused by: org.sqlite.SQLiteException: [SQLITE_BUSY] The database file is locked (database is locked)
at org.xerial.sqlitejdbc@3.42.0.0/org.sqlite.core.DB.newSQLException(DB.java:1179)
at org.xerial.sqlitejdbc@3.42.0.0/org.sqlite.core.DB.newSQLException(DB.java:1190)
at org.xerial.sqlitejdbc@3.42.0.0/org.sqlite.core.DB.throwex(DB.java:1150)
at org.xerial.sqlitejdbc@3.42.0.0/org.sqlite.core.NativeDB.prepare_utf8(Native Method)
at org.xerial.sqlitejdbc@3.42.0.0/org.sqlite.core.NativeDB.prepare(NativeDB.java:126)
at org.xerial.sqlitejdbc@3.42.0.0/org.sqlite.core.DB.prepare(DB.java:264)
at org.xerial.sqlitejdbc@3.42.0.0/org.sqlite.jdbc3.JDBC3Statement.lambda$execute$0(JDBC3Statement.java:51)
at org.xerial.sqlitejdbc@3.42.0.0/org.sqlite.jdbc3.JDBC3Statement.withConnectionTimeout(JDBC3Statement.java:454)
at org.xerial.sqlitejdbc@3.42.0.0/org.sqlite.jdbc3.JDBC3Statement.execute(JDBC3Statement.java:40)
at org.xerial.sqlitejdbc@3.42.0.0/org.sqlite.SQLiteConfig.apply(SQLiteConfig.java:219)
at org.xerial.sqlitejdbc@3.42.0.0/org.sqlite.SQLiteConnection.<init>(SQLiteConnection.java:70)
at org.xerial.sqlitejdbc@3.42.0.0/org.sqlite.jdbc3.JDBC3Connection.<init>(JDBC3Connection.java:28)
at org.xerial.sqlitejdbc@3.42.0.0/org.sqlite.jdbc4.JDBC4Connection.<init>(JDBC4Connection.java:19)
at org.xerial.sqlitejdbc@3.42.0.0/org.sqlite.JDBC.createConnection(JDBC.java:104)
at org.xerial.sqlitejdbc@3.42.0.0/org.sqlite.SQLiteConfig.createConnection(SQLiteConfig.java:109)
at megan/megan.accessiondb.AccessAccessionMappingDatabase.<init>(AccessAccessionMappingDatabase.java:62)
at megan/megan.accessiondb.AccessAccessionAdapter.<init>(AccessAccessionAdapter.java:44)
at megan/megan.classification.IdMapper.loadMappingFile(IdMapper.java:139)
... 2 more
I have attempted several solutions, including changing file permissions and disabling WAL mode in SQLite, but the issue persists. The error suggests that the SQLite database file is locked, but I am unsure how to resolve this.
Is this a known issue with MEGAN’s interaction with SQLite databases, particularly in the context of long read analysis? Are there any recommended steps I can take to resolve this database locking issue?
Any guidance or suggestions would be greatly appreciated
Thank you!