Skip to content

Shared Databases: creating new entries does not work, importing existing libraries does #7176

@ksos01

Description

@ksos01

Disclaimer: I hope I do not missed important information within the tutorials...

Setup:

  • OS: Windows10 64-Bit
  • JabRef version tested: 5.1 and 5.2 (09.12.2020) against PostgreSQL
  • PostgreSQL: 12 and 13
  • Java 1.8.0_261-b12

Steps done:

  • starting the postgreSQL service -> creating database ->creating user for database (all done by pgadmin4, localhost)
  • starting JabRef -> open shared database -> save to local backup -> changing standard file directory -> start creating entries with"plus"-button (articles)

Expected behaviour:
Two new entries are created and I filled in the minimal needed information for articles. Both are shown correctly within JabRefs UI. I saved the entries and closed JabRef. There were no error messages shown. Expected behaviour: after reopneing the shared database my entries are loaded and presented and the backup-file is written accordingly.

What happened:
After restarting JabRef automatically connected to the PostgreSQL server. However: there are no entries inside the shared database as well as the backup-file.

What I tried:
I tried importing a locally stored database into the shared one. This worked as expected. After closing and opening the shared-database all imported entries are shown and can be edited. However still no new single entries can be created or edited.

I checked the PostgreSQL databases content and had the following findings:
At the first connection between JabRef and PostgreSQL three tables are created

  • public.ENTRY (shared_id | type | version)
  • public.FIELD (entry_shared_id | name | value
  • public.METADATA (key value)

METADATA is written and restored correctly (database type and fileDirectory).
ENTRY is written correctly, if the "plus"-button is used shared_id is increased by one, type is updated and version is set to one. Works with import feature to.
FIELD is written correctly if the import to database feature is used: entry_shared_id equals ENTRY.shared_id and the entries are created. However, if "create new entry" is used nothing is written to FIELD, but only to ENTRY. The import feature respects the shared_ids and numerates according to ENTRY.

In consequence this leads to empty databases and backup-files if the import local database feature is not used.

Maybe this is connected to #7159 or the Java version? It is still unclear to me, why it works using the import feature but does not when creating single entries.

I am unsure where to get the logfile if no error is given.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions