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

Could not save library #10452

Closed
1 of 2 tasks
dkczk opened this issue Oct 6, 2023 · 4 comments · Fixed by #10454
Closed
1 of 2 tasks

Could not save library #10452

dkczk opened this issue Oct 6, 2023 · 4 comments · Fixed by #10454
Labels
component: export-or-save [outdated] type: bug Confirmed bugs or reports that are very likely to be bugs

Comments

@dkczk
Copy link

dkczk commented Oct 6, 2023

JabRef version

5.10 (latest release)

Operating system

macOS

Details on version and operating system

macOS 12.6

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. I add some articles to my new library
  2. CMD + S to save the library
  3. The following error is returned:
org.jabref.logic.exporter.SaveException: Problems saving: java.io.IOException: Operation not supported
	at org.jabref@5.10.60000/org.jabref.gui.exporter.SaveDatabaseAction.saveDatabase(SaveDatabaseAction.java:266)
	at org.jabref@5.10.60000/org.jabref.gui.exporter.SaveDatabaseAction.save(SaveDatabaseAction.java:215)
	at org.jabref@5.10.60000/org.jabref.gui.exporter.SaveDatabaseAction.saveAs(SaveDatabaseAction.java:131)
	at org.jabref@5.10.60000/org.jabref.gui.exporter.SaveDatabaseAction.save(SaveDatabaseAction.java:186)
	at org.jabref@5.10.60000/org.jabref.gui.exporter.SaveDatabaseAction.save(SaveDatabaseAction.java:75)
	at org.jabref@5.10.60000/org.jabref.gui.exporter.SaveAction.execute(SaveAction.java:41)
	at org.jabref@5.10.60000/org.jabref.gui.actions.JabRefAction.lambda$new$3(JabRefAction.java:40)
	at org.jabref.merged.module@5.10.60000/org.controlsfx.control.action.Action.handle(Action.java:423)
	at org.jabref.merged.module@5.10.60000/org.controlsfx.control.action.Action.handle(Action.java:64)
	at org.jabref.merged.module@5.10.60000/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
	at org.jabref.merged.module@5.10.60000/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:232)
	at org.jabref.merged.module@5.10.60000/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:189)
	at org.jabref.merged.module@5.10.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at org.jabref.merged.module@5.10.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at org.jabref.merged.module@5.10.60000/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at org.jabref.merged.module@5.10.60000/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
	at org.jabref.merged.module@5.10.60000/javafx.event.Event.fireEvent(Event.java:198)
	at org.jabref.merged.module@5.10.60000/javafx.scene.control.MenuItem.fire(MenuItem.java:459)
	at org.jabref.merged.module@5.10.60000/com.sun.javafx.scene.control.GlobalMenuAdapter.lambda$bindMenuItemProperties$2(GlobalMenuAdapter.java:150)
	at org.jabref.merged.module@5.10.60000/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
	at org.jabref.merged.module@5.10.60000/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:232)
	at org.jabref.merged.module@5.10.60000/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:189)
	at org.jabref.merged.module@5.10.60000/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at org.jabref.merged.module@5.10.60000/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at org.jabref.merged.module@5.10.60000/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at org.jabref.merged.module@5.10.60000/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
	at org.jabref.merged.module@5.10.60000/javafx.event.Event.fireEvent(Event.java:198)
	at org.jabref.merged.module@5.10.60000/javafx.scene.control.MenuItem.fire(MenuItem.java:459)
	at org.jabref.merged.module@5.10.60000/com.sun.javafx.tk.quantum.GlassSystemMenu$1.action(GlassSystemMenu.java:234)
Caused by: java.io.IOException: Operation not supported
	at java.base/sun.nio.ch.UnixFileDispatcherImpl.lock0(Native Method)
	at java.base/sun.nio.ch.UnixFileDispatcherImpl.lock(UnixFileDispatcherImpl.java:99)
	at java.base/sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:1487)
	at java.base/java.nio.channels.FileChannel.lock(FileChannel.java:1240)
	at org.jabref@5.10.60000/org.jabref.logic.exporter.AtomicFileOutputStream.<init>(AtomicFileOutputStream.java:109)
	at org.jabref@5.10.60000/org.jabref.logic.exporter.AtomicFileOutputStream.<init>(AtomicFileOutputStream.java:83)
	at org.jabref@5.10.60000/org.jabref.logic.exporter.AtomicFileWriter.<init>(AtomicFileWriter.java:29)
	at org.jabref@5.10.60000/org.jabref.gui.exporter.SaveDatabaseAction.saveDatabase(SaveDatabaseAction.java:243)
	... 28 more


Appendix

...

Log File
Paste an excerpt of your log file here
@Siedlerchr
Copy link
Member

Siedlerchr commented Oct 6, 2023

Are you saving your library by chance in a sync folder like Google Drive or on a smb network share? I found this bug report https://bugs.openjdk.org/browse/JDK-8167023

@dkczk
Copy link
Author

dkczk commented Oct 6, 2023

Yes, I want to save the file to a network drive as my whole thesis is saved there.

@Siedlerchr
Copy link
Member

Siedlerchr commented Oct 6, 2023

Thanks, maybe we can add a check for that file locking mechanism and still provide an option to save the file. In the meantime you have to save your bib file to a different location

@github-project-automation github-project-automation bot moved this to Normal priority in Prioritization Oct 6, 2023
@Siedlerchr Siedlerchr added the [outdated] type: bug Confirmed bugs or reports that are very likely to be bugs label Oct 6, 2023
@Siedlerchr
Copy link
Member

@dkczk I've implemented a workaround. Can you test if this version works for you as well? https://builds.jabref.org/pull/10454/merge

(Tested it with macOS and a windows network share over smb)

@github-project-automation github-project-automation bot moved this from Normal priority to Done in Prioritization Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: export-or-save [outdated] type: bug Confirmed bugs or reports that are very likely to be bugs
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants