Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Troubleshooting

cyrille-artho edited this page Feb 3, 2021 · 2 revisions

Java and Scala versions

The main potential cause of problems is the JDK/Scala configuration.

Modbat is compiled using gradle, which automatically pulls the right Java version (11 at the time of writing) and Scala version (2.11 as of now) for compilation.

At run-time, however, the configuration of the local system is used. This also applies if you use the scripts from the tutorial.

If the Java and Scala versions of your system does not match the one used by gradle, you will get a message such as:

java.lang.UnsupportedClassVersionError: modbat/mbt/ExtraArgumentsException has been compiled by a more recent version of the Java Runtime (class file version 56.0), this version of the Java Runtime only recognizes class file versions up to 52.0.

In this case, the local JDK is configured to be older than the one used for compilation.

Java

  • Check the output of java -version; it should match the version used by Modbat in the compilation.

  • Use export JAVA_HOME=... to set the right default Java version. The exact value is system dependent, but a web search for "Java version JAVA_HOME [OS_NAME]" finds the right information for the given value of [OS_NAME] (use your operating system there).

Scala

  • Check the output of scala -version; it should match the version used by Modbat in the compilation.

  • Make sure the right version of Scala appears first in your PATH, or use other ways to select it as default.

Installation

Building from source

Model syntax

Basic usage

Run examples

Read the error trace

Semantics of model

Preconditions, assertions and inheritance

Testing Modbat

Advanced features

API functions

Observer models

Annotations

Helper method annotations

Field annotations

Visualization

Basic visualization

Compile your own model and replaying traces

Other test configuration options

References

Semantics of basic models

Clone this wiki locally