Unable to save in version 0.67.0

Hi,

Since I updated to version 0.67.0 (windows) I can’t save any portfolio.

When I open my portfolio, I get this error message.
image

When I try to save my portfolio, the same message appears.

When I create a brand new, empty portfolio, and try to save it I get this message:

image

I can’t even save the error log, so I’ll post the relevant messages here.

The error log when opening shows:

Tue Jan 02 10:02:54 CET 2024
C:\Users\eric_\Documents\portfolio\EricNew.portfolio -> C:\Users\eric_\Documents\portfolio\EricNew.backup-after-open.portfolio

java.nio.file.NoSuchFileException: C:\Users\eric_\Documents\portfolio\EricNew.portfolio -> C:\Users\eric_\Documents\portfolio\EricNew.backup-after-open.portfolio
	at java.base/sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
	at java.base/sun.nio.fs.WindowsFileCopy.copy(Unknown Source)
	at java.base/sun.nio.fs.WindowsFileSystemProvider.copy(Unknown Source)
	at java.base/java.nio.file.Files.copy(Unknown Source)
	at name.abuchen.portfolio.ui.editor.ClientInput.createBackup(ClientInput.java:383)
	at name.abuchen.portfolio.ui.editor.ClientInput.createBackupAfterOpen(ClientInput.java:370)
	at name.abuchen.portfolio.ui.editor.LoadClientThread.run(LoadClientThread.java:38)

When saving, it shows:

Tue Jan 02 10:08:07 CET 2024
Failed to aquire lock C:\Users\eric_\Documents\portfolio\EricNew.portfolio with message Access is denied

and

Tue Jan 02 10:08:07 CET 2024
Execution exception for: ParameterizedCommand(Command(org.eclipse.ui.file.save,saveCommand,
		,
		Category(org.eclipse.e4.ui.model.application.MApplication,Application Category,null,true),
		HandlerServiceHandler("org.eclipse.ui.file.save"),
		,,true),null) in 
	context chain: WorkbenchContext -> TrimmedWindowImpl (name.abuchen.portfolio.ui.window.mainwindow) Context -> PartImpl (name.abuchen.portfolio.ui.part.portfolio)  removeOnHide Cloneable (EricNew.portfolio) Context

org.eclipse.core.commands.ExecutionException: Error executing 'org.eclipse.ui.file.save': com.thoughtworks.xstream.io.StreamException: 
	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:179)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:485)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:308)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:580)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:655)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:439)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:96)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1286)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1065)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1090)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1075)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1117)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1113)
	at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1594)
	at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4866)
	at org.eclipse.swt.widgets.ToolBar.WM_CHAR(ToolBar.java:1364)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4744)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5039)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(Native Method)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:342)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:168)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:651)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:588)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1459)

Caused by: org.eclipse.e4.core.di.InjectionException: com.thoughtworks.xstream.io.StreamException: 
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:68)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:298)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:232)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:174)
	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:165)
	... 39 more

Caused by: com.thoughtworks.xstream.io.StreamException: 
	at com.thoughtworks.xstream.core.util.QuickWriter.flush(QuickWriter.java:77)
	at com.thoughtworks.xstream.io.xml.PrettyPrintWriter.flush(PrettyPrintWriter.java:346)
	at com.thoughtworks.xstream.XStream.toXML(XStream.java:1267)
	at name.abuchen.portfolio.model.ClientFactory$PlainWriter.save(ClientFactory.java:169)
	at name.abuchen.portfolio.model.ClientFactory$Decryptor.save(ClientFactory.java:416)
	at name.abuchen.portfolio.model.ClientFactory.writeFile(ClientFactory.java:641)
	at name.abuchen.portfolio.model.ClientFactory.save(ClientFactory.java:581)
	at name.abuchen.portfolio.ui.editor.ClientInput.lambda$2(ClientInput.java:212)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at name.abuchen.portfolio.ui.editor.ClientInput.save(ClientInput.java:206)
	at name.abuchen.portfolio.ui.editor.PortfolioPart.save(PortfolioPart.java:418)
	at name.abuchen.portfolio.ui.handlers.SaveFileHandler.lambda$0(SaveFileHandler.java:25)
	at java.base/java.util.Optional.ifPresent(Unknown Source)
	at name.abuchen.portfolio.ui.handlers.SaveFileHandler.execute(SaveFileHandler.java:25)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
	... 43 more

	Suppressed: java.io.IOException: Access is denied
		at java.base/java.io.FileOutputStream.writeBytes(Native Method)
		at java.base/java.io.FileOutputStream.write(Unknown Source)
		at java.base/java.io.BufferedOutputStream.flushBuffer(Unknown Source)
		at java.base/java.io.BufferedOutputStream.flush(Unknown Source)
		at java.base/java.io.FilterOutputStream.close(Unknown Source)
		at java.base/javax.crypto.CipherOutputStream.close(Unknown Source)
		at java.base/java.util.zip.DeflaterOutputStream.close(Unknown Source)
		at java.base/java.util.zip.ZipOutputStream.close(Unknown Source)
		at name.abuchen.portfolio.model.ClientFactory$Decryptor.save(ClientFactory.java:418)
		... 57 more

Caused by: java.io.IOException: Access is denied
	at java.base/java.io.FileOutputStream.writeBytes(Native Method)
	at java.base/java.io.FileOutputStream.write(Unknown Source)
	at java.base/java.io.BufferedOutputStream.flushBuffer(Unknown Source)
	at java.base/java.io.BufferedOutputStream.flush(Unknown Source)
	at java.base/javax.crypto.CipherOutputStream.flush(Unknown Source)
	at java.base/java.util.zip.DeflaterOutputStream.flush(Unknown Source)
	at java.base/sun.nio.cs.StreamEncoder.implFlush(Unknown Source)
	at java.base/sun.nio.cs.StreamEncoder.flush(Unknown Source)
	at java.base/java.io.OutputStreamWriter.flush(Unknown Source)
	at com.thoughtworks.xstream.core.util.QuickWriter.flush(QuickWriter.java:75)

	... 61 more

Hi Eric,

there is no known issue in general with this version on windows. For me for example it is working like normal. But there was an update of the eclipse framework, so may there are some side effect, which are just hitting something special for you (for example I wasn’t aware, that an underscore is valid in the username).

It seems, that PP can’t access the defined path. What happens, when you make a new file and just save it on the top level of C (if you havn’t rights to save directly on C, then any other folder outsite of your users directory)? Are you still getting the error?

3 Likes

The underscore at the end of my username was put there by Windows, I’d prefer not to have it, but I’d rather not try to change it now.

Excellent suggestion, I tried saving to D:\or C:\Temp and they both worked.
The underscore is not an issue, I could save to C:\Temp\_temp.

In C:\users\eric_\ I cannot save to Documents, Pictures, Music or Videos.
I could save to C:\users\eric_\Downloads. Or to a new folder I made in C:\users\eric_.

No, never change that, it could destroy your full system. But I checked it, underscore is a valid sign in the username (at any position). So from a Windows perspective, that’s not the issue.

My next idea was to reinstall PP, because maybe by accident it was installed with a wrong Windows user and therefore can’t access the user folder. But if you can save it in C:\users\eric_\Downloads, that can’t be the case.

To be honest, I am a little bit clueless, what the issue is with that system folders. I think it has nothing to do with PP. Maybe check the following points:

  • Could you save from an other application something into this folders (a word document for example)
  • Do you have any (new) anti virus software, which may tries to control the folders?
  • Do you have any (new) Synchronisation Software, like Dropbox, Google drive, … which actually tries sync that folders, fails and therefore blocks it
  • Is the issue still present after you restarted your PC
4 Likes

Have you tried starting PP as administrator?

1 Like

It sounds to me that PP only has read permissions to the user directory. It reads the file but fails then to write the backup copy upon opening the file (the first error message) and fails to save the file (the second error message).

Next, I suggest to follow @Jo92 suggestion and reinstall PP. Maybe the update got quarantined by your virus scanner or something?

2 Likes

Just a question, is the PP executable might be in the Windows download path? In this case the Windows sandbox has less authorizations as required.

Thank you all for the suggestions. I recently reinstalled the program, and apparently that caused it to be blocked by the Windows Security Ransomware protection.

Should anyone ever have a similar problem, go to Windows Security, → Virus & Threat Protection. Scroll to the bottom to Ransomware Protection and click ‘Manage Ransomware protection’. There you can check the Block History to see if PP was blocked. If that is the case, you can ‘Allow an app through Controlled folder access’.

4 Likes