FileHelper.getFile(String path) crashes when URL is resolved

Description

In a Simulizar run configuration for the TransientEffects example project I set the reconfiguration rules folder to 'platform:/resource/org.palladiosimulator.simulizar.examples.loadbalancer.powerconsumption/rules_active'.
When Simulizar tries to load all contained reconfiguration files, FileHelper.getFile(..) crashes with an IllegalArgumentException:

java.lang.IllegalArgumentException: URI is not hierarchical
at java.io.File.<init>(File.java:418)
at org.palladiosimulator.commons.eclipseutils.FileHelper.getFile(FileHelper.java:42)
at org.palladiosimulator.commons.eclipseutils.FileHelper.getFiles(FileHelper.java:86)
at org.palladiosimulator.commons.eclipseutils.FileHelper.getURIs(FileHelper.java:99)
at org.palladiosimulator.simulizar.reconfiguration.qvto.QVTOExecutor.getQvtoFiles(QVTOExecutor.java:171)
at org.palladiosimulator.simulizar.reconfiguration.qvto.QVTOExecutor.<init>(QVTOExecutor.java:71)
at org.palladiosimulator.simulizar.reconfiguration.qvto.QVTOReconfigurator.getQVTOExecutor(QVTOReconfigurator.java:75)
at org.palladiosimulator.simulizar.reconfiguration.qvto.QVTOReconfigurator.checkAndExecute(QVTOReconfigurator.java:67)
at org.palladiosimulator.simulizar.reconfiguration.ReconfigurationProcess.internalLifeCycle(ReconfigurationProcess.java:70)
at de.uka.ipd.sdq.simucomframework.SimuComSimProcess.lifeCycle(SimuComSimProcess.java:176)
at de.uka.ipd.sdq.simulation.abstractsimengine.processes.SimulatedProcess.actions(SimulatedProcess.java:66)
at de.uka.ipd.sdq.simulation.abstractsimengine.processes.SimulatedProcess$1.run(SimulatedProcess.java:49)
at java.lang.Thread.run(Thread.java:745)

Environment

Windows 7, Eclipse Luna Service Release 2

Activity

Show:
Matthias Becker
August 3, 2015, 2:46 PM

It's indeed a propblem that only occurs on Windows. It can be prevented when using Eclipse's URIUtil [1] to convert a URL to URI.

[1] http://wiki.eclipse.org/Eclipse/UNC_Paths

Florian Rosenthal
July 16, 2015, 1:45 PM

Sorry, I forgot to mention this.
I am working with WIndows 7 and Eclipse Modeling Tools, Luna Service Release 2.

On my machine, I can circumvent this error by using only the raw scheme-specific part of the URI in case it is opaque.

Sebastian Lehrig
July 13, 2015, 9:36 AM

Can you report your environment, please? (URI functions are environment-dependent)

Fixed

Assignee

Matthias Becker

Reporter

Florian Rosenthal

Labels

None

Requirement Category

None

External issue URL

None

Severity

None

Priority

None

Status Whiteboard

None

External issue ID

None

Priority

Major