![]() |
Unhandled exception instantiating robot: No Robot Code
Hello again, I am a member of team 4528 and recently we ran into some issues with putting code into the roboRio. Since then we have called National Instruments and re-imaged the roboRio and re-installed the java 8 jdk. We initially thought that this would clear the roboRio and that it would work again since we heard that we may have caused the code to crash by building conflicting codes. However even after the wipe the following error appeared in the DriverStation logs:
Code:
ERROR Unhandled exception instantiating robot org.usfirst.frc.team4528.robot.Robot java.lang.ClassNotFoundException: org.usfirst.frc.team4528.robot.Robot at [java.net.URLClassLoader$1.run(URLClassLoader.java:372), java.net.URLClassLoader$1.run(URLClassLoader.java:361), java.security.AccessController.doPrivileged(Native Method), java.net.URLClassLoader.findClass(URLClassLoader.java:360), java.lang.ClassLoader.loadClass(ClassLoader.java:424), sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308), java.lang.ClassLoader.loadClass(ClassLoader.java:357), java.lang.Class.forName0(Native Method), java.lang.Class.forName(Class.java:259), edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:197)]Code:
Buildfile: C:\Users\Developer\workspace\FRC2015\build.xmlNote: we are using code that was previously functional. Code:
package org.usfirst.frc.team4528.robot;Code:
package org.usfirst.frc.team4528.robot; |
Re: Unhandled exception instantiating robot: No Robot Code
Did you rename your main class after creating the project?
|
Re: Unhandled exception instantiating robot: No Robot Code
Yes, I did. I renamed it Robot15 from Robot.
|
Re: Unhandled exception instantiating robot: No Robot Code
Do you think that maybe by changing the main classes name the RobotBase.class can't call it by name?
|
Re: Unhandled exception instantiating robot: No Robot Code
If you create a new project from the template, and deploy it to the robot, does it have the same behavior?
|
Re: Unhandled exception instantiating robot: No Robot Code
It should since the initial project was created by me as well. But that's just my logic, I'm not 100% certain.
|
Re: Unhandled exception instantiating robot: No Robot Code
I also deleted the other templates so that they wouldn't conflict with the current code, so there is only one project.
|
If you renamed the main project then you need to change the build settings since it's still looking for your code in the Robot.java class
|
Re: Unhandled exception instantiating robot: No Robot Code
If you rename the Robot class, you need to change the settings in the build.properties file of your project.
|
Re: Unhandled exception instantiating robot: No Robot Code
Could you give the steps to doing this, I would really appreciate it. Thanks in advance.
|
Re: Unhandled exception instantiating robot: No Robot Code
Here is how to solve this issue:
Open Eclipse and in the package explorer on the left side of the screen, click the arrow next to the name of your project. Towards the bottom of the new entries, you should see a file called "build.properties". Double click on that file to open it. Now, where it says "package=", write the package that your main class is in after the "=", and where it says "robot.class=${package}.Robot", change whatever is after the "." to what your main class is called. We had this exact same issue and these are the steps we took to solve it. |
Re: Unhandled exception instantiating robot: No Robot Code
I had the same error for a while. If you find that the DS is telling you to look in RobotBase.java, then it is an error on your end. Try checking all pwm channels that you are using and maybe changing them out. I'm not sure if there is a specific reason why you are using higher numbered pwm channels. But, 0-3 should work perfectly.
|
| All times are GMT -5. The time now is 10:56. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi