[jboss-jira] [JBoss JIRA] (WFLY-8792) System property wildfly.config.url does not work with Windows path to local file without protocol
Lin Gao (JIRA)
issues at jboss.org
Sun Jun 4 22:56:00 EDT 2017
[ https://issues.jboss.org/browse/WFLY-8792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lin Gao reassigned WFLY-8792:
-----------------------------
Assignee: Radovan Stancel (was: Darran Lofthouse)
> System property wildfly.config.url does not work with Windows path to local file without protocol
> -------------------------------------------------------------------------------------------------
>
> Key: WFLY-8792
> URL: https://issues.jboss.org/browse/WFLY-8792
> Project: WildFly
> Issue Type: Bug
> Components: Security
> Reporter: Ondrej Lukas
> Assignee: Radovan Stancel
> Labels: user_experience
>
> In case system property {{wildfly.config.url}} (which is used by Elytron client to find out configuration file) includes path to local file without URL protocol ({{file://}}) then linux path is automatically converted to URL started with {{file://}}. However Windows path is not converted to URL, mentioned below exception is thrown. It is caused by part of code which handles just a linux type of path, see [1].
> Using URL (i.e. protocol is explicitly used) in {{wildfly.config.url}} works correctly. It means this is user experience issue - path to local file without protocol {{file}} can be used in linux but cannot be used in Windows.
> Thrown exception for Windows:
> {code}
> org.wildfly.client.config.ConfigXMLParseException: CONF0014: Invalid configuration file URL
> at W:/workspace/eap-7x-security-elytron-testsuite-windows-olukas/f43f9016/tests-security/elytron/target/wildfly-config.xml
> at org.wildfly.client.config.ClientConfiguration.readConfiguration(ClientConfiguration.java:132)
> at org.wildfly.security.auth.client.ElytronXmlParser.parseAuthenticationClientConfiguration(ElytronXmlParser.java:139)
> at com.redhat.eap.qe.elytron.authnctx.WildflyConfigXmlServlet.parseAndCreateAuthenticationClientConfiguration(WildflyConfigXmlServlet.java:116)
> ... 41 more
> Caused by: java.net.MalformedURLException: unknown protocol: w
> at java.net.URL.<init>(URL.java:600)
> at java.net.URL.<init>(URL.java:490)
> at java.net.URL.<init>(URL.java:439)
> at java.net.URI.toURL(URI.java:1089)
> at org.wildfly.client.config.ClientConfiguration.streamOpener(ClientConfiguration.java:67)
> at org.wildfly.client.config.ClientConfiguration.readConfiguration(ClientConfiguration.java:130)
> ... 43 more
> {code}
> [1] https://github.com/wildfly/wildfly-client-config/blob/7c12683cd29f88261e70146aac8c1de93ea02c35/src/main/java/org/wildfly/client/config/ClientConfiguration.java#L217
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the jboss-jira
mailing list