If you are deleting the attachment file manually you're creating a situation where the software is no longer in sync with expectations. JSPWiki is charged with management of the files within its directory tree and can't be expected to protect those files from a sysadmin deleting them. This is akin to going in and deleting files or changing filenames in a MS Windows system directory.
I don't see this as a bug in the software. Manually deleting files is the kind of thing that is by definition unsupported. Unless I'm misunderstanding the description provided... On 16/08/24 07:42, Alex O'Ree (Jira) wrote:
Alex O'Ree created JSPWIKI-1197: ----------------------------------- Summary: Deleting an attachment via filesystem causes jsp wiki to complete crash Key: JSPWIKI-1197 URL: https://issues.apache.org/jira/browse/JSPWIKI-1197 Project: JSPWiki Issue Type: Bug Reporter: Alex O'Ree * i created a wiki page, let's call it Foo * uploaded an attachment * stopped the server * delete the attachment file only from Foo-att/attachment.png-dir/1,png leaving behind the Foo-att directory and attachment.properties * start the server i got this dumped to std out 15:31:08.212 [main] ERROR org.apache.wiki.providers.BasicAttachmentProvider - Can't get attachment properties for Attachment [Foo/attachment.jpg;mod=null] java.io.FileNotFoundException: No such file: C:\test\wiki\Foo-att\Foo/attachment.png-dir\0.png exists. at org.apache.wiki.providers.BasicAttachmentProvider.findFile(BasicAttachmentProvider.java:330) ~[jspwiki-main-2.12.2.jar:2.12.2] at org.apache.wiki.providers.BasicAttachmentProvider.getAttachmentInfo(BasicAttachmentProvider.java:471) [jspwiki-main-2.12.2.jar:2.12.2] at org.apache.wiki.providers.BasicAttachmentProvider.listAttachments(BasicAttachmentProvider.java:379) [jspwiki-main-2.12.2.jar:2.12.2] at org.apache.wiki.providers.BasicAttachmentProvider.listAllChanged(BasicAttachmentProvider.java:422) [jspwiki-main-2.12.2.jar:2.12.2] at org.apache.wiki.providers.CachingAttachmentProvider.listAllChanged(CachingAttachmentProvider.java:141) [jspwiki-main-2.12.2.jar:2.12.2] at org.apache.wiki.attachment.DefaultAttachmentManager.getAllAttachments(DefaultAttachmentManager.java:287) [jspwiki-main-2.12.2.jar:2.12.2] at org.apache.wiki.WikiEngine.initReferenceManager(WikiEngine.java:469) [jspwiki-main-2.12.2.jar:2.12.2] at org.apache.wiki.WikiEngine.initialize(WikiEngine.java:307) [jspwiki-main-2.12.2.jar:2.12.2] at org.apache.wiki.api.core.Engine.start(Engine.java:434) [jspwiki-api-2.12.2.jar:2.12.2] at org.apache.wiki.WikiEngine.getInstance(WikiEngine.java:188) [jspwiki-main-2.12.2.jar:2.12.2] at org.apache.wiki.spi.EngineSPIDefaultImpl.find(EngineSPIDefaultImpl.java:41) [jspwiki-main-2.12.2.jar:2.12.2] at org.apache.wiki.api.spi.EngineDSL.find(EngineDSL.java:65) [jspwiki-api-2.12.2.jar:2.12.2] at org.apache.wiki.ui.WikiServletFilter.init(WikiServletFilter.java:81) [jspwiki-main-2.12.2.jar:2.12.2] at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:262) [catalina.jar:9.0.85] at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:244) [catalina.jar:9.0.85] at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:97) [catalina.jar:9.0.85] at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4311) [catalina.jar:9.0.85] and no wiki pages will be served. looks like it fails the bootup process and tomcat undeploys the app. -- This message was sent by Atlassian Jira (v8.20.10#820010)
-- ........................................................................... Murray Altheim <murray18 at altheim dot com> = = === http://www.altheim.com/murray/ === === = = === In the evening The rice leaves in the garden Rustle in the autumn wind That blows through my reed hut. -- Minamoto no Tsunenobu