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

ClosedFileSystemException when I run demo #371

Closed
decebals opened this issue Apr 21, 2020 · 0 comments
Closed

ClosedFileSystemException when I run demo #371

decebals opened this issue Apr 21, 2020 · 0 comments
Assignees
Labels

Comments

@decebals
Copy link
Member

Today, after I released version 3.3.0 I wanted to replicate some old issues.
When I tried to replicate #253 (run demo in command line via run-demo.sh script - I use a Linux for development), I retrieved the following error:

2020-04-21 20:34:48,706 DEBUG org.pf4j.AbstractExtensionFinder - Finding extensions of extension point 'org.pf4j.demo.api.Greeting'
2020-04-21 20:34:48,706 DEBUG org.pf4j.ServiceProviderExtensionFinder - Reading extensions storages from classpath
2020-04-21 20:34:48,707 DEBUG org.pf4j.ServiceProviderExtensionFinder - Read 'file:/home/decebal/work/pf4j/demo-dist/pf4j-demo.jar!/META-INF/services'
Exception in thread "main" java.nio.file.ClosedFileSystemException
	at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.ensureOpen(ZipFileSystem.java:1105)
	at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.getFileAttributes(ZipFileSystem.java:313)
	at jdk.zipfs/jdk.nio.zipfs.ZipPath.getAttributes(ZipPath.java:727)
	at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.readAttributes(ZipFileSystemProvider.java:293)
	at java.base/java.nio.file.Files.readAttributes(Files.java:1763)
	at java.base/java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:219)
	at java.base/java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:276)
	at java.base/java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:322)
	at java.base/java.nio.file.Files.walkFileTree(Files.java:2716)
	at org.pf4j.ServiceProviderExtensionFinder.readExtensions(ServiceProviderExtensionFinder.java:135)
	at org.pf4j.ServiceProviderExtensionFinder.collectExtensions(ServiceProviderExtensionFinder.java:130)
	at org.pf4j.ServiceProviderExtensionFinder.collectExtensions(ServiceProviderExtensionFinder.java:118)
	at org.pf4j.ServiceProviderExtensionFinder.readClasspathStorages(ServiceProviderExtensionFinder.java:69)
	at org.pf4j.AbstractExtensionFinder.readStorages(AbstractExtensionFinder.java:301)
	at org.pf4j.AbstractExtensionFinder.getEntries(AbstractExtensionFinder.java:309)
	at org.pf4j.AbstractExtensionFinder.find(AbstractExtensionFinder.java:56)
	at org.pf4j.DefaultExtensionFinder.find(DefaultExtensionFinder.java:45)
	at org.pf4j.AbstractPluginManager.getExtensions(AbstractPluginManager.java:550)
	at org.pf4j.demo.Boot.main(Boot.java:62)
/home/decebal/work/pf4j

After some investigation, I realized that the error was introduced by commit 0794f5c in an attempt to solve #355.
I think that we should close the FileSystem only for Windows OS. On Linux and probably on other Unix flavor OS, the close of FileSystem throws ClosedFileSystemException.

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

No branches or pull requests

1 participant