Thread Locked This thread is locked - replies are not allowed.


This question is answered.


Permlink Replies: 5 - Pages: 1 - Last Post: 1 Aug 22, 20:25 Last Post By: JeffTucker Threads: [ Previous | Next ]
bomen5

Posts: 3
Registered: 30-May-2010
java.io.IOException: Access is denied
Posted: 1 Aug 22, 00:24
 
Whenever I try to do any activity that needs to write to disk I get a Java IO error.
I have tried anything I could think of to solve this. Fully uninstalled jAlbum en re-installed (latest version), multiple times. No clue what to do now. Who can help?

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/sun.nio.cs.StreamEncoder.writeBytes(Unknown Source)
at java.base/sun.nio.cs.StreamEncoder.implClose(Unknown Source)
at java.base/sun.nio.cs.StreamEncoder.close(Unknown Source)
at java.base/java.io.OutputStreamWriter.close(Unknown Source)
at se.datadosen.util.IO.writeTextFile(IO.java:217)
at se.datadosen.jalbum.FileCollection.saveEntries(FileCollection.java:412)
at se.datadosen.jalbum.FileAlbumObject.setChildren(FileAlbumObject.java:140)
at se.datadosen.jalbum.AlbumObjectImpl.createFolder(AlbumObjectImpl.java:860)
at se.datadosen.explorer.JAlbumExplorer$13.actionPerformed(JAlbumExplorer.java:626)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at java.desktop/javax.swing.AbstractButton.doClick(Unknown Source)
at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.desktop/java.awt.Component.processEvent(Unknown Source)
at java.desktop/java.awt.Container.processEvent(Unknown Source)
at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

Edited by: bomen5 on 1 Aug 2022, 00:24

Edited by: bomen5 on 1 Aug 2022, 00:26
JeffTucker

Posts: 8,338
Registered: 31-Jan-2006
Re: java.io.IOException: Access is denied
Posted: 1 Aug 22, 01:08   in response to: bomen5 in response to: bomen5
 
If you're on a Windows platform, try setting jAlbum to "Run as administrator."
bomen5

Posts: 3
Registered: 30-May-2010
Re: java.io.IOException: Access is denied
Posted: 1 Aug 22, 14:54   in response to: JeffTucker in response to: JeffTucker
 
Tried it, but it gave the same results.
JeffTucker

Posts: 8,338
Registered: 31-Jan-2006
Re: java.io.IOException: Access is denied
Posted: 1 Aug 22, 15:10   in response to: bomen5 in response to: bomen5
Correct
Hmmm... Beyond the obvious, like making sure the specified output location actually exists (a drive letter might have changed, for example), not sure what to tell you.

I did have one Windows update that reset the permissions on one of my primary directories (the Pictures directory, in this case), and had removed "write" permission for most accounts. So, you might want to do a deep dive into the permission settings for the output location.

Another quick test is to create a little test project on your C: drive (like in Documents\My Albums), with the output in the default album subdirectory. In short, try the simplest case.
bomen5

Posts: 3
Registered: 30-May-2010
Re: java.io.IOException: Access is denied
Posted: 1 Aug 22, 19:20   in response to: JeffTucker in response to: JeffTucker
 
Ah, that helps! Changed the destination to a different drive and can now create a new project.
Also found that somehow the My Albums folder was set to read only. Changed that in the properties, but that did not immediately help. At least it's clear it is permission related. Thx!
JeffTucker

Posts: 8,338
Registered: 31-Jan-2006
Re: java.io.IOException: Access is denied
Posted: 1 Aug 22, 20:25   in response to: bomen5 in response to: bomen5
 
Good! Yes, the symptoms are pretty clear, so it's time to plunge into File Explorer > Properties > Security. Always a lot of fun. ;)
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums