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

Exception occurred after connecting to shared database suggesting a duplicate entry #10336

Closed
2 tasks done
ArnaudAcoucite opened this issue Sep 6, 2023 · 11 comments · Fixed by #10494
Closed
2 tasks done

Comments

@ArnaudAcoucite
Copy link

JabRef version

5.10 (latest release)

Operating system

Windows

Details on version and operating system

Windows 11 pro 64bit Version 22H2 Built 22621.2134

Checked with the latest development build (copy version output from About dialog)

  • I made a backup of my libraries before testing the latest development version.
  • I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

  1. Open JabRef
  2. Connect to shared database
  3. Fill required information
  4. Click on Connect
  5. An exception is thrown

Capture d'écran 2023-09-06 140708

Appendix

Following the error message, we checked the tables JABREF_ENTRY and ENTRY on DBeaver but didn't find a duplicate entry.

Log File
2023-09-06 14:02:43 [JavaFX Application Thread] org.jabref.gui.StateManager.setActiveDatabase()
INFO: No open database detected
2023-09-06 14:02:43 [JavaFX Application Thread] org.jabref.gui.theme.ThemeManager.updateThemeSettings()
INFO: Not updating theme because it hasn't changed
2023-09-06 14:02:43 [JavaFX Application Thread] org.jabref.gui.theme.ThemeManager.updateThemeSettings()
INFO: Theme set to Theme{type=DEFAULT, name=''} with base css StyleSheet{jrt:/org.jabref/org/jabref/gui/Base.css}
2023-09-06 14:04:12 [JavaFX Application Thread] org.jabref.logic.shared.DBMSSynchronizer.initializeDatabases()
INFO: Integrity check failed. Fixing...
2023-09-06 14:04:12 [JavaFX Application Thread] org.jabref.logic.shared.MySQLProcessor.setUp()
WARN: [VERSION_DB_STRUCT_DEFAULT] not Integer!
2023-09-06 14:04:12 [JavaFX Application Thread] org.jabref.logic.shared.MySQLProcessor.setUp()
INFO: Migrating from VersionDBStructure == 0
2023-09-06 14:04:12 [JavaFX Application Thread] org.jabref.logic.shared.DBMSSynchronizer.initializeDatabases()
ERROR: Could not check intergrity: java.sql.SQLIntegrityConstraintViolationException: (conn=4421) Duplicate entry '2' for key 'PRIMARY'
	at [email protected]/org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.createException(Unknown Source)
	at [email protected]/org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.create(Unknown Source)
	at [email protected]/org.mariadb.jdbc.MariaDbStatement.executeExceptionEpilogue(Unknown Source)
	at [email protected]/org.mariadb.jdbc.MariaDbStatement.executeInternal(Unknown Source)
	at [email protected]/org.mariadb.jdbc.MariaDbStatement.executeUpdate(Unknown Source)
	at [email protected]/org.jabref.logic.shared.MySQLProcessor.setUp(Unknown Source)
	at [email protected]/org.jabref.logic.shared.DBMSProcessor.setupSharedDatabase(Unknown Source)
	at [email protected]/org.jabref.logic.shared.DBMSSynchronizer.initializeDatabases(Unknown Source)
	at [email protected]/org.jabref.logic.shared.DBMSSynchronizer.openSharedDatabase(Unknown Source)
	at [email protected]/org.jabref.gui.shared.SharedDatabaseUIManager.openNewSharedDatabaseTab(Unknown Source)
	at [email protected]/org.jabref.gui.shared.SharedDatabaseLoginDialogViewModel.openSharedDatabase(Unknown Source)
	at [email protected]/org.jabref.gui.shared.SharedDatabaseLoginDialogViewModel.openDatabase(Unknown Source)
	at [email protected]/org.jabref.gui.shared.SharedDatabaseLoginDialogView.openDatabase(Unknown Source)
	at [email protected]/org.jabref.gui.shared.SharedDatabaseLoginDialogView.lambda$new$0(Unknown Source)
	at [email protected]/org.jabref.gui.util.ControlHelper.lambda$setAction$0(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventHandler$NormalEventFilterRecord.handleCapturingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventHandler.dispatchCapturingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchCapturingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchCapturingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventDispatcher.dispatchCapturingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
	at [email protected]/javafx.event.Event.fireEvent(Unknown Source)
	at [email protected]/javafx.scene.Node.fireEvent(Unknown Source)
	at [email protected]/javafx.scene.control.Button.fire(Unknown Source)
	at [email protected]/com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(Unknown Source)
	at [email protected]/com.sun.javafx.scene.control.inputmap.InputMap.handle(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
	at [email protected]/javafx.event.Event.fireEvent(Unknown Source)
	at [email protected]/javafx.scene.Scene$MouseHandler.process(Unknown Source)
	at [email protected]/javafx.scene.Scene.processMouseEvent(Unknown Source)
	at [email protected]/javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source)
	at [email protected]/com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
	at [email protected]/com.sun.glass.ui.View.notifyMouse(Unknown Source)
	at [email protected]/com.sun.glass.ui.win.WinApplication._enterNestedEventLoopImpl(Native Method)
	at [email protected]/com.sun.glass.ui.win.WinApplication._enterNestedEventLoop(Unknown Source)
	at [email protected]/com.sun.glass.ui.Application.enterNestedEventLoop(Unknown Source)
	at [email protected]/com.sun.glass.ui.EventLoop.enter(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.QuantumToolkit.enterNestedEventLoop(Unknown Source)
	at [email protected]/javafx.stage.Stage.showAndWait(Unknown Source)
	at [email protected]/javafx.scene.control.HeavyweightDialog.showAndWait(Unknown Source)
	at [email protected]/javafx.scene.control.Dialog.showAndWait(Unknown Source)
	at [email protected]/org.jabref.gui.JabRefDialogService.showCustomDialogAndWait(Unknown Source)
	at [email protected]/org.jabref.gui.shared.ConnectToSharedDatabaseCommand.execute(Unknown Source)
	at [email protected]/org.jabref.gui.actions.JabRefAction.lambda$new$3(Unknown Source)
	at [email protected]/org.controlsfx.control.action.Action.handle(Unknown Source)
	at [email protected]/org.controlsfx.control.action.Action.handle(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
	at [email protected]/javafx.event.Event.fireEvent(Unknown Source)
	at [email protected]/javafx.scene.control.MenuItem.fire(Unknown Source)
	at [email protected]/com.sun.javafx.scene.control.ContextMenuContent$MenuItemContainer.doSelect(Unknown Source)
	at [email protected]/com.sun.javafx.scene.control.ContextMenuContent$MenuItemContainer.lambda$createChildren$12(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
	at [email protected]/javafx.event.Event.fireEvent(Unknown Source)
	at [email protected]/javafx.scene.Scene$MouseHandler.process(Unknown Source)
	at [email protected]/javafx.scene.Scene.processMouseEvent(Unknown Source)
	at [email protected]/javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source)
	at [email protected]/com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
	at [email protected]/com.sun.glass.ui.View.notifyMouse(Unknown Source)
	at [email protected]/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at [email protected]/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.mariadb.jdbc.internal.util.exceptions.MariaDbSqlException: Duplicate entry '2' for key 'PRIMARY'
	at [email protected]/org.mariadb.jdbc.internal.util.exceptions.MariaDbSqlException.of(Unknown Source)
	at [email protected]/org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.exceptionWithQuery(Unknown Source)
	at [email protected]/org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(Unknown Source)
	... 113 more
Caused by: java.sql.SQLException: Duplicate entry '2' for key 'PRIMARY'
	at [email protected]/org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readErrorPacket(Unknown Source)
	at [email protected]/org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readPacket(Unknown Source)
	at [email protected]/org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.getResult(Unknown Source)
	... 114 more
2023-09-06 14:04:12 [JavaFX Application Thread] org.jabref.gui.FallbackExceptionHandler.uncaughtException()
ERROR: Uncaught exception occurred in Thread[#35,JavaFX Application Thread,5,main]: java.lang.IllegalStateException: java.sql.SQLIntegrityConstraintViolationException: (conn=4421) Duplicate entry '2' for key 'PRIMARY'
	at [email protected]/org.jabref.logic.shared.DBMSSynchronizer.initializeDatabases(Unknown Source)
	at [email protected]/org.jabref.logic.shared.DBMSSynchronizer.openSharedDatabase(Unknown Source)
	at [email protected]/org.jabref.gui.shared.SharedDatabaseUIManager.openNewSharedDatabaseTab(Unknown Source)
	at [email protected]/org.jabref.gui.shared.SharedDatabaseLoginDialogViewModel.openSharedDatabase(Unknown Source)
	at [email protected]/org.jabref.gui.shared.SharedDatabaseLoginDialogViewModel.openDatabase(Unknown Source)
	at [email protected]/org.jabref.gui.shared.SharedDatabaseLoginDialogView.openDatabase(Unknown Source)
	at [email protected]/org.jabref.gui.shared.SharedDatabaseLoginDialogView.lambda$new$0(Unknown Source)
	at [email protected]/org.jabref.gui.util.ControlHelper.lambda$setAction$0(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventHandler$NormalEventFilterRecord.handleCapturingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventHandler.dispatchCapturingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchCapturingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchCapturingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventDispatcher.dispatchCapturingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
	at [email protected]/javafx.event.Event.fireEvent(Unknown Source)
	at [email protected]/javafx.scene.Node.fireEvent(Unknown Source)
	at [email protected]/javafx.scene.control.Button.fire(Unknown Source)
	at [email protected]/com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(Unknown Source)
	at [email protected]/com.sun.javafx.scene.control.inputmap.InputMap.handle(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
	at [email protected]/javafx.event.Event.fireEvent(Unknown Source)
	at [email protected]/javafx.scene.Scene$MouseHandler.process(Unknown Source)
	at [email protected]/javafx.scene.Scene.processMouseEvent(Unknown Source)
	at [email protected]/javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source)
	at [email protected]/com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
	at [email protected]/com.sun.glass.ui.View.notifyMouse(Unknown Source)
	at [email protected]/com.sun.glass.ui.win.WinApplication._enterNestedEventLoopImpl(Native Method)
	at [email protected]/com.sun.glass.ui.win.WinApplication._enterNestedEventLoop(Unknown Source)
	at [email protected]/com.sun.glass.ui.Application.enterNestedEventLoop(Unknown Source)
	at [email protected]/com.sun.glass.ui.EventLoop.enter(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.QuantumToolkit.enterNestedEventLoop(Unknown Source)
	at [email protected]/javafx.stage.Stage.showAndWait(Unknown Source)
	at [email protected]/javafx.scene.control.HeavyweightDialog.showAndWait(Unknown Source)
	at [email protected]/javafx.scene.control.Dialog.showAndWait(Unknown Source)
	at [email protected]/org.jabref.gui.JabRefDialogService.showCustomDialogAndWait(Unknown Source)
	at [email protected]/org.jabref.gui.shared.ConnectToSharedDatabaseCommand.execute(Unknown Source)
	at [email protected]/org.jabref.gui.actions.JabRefAction.lambda$new$3(Unknown Source)
	at [email protected]/org.controlsfx.control.action.Action.handle(Unknown Source)
	at [email protected]/org.controlsfx.control.action.Action.handle(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
	at [email protected]/javafx.event.Event.fireEvent(Unknown Source)
	at [email protected]/javafx.scene.control.MenuItem.fire(Unknown Source)
	at [email protected]/com.sun.javafx.scene.control.ContextMenuContent$MenuItemContainer.doSelect(Unknown Source)
	at [email protected]/com.sun.javafx.scene.control.ContextMenuContent$MenuItemContainer.lambda$createChildren$12(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
	at [email protected]/javafx.event.Event.fireEvent(Unknown Source)
	at [email protected]/javafx.scene.Scene$MouseHandler.process(Unknown Source)
	at [email protected]/javafx.scene.Scene.processMouseEvent(Unknown Source)
	at [email protected]/javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source)
	at [email protected]/com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
	at [email protected]/com.sun.glass.ui.View.notifyMouse(Unknown Source)
	at [email protected]/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at [email protected]/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLIntegrityConstraintViolationException: (conn=4421) Duplicate entry '2' for key 'PRIMARY'
	at [email protected]/org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.createException(Unknown Source)
	at [email protected]/org.mariadb.jdbc.internal.util.exceptions.ExceptionFactory.create(Unknown Source)
	at [email protected]/org.mariadb.jdbc.MariaDbStatement.executeExceptionEpilogue(Unknown Source)
	at [email protected]/org.mariadb.jdbc.MariaDbStatement.executeInternal(Unknown Source)
	at [email protected]/org.mariadb.jdbc.MariaDbStatement.executeUpdate(Unknown Source)
	at [email protected]/org.jabref.logic.shared.MySQLProcessor.setUp(Unknown Source)
	at [email protected]/org.jabref.logic.shared.DBMSProcessor.setupSharedDatabase(Unknown Source)
	... 109 more
Caused by: org.mariadb.jdbc.internal.util.exceptions.MariaDbSqlException: Duplicate entry '2' for key 'PRIMARY'
	at [email protected]/org.mariadb.jdbc.internal.util.exceptions.MariaDbSqlException.of(Unknown Source)
	at [email protected]/org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.exceptionWithQuery(Unknown Source)
	at [email protected]/org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(Unknown Source)
	... 113 more
Caused by: java.sql.SQLException: Duplicate entry '2' for key 'PRIMARY'
	at [email protected]/org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readErrorPacket(Unknown Source)
	at [email protected]/org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.readPacket(Unknown Source)
	at [email protected]/org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.getResult(Unknown Source)
	... 114 more
@Siedlerchr
Copy link
Member

Hi, sorry for the late response. which version of mysql or mariadb are you using?

@ArnaudAcoucite
Copy link
Author

Hi, thank you for the answer. We are using this version : 10.3.37-MariaDB - Source distribution

@drescherflo
Copy link

drescherflo commented Oct 5, 2023

I'm having the same issue, but with PostgreSQL versions 15.4 and 16.
The shared database works until one adds groups and then reconnects.
There is no difference between leaving a group empty or assigning some bib entries.
However, adding a group will work as long as there are no bib entries in the database.

Siedlerchr added a commit that referenced this issue Oct 14, 2023
@Siedlerchr
Copy link
Member

I could reproduce it now locally and found the issue. There was an issue with parsing back the version of the metadata

@Siedlerchr
Copy link
Member

@ArnaudAcoucite @drescherflo Can you please test this verison? https://builds.jabref.org/pull/10494/merge

@ArnaudAcoucite
Copy link
Author

Thanks Christoph! I tested this version, now I get this error message:

java.lang.NumberFormatException: For input string: "1;"
	at java.base/java.lang.NumberFormatException.forInputString(Unknown Source)
	at java.base/java.lang.Integer.parseInt(Unknown Source)
	at java.base/java.lang.Integer.parseInt(Unknown Source)
	at [email protected]/org.jabref.logic.shared.DBMSProcessor.checkBaseIntegrity(Unknown Source)
	at [email protected]/org.jabref.logic.shared.DBMSSynchronizer.initializeDatabases(Unknown Source)
	at [email protected]/org.jabref.logic.shared.DBMSSynchronizer.openSharedDatabase(Unknown Source)
	at [email protected]/org.jabref.gui.shared.SharedDatabaseUIManager.openNewSharedDatabaseTab(Unknown Source)
	at [email protected]/org.jabref.gui.shared.SharedDatabaseLoginDialogViewModel.openSharedDatabase(Unknown Source)
	at [email protected]/org.jabref.gui.shared.SharedDatabaseLoginDialogViewModel.openDatabase(Unknown Source)
	at [email protected]/org.jabref.gui.shared.SharedDatabaseLoginDialogView.openDatabase(Unknown Source)
	at [email protected]/org.jabref.gui.shared.SharedDatabaseLoginDialogView.lambda$new$0(Unknown Source)
	at [email protected]/org.jabref.gui.util.ControlHelper.lambda$setAction$0(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventHandler$NormalEventFilterRecord.handleCapturingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventHandler.dispatchCapturingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchCapturingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchCapturingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventDispatcher.dispatchCapturingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
	at [email protected]/javafx.event.Event.fireEvent(Unknown Source)
	at [email protected]/javafx.scene.Node.fireEvent(Unknown Source)
	at [email protected]/javafx.scene.control.Button.fire(Unknown Source)
	at [email protected]/com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(Unknown Source)
	at [email protected]/com.sun.javafx.scene.control.inputmap.InputMap.handle(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
	at [email protected]/javafx.event.Event.fireEvent(Unknown Source)
	at [email protected]/javafx.scene.Scene$MouseHandler.process(Unknown Source)
	at [email protected]/javafx.scene.Scene.processMouseEvent(Unknown Source)
	at [email protected]/javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source)
	at [email protected]/com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
	at [email protected]/com.sun.glass.ui.View.notifyMouse(Unknown Source)
	at [email protected]/com.sun.glass.ui.win.WinApplication._enterNestedEventLoopImpl(Native Method)
	at [email protected]/com.sun.glass.ui.win.WinApplication._enterNestedEventLoop(Unknown Source)
	at [email protected]/com.sun.glass.ui.Application.enterNestedEventLoop(Unknown Source)
	at [email protected]/com.sun.glass.ui.EventLoop.enter(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.QuantumToolkit.enterNestedEventLoop(Unknown Source)
	at [email protected]/javafx.stage.Stage.showAndWait(Unknown Source)
	at [email protected]/javafx.scene.control.HeavyweightDialog.showAndWait(Unknown Source)
	at [email protected]/javafx.scene.control.Dialog.showAndWait(Unknown Source)
	at [email protected]/org.jabref.gui.JabRefDialogService.showCustomDialogAndWait(Unknown Source)
	at [email protected]/org.jabref.gui.shared.ConnectToSharedDatabaseCommand.execute(Unknown Source)
	at [email protected]/org.jabref.gui.actions.JabRefAction.lambda$new$3(Unknown Source)
	at [email protected]/org.controlsfx.control.action.Action.handle(Unknown Source)
	at [email protected]/org.controlsfx.control.action.Action.handle(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
	at [email protected]/javafx.event.Event.fireEvent(Unknown Source)
	at [email protected]/javafx.scene.control.MenuItem.fire(Unknown Source)
	at [email protected]/com.sun.javafx.scene.control.ContextMenuContent$MenuItemContainer.doSelect(Unknown Source)
	at [email protected]/com.sun.javafx.scene.control.ContextMenuContent$MenuItemContainer.lambda$createChildren$12(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventUtil.fireEventImpl(Unknown Source)
	at [email protected]/com.sun.javafx.event.EventUtil.fireEvent(Unknown Source)
	at [email protected]/javafx.event.Event.fireEvent(Unknown Source)
	at [email protected]/javafx.scene.Scene$MouseHandler.process(Unknown Source)
	at [email protected]/javafx.scene.Scene.processMouseEvent(Unknown Source)
	at [email protected]/javafx.scene.Scene$ScenePeerListener.mouseEvent(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(Unknown Source)
	at [email protected]/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(Unknown Source)
	at [email protected]/com.sun.glass.ui.View.handleMouseEvent(Unknown Source)
	at [email protected]/com.sun.glass.ui.View.notifyMouse(Unknown Source)
	at [email protected]/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at [email protected]/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)

@Siedlerchr
Copy link
Member

Siedlerchr commented Oct 16, 2023

@ArnaudAcoucite Sorry, can you please download the updated version again (same link) Somehow did not commit the real fix yesterday

@ArnaudAcoucite
Copy link
Author

I downloaded the updated version and now it works! Thank you very much! Maybe should I wait for @drescherflo to test it before closing the issue?

@Siedlerchr
Copy link
Member

The issue will be closed automatically once the fix is merged

@drescherflo
Copy link

Just tested the build and can confirm that everything's working as expected. Thank you @Siedlerchr

@ArnaudAcoucite
Copy link
Author

Ok great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants