ModelInference / synoptic

Inferring models of systems from observations of their behavior
Other
81 stars 25 forks source link

Internal Synoptic error: ClassCastException #420

Open MJafarMashhadi opened 5 years ago

MJafarMashhadi commented 5 years ago
$ java -version
java version "10.0.2" 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)
$ uname -a
Darwin MJafars-MacBook-Pro.local 18.0.0 Darwin Kernel Version 18.0.0: Wed Aug 22 20:13:40 PDT 2018; root:xnu-4903.201.2~1/RELEASE_X86_64 x86_64
$ ./synoptic.sh thread-8736-io.txt
Error: java.base/java.util.regex.Matcher$ImmutableMatchResult cannot be cast to java.base/java.util.regex.Matcher
Error traceback:
java.lang.ClassCastException: java.base/java.util.regex.Matcher$ImmutableMatchResult cannot be cast to java.base/java.util.regex.Matcher
    at synoptic.util.matching.NamedMatcher.<init>(NamedMatcher.java:22)
    at synoptic.util.matching.NamedMatcher.toMatchResult(NamedMatcher.java:59)
    at synoptic.main.parser.TraceParser.parseLine(TraceParser.java:908)
    at synoptic.main.parser.TraceParser.parseTrace(TraceParser.java:697)
    at synoptic.main.parser.TraceParser.parseTraceFile(TraceParser.java:607)
    at synoptic.main.AbstractMain.parseEvents(AbstractMain.java:438)
    at synoptic.main.AbstractMain.parseIntoTraceGraph(AbstractMain.java:697)
    at synoptic.main.AbstractMain.createInitialPartitionGraph(AbstractMain.java:544)
    at synoptic.main.SynopticMain.main(SynopticMain.java:47)

    at synoptic.util.InternalSynopticException.wrap(InternalSynopticException.java:88)
    at synoptic.main.SynopticMain.main(SynopticMain.java:54)
ohmann commented 5 years ago

My first guess would be that it's a Java 10 issue. I think the latest Java version I personally have run Synoptic under is 8. By chance do you also have any earlier JRE versions installed?

MJafarMashhadi commented 5 years ago

That was my first guess, so I checked the ant build files and realized that the compiler is targeted to Java 7 (https://github.com/ModelInference/synoptic/blob/master/synoptic/build.xml#L48).

I don't have other java versions installed right now, do you think that if I install an older version of JRE, say 8, the error will be gone?

donghwan-shin commented 5 years ago

The same issue here. I resolve this issue by switching Java8 from Java11. It solved for me.

tuotuoZ commented 3 years ago

Same here, I switched to Java8 from Java14. Should this be mentioned in the setup tutorial? The setup guide only says it should be JRE 7 or higher for the moment.