Commit 88e80502 authored by Mohamed Khalil Labidi's avatar Mohamed Khalil Labidi
Browse files

Try fix for URI not hierarchical

parent 01113110
......@@ -273,8 +273,9 @@ public class PAGateway {
LOGGER.info("filename: " + filename);
LOGGER.info("getClass().getResource(filename): " + getClass().getResource(filename).toString());
LOGGER.info("getClass().getResource(filename).getPath()" + getClass().getResource(filename).getPath());
fXmlFile = new File(getClass().getResource(filename).toURI());
} catch (URISyntaxException e) {
LOGGER.info("getClass().getResource(filename).toExternalForm(): " + getClass().getResource(filename).toExternalForm());
fXmlFile = new File(getClass().getResource(filename).toExternalForm().split(":")[1]);
} catch (Exception e) {
LOGGER.error(e.getStackTrace());
}
assert fXmlFile != null;
......
......@@ -31,7 +31,7 @@ public class GeoLocationUtils {
List<GeoLocationData> cloudsGLDB = new LinkedList<>();
File input;
try {
input = new File(getClass().getResource(File.separator + "db_cloud_regions.csv").toURI());
input = new File(getClass().getResource(File.separator + "db_cloud_regions.csv").toExternalForm().split(":")[1]);
CsvSchema csv = CsvSchema.emptySchema().withHeader().withColumnSeparator(' ').withNullValue("");
CsvMapper csvMapper = new CsvMapper();
MappingIterator<Map<?, ?>> mappingIterator = csvMapper.reader().forType(Map.class).with(csv).readValues(input);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment