Home › Forums › PeerfactSim Forum › ConfigurationException: Failed to load configuration file
- This topic has 2 replies, 1 voice, and was last updated 9 years, 8 months ago by
Martin Wiegand.
-
AuthorPosts
-
May 21, 2015 at 6:16 pm #832
Martin Wiegand
GuestWhen I try simulating Pastry in with the newest Version of the Simulator I get the following Exception when I try to use my config file:
Exception in thread “main” org.peerfact.api.scenario.ConfigurationException: Failed to load configuration from file config/ex8-FileSharing-Pastry.xml
at org.peerfact.impl.scenario.DefaultConfigurator.configureAll(DefaultConfigurator.java:265)
at org.peerfact.impl.simengine.Simulator.configure(Simulator.java:236)
at org.peerfact.SimulatorRunner.run(SimulatorRunner.java:81)
at org.peerfact.SimulatorRunner.main(SimulatorRunner.java:63)
Caused by: org.dom4j.DocumentException: Error on line 189 of document file:///home/martin/Bachelor%20Arbeit/GIT-Sim/config/ex8-FileSharing-Pastry.xml : An include with href ‘ex8-FileSharing-scenario.xml’failed, and no fallback element was found. Nested exception: An include with href ‘ex8-FileSharing-scenario.xml’failed, and no fallback element was found.
at org.dom4j.io.SAXReader.read(SAXReader.java:482)
at org.dom4j.io.SAXReader.read(SAXReader.java:264)
at org.peerfact.impl.scenario.DefaultConfigurator.configureAll(DefaultConfigurator.java:258)I use the following Config file:
<?xml version=’1.0′ encoding=’utf-8’?>
<Configuration xmlns:xi=”http://www.w3.org/2001/XInclude”><!– Variables –>
<Default>
<Variable name=”seed” value=”0″ />
<Variable name=”size” value=”100″ />
<Variable name=”startTime” value=”0m” />
<Variable name=”finishTime” value=”300m” />
<Variable name=”ChurnModel” value=”” />
<Variable name=”NetLayer” value=”MOD” />
<Variable name=”Overlay” value=”Pastry” />
<Variable name=”server” value=”false” />
<Variable name=”Service” value=”” />
<Variable name=”GUI” value=”false” />
</Default>
<!– Description –>
<Description>
Generic configuration for FileSharing with all possible DHT overlays with the following possible configurations:ChurnModel: Exponential, Kad, Herrera, Static
NetLayer: MOD, GNP, SIMPLE, MOBILE
Overlay: Can, CentralizedIndex, CentralizedStorage, AdaptiveChord, CaReChord, Chord, EpiChord, MaliciousChord, ReChord, HKademlia, Kademlia, Kandy, Pastry
[server= true (for CentralizedStorage and CentralizedIndex)]Gia, Gnutella06
</Description><!– SimulatorCore –>
<xi:include href=”includes/simengine/Simulator.xml” /><!– NetLayer –>
<IfEqualStr arg0=”$NetLayer” arg1=”MOD”>
<xi:include href=”includes/network/ModularNetLayer.xml” />
</IfEqualStr><IfEqualStr arg0=”$NetLayer” arg1=”GNP”>
<xi:include href=”includes/network/GnpNetLayer.xml” />
</IfEqualStr><IfEqualStr arg0=”$NetLayer” arg1=”SIMPLE”>
<xi:include href=”includes/network/SimpleNetLayer.xml” />
</IfEqualStr>
<IfEqualStr arg0=”$NetLayer” arg1=”MOBILE”>
<xi:include href=”includes/network/MobileNetLayer.xml” />
</IfEqualStr><!– TransLayer –>
<xi:include href=”includes/transport/DefaultTransLayer.xml” /><!– Overlay –>
<IfEqualStr arg0=”$Overlay” arg1=”Can”>
<xi:include href=”includes/overlay/dht/can/CanNode.xml” />
</IfEqualStr><IfEqualStr arg0=”$Overlay” arg1=”CentralizedIndex”>
<xi:include href=”includes/overlay/dht/centralizedIndex/centralizedIndexNode.xml” />
</IfEqualStr><IfEqualStr arg0=”$Overlay” arg1=”CentralizedStorage”>
<xi:include href=”includes/overlay/dht/centralizedStorage/centralizedStorageNode.xml” />
</IfEqualStr><IfEqualStr arg0=”$Overlay” arg1=”AdaptiveChord”>
<xi:include href=”includes/overlay/dht/chord/AdaptiveChordNode.xml” />
</IfEqualStr><IfEqualStr arg0=”$Overlay” arg1=”CaReChord”>
<xi:include href=”includes/overlay/dht/chord/CaReChordNode.xml” />
</IfEqualStr><IfEqualStr arg0=”$Overlay” arg1=”Chord”>
<xi:include href=”includes/overlay/dht/chord/ChordNode.xml” />
</IfEqualStr><IfEqualStr arg0=”$Overlay” arg1=”EpiChord”>
<xi:include href=”includes/overlay/dht/chord/EpiChordNode.xml” />
</IfEqualStr><IfEqualStr arg0=”$Overlay” arg1=”MaliciousChord”>
<xi:include href=”includes/overlay/dht/chord/MaliciousChordNode.xml” />
</IfEqualStr><IfEqualStr arg0=”$Overlay” arg1=”ReChord”>
<xi:include href=”includes/overlay/dht/chord/ReChordNode.xml” />
</IfEqualStr><IfEqualStr arg0=”$Overlay” arg1=”HKademlia”>
<xi:include href=”includes/overlay/dht/kademlia/HKademliaNode.xml” />
</IfEqualStr><IfEqualStr arg0=”$Overlay” arg1=”Kademlia”>
<xi:include href=”includes/overlay/dht/kademlia/KademliaNode.xml” />
</IfEqualStr><IfEqualStr arg0=”$Overlay” arg1=”Kandy”>
<xi:include href=”includes/overlay/dht/kademlia/KandyNode.xml” />
</IfEqualStr><IfEqualStr arg0=”$Overlay” arg1=”Pastry”>
<xi:include href=”includes/overlay/dht/pastry/PastryNode.xml” />
</IfEqualStr><IfEqualStr arg0=”$Overlay” arg1=”Gia”>
<xi:include href=”includes/overlay/unstructured/Gia.xml” />
</IfEqualStr>
<IfEqualStr arg0=”$Overlay” arg1=”Gnutella06″>
<xi:include href=”includes/overlay/unstructured/Gnutella06.xml” />
</IfEqualStr><!– Content Distribution –>
<xi:include href=”includes/overlay/cd/DefaultContentDistribution.xml” /><!– Application –>
<xi:include href=”includes/application/FileSharing.xml” /><xi:include href=”ex8-FileSharing-ResourceSpace.xml” />
<!– Monitor –>
<xi:include href=”includes/analyzer/DefaultFileSharingMonitor.xml” /><!– HostBuilder –>
<!– without churn –>
<IfEqualStr arg0=”$ChurnModel” arg1=””>
<IfEqualStr arg0=”$server” arg1=”false”>
<xi:include href=”includes/hosts/FileSharingHostBuilder.xml” />
</IfEqualStr>
</IfEqualStr><IfEqualStr arg0=”$ChurnModel” arg1=””>
<IfEqualStr arg0=”$server” arg1=”true”>
<xi:include href=”includes/hosts/FileSharingServerHostBuilder.xml” />
</IfEqualStr>
</IfEqualStr><!– with churn –>
<IfNotEqualStr arg0=”$ChurnModel” arg1=””>
<IfEqualStr arg0=”$server” arg1=”false”>
<xi:include href=”includes/hosts/FileSharingHostBuilderWithChurn.xml” />
</IfEqualStr>
</IfNotEqualStr><IfNotEqualStr arg0=”$ChurnModel” arg1=””>
<IfEqualStr arg0=”$server” arg1=”true”>
<xi:include href=”includes/hosts/FileSharingServerHostBuilderWithChurn.xml” />
</IfEqualStr>
</IfNotEqualStr><!– Oracle –>
<xi:include href=”includes/util/GlobalOracle.xml” /><!– ChurnGenerator –>
<IfEqualStr arg0=”$ChurnModel” arg1=”Exponential”>
<xi:include href=”includes/churn/ExponentialChurn.xml” />
</IfEqualStr><IfEqualStr arg0=”$ChurnModel” arg1=”Herrera”>
<xi:include href=”includes/churn/HerreraChurn.xml” />
</IfEqualStr><IfEqualStr arg0=”$ChurnModel” arg1=”Kad”>
<xi:include href=”includes/churn/KadChurn.xml” />
</IfEqualStr><IfEqualStr arg0=”$ChurnModel” arg1=”Static”>
<xi:include href=”includes/churn/StaticChurn.xml” />
</IfEqualStr><!– Scenario –>
<IfEqualStr arg0=”$server” arg1=”false”>
<xi:include href=”ex8-FileSharing-scenario.xml” />
</IfEqualStr><IfEqualStr arg0=”$server” arg1=”true”>
<xi:include href=”includes/scenario/FileSharingWithServer.xml” />
</IfEqualStr></Configuration>
Am I doing something wrong? Is something wrong with the config File? I have slightly altered some of the code of the Pastry classes though I can run the old code by changing a few newly introduced variables. I do not think, however, that they are related to this issue.
Thank you in advance,
Martin Wiegand
May 21, 2015 at 6:17 pm #833Kalman
GuestHi,
to me it seems that the error is here to be found:
file:///home/martin/Bachelor%20Arbeit/GIT-Sim/config/ex8-FileSharing-Pastry.xmlCould you check if the error occurs when you use a folder structure without spaces –> e.g. not “Bachelor%20Arbeit” but “Bachelor-Arbeit” ?
Sometimes one parameter is considered as 2 separate parameters in this case.
May 21, 2015 at 6:17 pm #834Martin Wiegand
GuestI have changed the folder name to Bachelor_Arbeit. Sadly the problem persisted. Looking over the entry that causes the problem once more I finally found the error: the Include responsible for the errors had a normal s where it should have had a capital S. Problem solved.
Thank you, I am sorry I missed that.
-
AuthorPosts
- You must be logged in to reply to this topic.