compomics / reporter

Protein quantification based on reporter ions
http://compomics.github.io/projects/reporter.html
4 stars 2 forks source link

SQL error message when saving psdb #16

Open jcanderan opened 3 years ago

jcanderan commented 3 years ago

When saving a Reporter psdb, the following error message in the log is obtained:

Windows GUI:

org.sqlite.SQLiteException: [SQLITE_CONSTRAINT_PRIMARYKEY]  A PRIMARY KEY constraint failed (UNIQUE constraint failed: data.id)
    at org.sqlite.core.DB.newSQLException(DB.java:909)
    at org.sqlite.core.DB.newSQLException(DB.java:921)
    at org.sqlite.core.DB.throwex(DB.java:886)
    at org.sqlite.core.DB.executeBatch(DB.java:774)
    at org.sqlite.core.CorePreparedStatement.executeBatch(CorePreparedStatement.java:79)
    at com.compomics.util.db.object.ObjectsCache.saveObjects(ObjectsCache.java:350)
    at com.compomics.util.db.object.ObjectsCache.saveCache(ObjectsCache.java:411)
    at com.compomics.util.db.object.ObjectsDB.lock(ObjectsDB.java:784)
    at eu.isas.peptideshaker.export.PsdbExporter.saveAs(PsdbExporter.java:130)
    at eu.isas.peptideshaker.utils.PsdbParent.saveProject(PsdbParent.java:371)
    at eu.isas.reporter.io.ProjectSaver.saveProject(ProjectSaver.java:76)
    at eu.isas.reporter.gui.ReporterGUI$19.run(ReporterGUI.java:1106)

linux command-line (different psdb file than above):

org.sqlite.SQLiteException: [SQLITE_CONSTRAINT_PRIMARYKEY]  A PRIMARY KEY constraint failed (UNIQUE constraint failed: data.id)
        at org.sqlite.core.DB.newSQLException(DB.java:909)
        at org.sqlite.core.DB.newSQLException(DB.java:921)
        at org.sqlite.core.DB.throwex(DB.java:886)
        at org.sqlite.core.DB.executeBatch(DB.java:774)
        at org.sqlite.core.CorePreparedStatement.executeBatch(CorePreparedStatement.java:79)
        at com.compomics.util.db.object.ObjectsCache.saveObjects(ObjectsCache.java:350)
        at com.compomics.util.db.object.ObjectsCache.saveCache(ObjectsCache.java:411)
        at com.compomics.util.db.object.ObjectsDB.lock(ObjectsDB.java:784)
        at eu.isas.peptideshaker.export.PsdbExporter.saveAs(PsdbExporter.java:130)
        at eu.isas.peptideshaker.utils.PsdbParent.saveProject(PsdbParent.java:371)
        at eu.isas.reporter.io.ProjectSaver.saveProject(ProjectSaver.java:76)
        at eu.isas.reporter.cli.ReporterCLI.call(ReporterCLI.java:557)
        at eu.isas.reporter.cli.ReporterCLI.main(ReporterCLI.java:845)

I don't know what this affects exactly as the output file is generated but I wanted to mention it.

hbarsnes commented 3 years ago

I can confirm that I see the same thing. I will look into it.

Note that saving Reporter projects does not matter all that much at the moment though, as we do not yet support reopening saved projects in Reporter...