xcountry413
01-10-2015, 13:57
I'm a new programmer for my team and am having trouble uploading code to the bot. The output of the program is:
run:
java.lang.ExceptionInInitializerError
Caused by: edu.wpi.first.wpilibj.util.BaseSystemNotInitialize dException: The Interface for the HLUsageReporting was never set.
at edu.wpi.first.wpilibj.HLUsageReporting.reportSched uler(HLUsageReporting.java:21)
at edu.wpi.first.wpilibj.command.Scheduler.<init>(Scheduler.java:92)
at edu.wpi.first.wpilibj.command.Scheduler.getInstanc e(Scheduler.java:48)
at edu.wpi.first.wpilibj.command.Subsystem.<init>(Subsystem.java:60)
at org.usfirst.frc.team2022.robot.subsystems.TankDriv eSubsystem.<init>(TankDriveSubsystem.java:21)
at org.usfirst.frc.team2022.robot.Robot.<clinit>(Robot.java:25)
Exception in thread "main" Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)
I'm not sure what the HLUsageReporting is and what the exception is saying.
Here's the code for the main class:
package org.usfirst.frc.team2022.robot;
import org.usfirst.frc.team2022.robot.commands.Compressor Command;
import org.usfirst.frc.team2022.robot.commands.ForkliftCo mmand;
import org.usfirst.frc.team2022.robot.commands.IntakeComm and;
import org.usfirst.frc.team2022.robot.commands.TankDriveC ommand;
//import org.usfirst.frc.team2022.robot.commands.autonomous .Autonomous;
import org.usfirst.frc.team2022.robot.subsystems.Forklift Subsystem;
import org.usfirst.frc.team2022.robot.subsystems.GyroSubs ystem;
import org.usfirst.frc.team2022.robot.subsystems.IntakeSu bsystem;
import org.usfirst.frc.team2022.robot.subsystems.TankDriv eSubsystem;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.command.Scheduler;
/**
* The VM is configured to automatically run this class, and to call the
* functions corresponding to each mode, as described in the IterativeRobot
* documentation. If you change the name of this class or the package after
* creating this project, you must also update the manifest file in the resource
* directory.
*/
public class Robot extends IterativeRobot {
public static final TankDriveSubsystem tankSubsystem = new TankDriveSubsystem();
public static final ForkliftSubsystem forkliftSubsystem = new ForkliftSubsystem();
public static final GyroSubsystem gyroSubsystem = new GyroSubsystem();
public static OI oi;
public static final IntakeSubsystem intakeSubsystem = new IntakeSubsystem();
// CommandGroup autonomousCommand;
TankDriveCommand tankCommand;
ForkliftCommand forkliftCommand;
IntakeCommand intakeCommand;
CompressorCommand compressorCommand;
/**
* This function is run when the robot is first started up and should be
* used for any initialization code.
*/
@Override
public void robotInit() {
oi = new OI();
// instantiate the command used for the autonomous period
// autonomousCommand = new Autonomous();
// instantiate the real commands
tankCommand = new TankDriveCommand();
forkliftCommand = new ForkliftCommand();
intakeCommand = new IntakeCommand();
compressorCommand = new CompressorCommand();
}
@Override
public void disabledPeriodic() {
Scheduler.getInstance().run();
}
@Override
public void autonomousInit() {
// schedule the autonomous command
// if (autonomousCommand != null)
// autonomousCommand.start();
}
/**
* This function is called periodically during autonomous
*/
@Override
public void autonomousPeriodic() {
Scheduler.getInstance().run();
}
@Override
public void teleopInit() {
// if (autonomousCommand != null)
// autonomousCommand.cancel();
tankCommand.start();
forkliftCommand.start();
intakeCommand.start();
compressorCommand.start();
}
/**
* This function is called when the disabled button is hit. You can use it
* to reset subsystems before shutting down.
*/
@Override
public void disabledInit() {
//
}
/**
* This function is called periodically during operator control
*/
@Override
public void teleopPeriodic() {
Scheduler.getInstance().run();
}
/**
* This function is called periodically during test mode
*/
@Override
public void testPeriodic() {
}
}
The error in the subsystem is at the constructor of the class. Any help is appreciated
run:
java.lang.ExceptionInInitializerError
Caused by: edu.wpi.first.wpilibj.util.BaseSystemNotInitialize dException: The Interface for the HLUsageReporting was never set.
at edu.wpi.first.wpilibj.HLUsageReporting.reportSched uler(HLUsageReporting.java:21)
at edu.wpi.first.wpilibj.command.Scheduler.<init>(Scheduler.java:92)
at edu.wpi.first.wpilibj.command.Scheduler.getInstanc e(Scheduler.java:48)
at edu.wpi.first.wpilibj.command.Subsystem.<init>(Subsystem.java:60)
at org.usfirst.frc.team2022.robot.subsystems.TankDriv eSubsystem.<init>(TankDriveSubsystem.java:21)
at org.usfirst.frc.team2022.robot.Robot.<clinit>(Robot.java:25)
Exception in thread "main" Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)
I'm not sure what the HLUsageReporting is and what the exception is saying.
Here's the code for the main class:
package org.usfirst.frc.team2022.robot;
import org.usfirst.frc.team2022.robot.commands.Compressor Command;
import org.usfirst.frc.team2022.robot.commands.ForkliftCo mmand;
import org.usfirst.frc.team2022.robot.commands.IntakeComm and;
import org.usfirst.frc.team2022.robot.commands.TankDriveC ommand;
//import org.usfirst.frc.team2022.robot.commands.autonomous .Autonomous;
import org.usfirst.frc.team2022.robot.subsystems.Forklift Subsystem;
import org.usfirst.frc.team2022.robot.subsystems.GyroSubs ystem;
import org.usfirst.frc.team2022.robot.subsystems.IntakeSu bsystem;
import org.usfirst.frc.team2022.robot.subsystems.TankDriv eSubsystem;
import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.command.Scheduler;
/**
* The VM is configured to automatically run this class, and to call the
* functions corresponding to each mode, as described in the IterativeRobot
* documentation. If you change the name of this class or the package after
* creating this project, you must also update the manifest file in the resource
* directory.
*/
public class Robot extends IterativeRobot {
public static final TankDriveSubsystem tankSubsystem = new TankDriveSubsystem();
public static final ForkliftSubsystem forkliftSubsystem = new ForkliftSubsystem();
public static final GyroSubsystem gyroSubsystem = new GyroSubsystem();
public static OI oi;
public static final IntakeSubsystem intakeSubsystem = new IntakeSubsystem();
// CommandGroup autonomousCommand;
TankDriveCommand tankCommand;
ForkliftCommand forkliftCommand;
IntakeCommand intakeCommand;
CompressorCommand compressorCommand;
/**
* This function is run when the robot is first started up and should be
* used for any initialization code.
*/
@Override
public void robotInit() {
oi = new OI();
// instantiate the command used for the autonomous period
// autonomousCommand = new Autonomous();
// instantiate the real commands
tankCommand = new TankDriveCommand();
forkliftCommand = new ForkliftCommand();
intakeCommand = new IntakeCommand();
compressorCommand = new CompressorCommand();
}
@Override
public void disabledPeriodic() {
Scheduler.getInstance().run();
}
@Override
public void autonomousInit() {
// schedule the autonomous command
// if (autonomousCommand != null)
// autonomousCommand.start();
}
/**
* This function is called periodically during autonomous
*/
@Override
public void autonomousPeriodic() {
Scheduler.getInstance().run();
}
@Override
public void teleopInit() {
// if (autonomousCommand != null)
// autonomousCommand.cancel();
tankCommand.start();
forkliftCommand.start();
intakeCommand.start();
compressorCommand.start();
}
/**
* This function is called when the disabled button is hit. You can use it
* to reset subsystems before shutting down.
*/
@Override
public void disabledInit() {
//
}
/**
* This function is called periodically during operator control
*/
@Override
public void teleopPeriodic() {
Scheduler.getInstance().run();
}
/**
* This function is called periodically during test mode
*/
@Override
public void testPeriodic() {
}
}
The error in the subsystem is at the constructor of the class. Any help is appreciated