When creating QosProvider Java constructed URLs cannot be used to point to QoS XML file.
For example, if we have QoS file
File qos = new File("qos.xml");
this will work:
QosProvider.newQosProvider("file://" + qos.getAbsolutePath(), "profile", environment)
but the following will not:
QosProvider.newQosProvider(qos.toURI().toString(), "profile", environment)QosProvider.newQosProvider(qos.toURI().toURL().toString(), "profile", environment)
This is apparently because Java constructs file URLs with one forward slash
file:/path/folder/qos.xml, while QosProvider expects two or three forward slashes file://path/folder/qos.xml.
This was tested on Centos 7.3 with Java 1.8 update 144 and with opensplice release OSPL_V6_7_180404OSS_RELEASE.
When creating QosProvider Java constructed URLs cannot be used to point to QoS XML file.
For example, if we have QoS file
File qos = new File("qos.xml");
this will work:
QosProvider.newQosProvider("file://" + qos.getAbsolutePath(), "profile", environment)
but the following will not:
QosProvider.newQosProvider(qos.toURI().toString(), "profile", environment)
QosProvider.newQosProvider(qos.toURI().toURL().toString(), "profile", environment)
This is apparently because Java constructs file URLs with one forward slash
file:/path/folder/qos.xml
, while QosProvider expects two or three forward slashesfile://path/folder/qos.xml
.This was tested on Centos 7.3 with Java 1.8 update 144 and with opensplice release OSPL_V6_7_180404OSS_RELEASE.