When testing version 0.9.3 of the converter, it failed with the following exception:
LMC-051695:tmp20180215 sherzig$ OMLConverters/bin/omlConverter text -c ontologies/oml.catalog.xml -out ontologies-converted
18/02/22 16:23:50 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
conversion=ConversionCommandFromOMLTextualSyntax
# => 1259 OML files to convert...
# Loaded all OML resources (no EcoreUtil.resolveAll!).
### 1 Conversion Errors! ###
Comparison method violates its general contract!
java.lang.IllegalArgumentException: Comparison method violates its general contract!
at java.util.TimSort.mergeHi(TimSort.java:899)
at java.util.TimSort.mergeAt(TimSort.java:516)
at java.util.TimSort.mergeCollapse(TimSort.java:441)
at java.util.TimSort.sort(TimSort.java:245)
at java.util.Arrays.sort(Arrays.java:1438)
at scala.collection.SeqLike$class.sorted(SeqLike.scala:648)
at scala.collection.AbstractSeq.sorted(Seq.scala:41)
at scala.collection.SeqLike$class.sortWith(SeqLike.scala:601)
at scala.collection.AbstractSeq.sortWith(Seq.scala:41)
at gov.nasa.jpl.imce.oml.resolver.GraphUtilities$.hierarchicalTopologicalSort(GraphUtilities.scala:109)
at gov.nasa.jpl.imce.oml.resolver.GraphUtilities$.hierarchicalTopologicalSort(GraphUtilities.scala:89)
at gov.nasa.jpl.imce.oml.resolver.ResolverUtilities$$anonfun$sortExtents$2$$anonfun$apply$12.apply(ResolverUtilities.scala:138)
at gov.nasa.jpl.imce.oml.resolver.ResolverUtilities$$anonfun$sortExtents$2$$anonfun$apply$12.apply(ResolverUtilities.scala:116)
at scalaz.$bslash$div.flatMap(Either.scala:135)
...
This is an issue with Java's default sorting algorithm (TimSort) that has replaced MergeSort in Java 6. Defaulting back to MergeSort does the trick:
-Djava.util.Arrays.useLegacyMergeSort=true
Suggested fix is to add this to the entry point of the converter:
When testing version 0.9.3 of the converter, it failed with the following exception:
This is an issue with Java's default sorting algorithm (TimSort) that has replaced MergeSort in Java 6. Defaulting back to MergeSort does the trick:
Suggested fix is to add this to the entry point of the converter: