NumericalIntegration ClassNotFound

I know this was discussed on the Discord recently, but I don’t remember the solution, and I didn’t see a post about it here.

Simulator GUI Initializing.
Simulator GUI Initialized!
HAL Extensions: Successfully loaded extension
********** Robot program starting **********
Default simulationInit() method... Override me!
Error at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass( Unhandled exception: java.lang.ClassNotFoundException: edu.wpi.first.wpilibj.system.NumericalIntegration
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(
        at java.base/java.lang.ClassLoader.loadClass(
        at edu.wpi.first.wpilibj.simulation.DifferentialDrivetrainSim.update(DNT: server: client CONNECTED: port 52695

What’s up with the NumericalIntegration class? Why does WPILib 2021.1.2 have a reference to a class that’s not included, and how can I work around it?

1 Like

This error would be caused by somehow mixing two versions of the underlying libraries, specifically mixing wpilibj package version 2021.2.1 with wpimath package version 2021.1.2. What is your build setup? You might try doing a clean and/or upgrading to 2021.2.1.

Yep. As usual, it’s an outdated library issue.

1 Like

I had the same issue come up without any changes to my libraries when I was on 2021.1.2. It was very odd.

Are you using vscode as your development environment?

The error came up when simulating through VS Code but the project was opened in IntelliJ before.

Would you mind sharing your robot code?

Sure, I had issues when I was writing the code in this commit. As a temporary workaround at the time, I manually changed build.gradle to use 2021.2.1.