Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ksos01 opened this issue Dec 11, 2020 · 3 comments · Fixed by #7178
Closed
Labels
bug Confirmed bugs or reports that are very likely to be bugs shared-database status: waiting-for-feedback The submitter or other users need to provide more information about the issue

Comments

@ksos01
Copy link

ksos01 commented Dec 11, 2020

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.

@Siedlerchr
Copy link
Member

Thanks for the issue report. I will look into this later.

@Siedlerchr Siedlerchr added the bug Confirmed bugs or reports that are very likely to be bugs label Dec 11, 2020
@Siedlerchr
Copy link
Member

@ksos01 Thanks for the report. I could reproduce it and fix it.
Can you please test this version?
https://builds.jabref.org/pull/7178/merge/

@Siedlerchr Siedlerchr added the status: waiting-for-feedback The submitter or other users need to provide more information about the issue label Dec 11, 2020
@ksos01
Copy link
Author

ksos01 commented Dec 14, 2020

@Siedlerchr Hi, I tested the linked build against PostgreSQL 12 and 13. Adding new entries now works from importing as well as the "plus" button. I tested it for multiple entry types as well after disconnecting and reconnecting to the database.

Thank you very much for your efforts! I will further test it the coming weeks, if I find something strange I will let you know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs shared-database status: waiting-for-feedback The submitter or other users need to provide more information about the issue
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants