ClassNotFoundException thrown from RevLib

Hi all,
When we added Sparks to our code, we started hitting crashes due to a ClassNotFoundException thrown from RevLib:

********** Robot program starting **********
NT: server: client CONNECTED: 10.25.22.163 port 65205
Unhandled exception: java.lang.ClassNotFoundException: edu.wpi.first.wpiutil.RuntimeLoader
Error at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source): Unhandled exception: java.lang.ClassNotFoundException: edu.wpi.first.wpiutil.RuntimeLoader
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
The robot program quit unexpectedly. This is usually due to a code error.
The above stacktrace can help determine where the error occurred.
See https://wpilib.org/stacktrace for more information.
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
The startCompetition() method (or methods called by it) should have handled the exception above.
at com.revrobotics.jni.RevJNIWrapper.<clinit>(RevJNIWrapper.java:42)
at com.revrobotics.CANSparkMaxLowLevel.<clinit>(CANSparkMaxLowLevel.java:38)
at frc.robot.subsystems.ClimberSubsystem.<init>(ClimberSubsystem.java:21)
at frc.robot.RobotContainer.<init>(RobotContainer.java:31)
at frc.robot.Robot.robotInit(Robot.java:29)
at edu.wpi.first.wpilibj.TimedRobot.startCompetition(TimedRobot.java:107)
at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:373)
at edu.wpi.first.wpilibj.RobotBase.startRobot(RobotBase.java:463)
at frc.robot.Main.main(Main.java:23)
Warning at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:388): The robot program quit unexpectedly. This is usually due to a code error.
The above stacktrace can help determine where the error occurred.
See https://wpilib.org/stacktrace for more information.
Error at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:395): The startCompetition() method (or methods called by it) should have handled the exception above.
[phoenix-diagnostics] Server shutdown cleanly. (dur:10|0)
[phoenix] Library shutdown cleanly
[phoenix-diagnostics] Server shutdown cleanly. (dur:10|0)

We found the same issue posted in this thread: edu.wpi.first.wpiutil.RuntimeLoader Not Found - Technical / Programming - Chief Delphi
but our RevLib does not appear to be out of date:

Screenshot 2022-02-20 110524

Our code is here: royal-robotics/frc-2022-robot (github.com)

Any help would be greatly appreciated! Thanks!

You need to be using 1.1.0 of swervelib. 1.0.0 doesn’t work in 2022, and causes that issue.

1 Like

Yup, works now. Thanks!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.