[jboss-jira] [JBoss JIRA] (WFLY-6525) Impossible to use custom FileSystemProviders embedded in an application

David Brodski (JIRA) issues at jboss.org
Fri Apr 15 09:08:00 EDT 2016


    [ https://issues.jboss.org/browse/WFLY-6525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13192507#comment-13192507 ] 

David Brodski commented on WFLY-6525:
-------------------------------------

When I tried the _com.sun.nio.zipfs.ZipFileSystemProvider_, it worked, but it is integrated in the jre. If you create your own provider it is not working.

> Impossible to use custom FileSystemProviders embedded in an application
> -----------------------------------------------------------------------
>
>                 Key: WFLY-6525
>                 URL: https://issues.jboss.org/browse/WFLY-6525
>             Project: WildFly
>          Issue Type: Bug
>          Components: Class Loading
>    Affects Versions: 9.0.2.Final, 10.0.0.Final
>            Reporter: Xavier Dury
>            Assignee: David Lloyd
>
> Using a custom {{FileSystemProvider}} inside an application is not possible with Wildfly:
> * Using {{Paths.get(uri)}} won't work as {{FileSystemProvider}} caches previously discovered FSPs and won't see those that could be embedded in the application
> * Using {{FileSystems.newFileSystem(uri, map, classLoader)}} won't work either because FSPs from {{com.sun.nio.*}} will be discovered and those classes are not visible to the application (and are not exported by sun.jdk module.xml). This will give the following error: {{java.util.ServiceConfigurationError: java.nio.file.spi.FileSystemProvider: Provider com.sun.nio.zipfs.ZipFileSystemProvider not found}}.
> More info on https://developer.jboss.org/message/954528



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list