Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Trouble running on cRIO from Netbeans (http://www.chiefdelphi.com/forums/showthread.php?t=124422)

jfitz0807 10-01-2014 13:09

Trouble running on cRIO from Netbeans
 
I am trying to set up my personal laptop (Windows 8) to be a second driver station and an extra programming seat. I successfully set up NetBeans (i586 version) including the plugins and also installed the driver station.

Using the driver station, I verified communication with the robot and got to the "No Robot Code Loaded" indication on the left side of the driver station GUI.

I tried to download a quickie test driver program and this is where I ran into trouble. The test project is called DriveProto and it was built from the RobotBuilder tool. We entered our team number in the RobotBuilder and we can see that team number in the include statements in the java code. When I try to download using Netbeans "run", it says that it can't send the code to the robot because it is looking for frc0000.

Previously, as a test of the RobotBuilder tool, I created a project called RobotBuilderTest. In this project, I did not set the team number, so this project does have frc0000 in the includes. I never had any intentions of running this code, so I wasn't concerned about the team number.

Here's the funny part:

When I try to build DriveProto, the output window gets named "RobotBuilderTest". It looks like the frc0000 from my RobotBuilderTest project is geting "stuck" somewhere in my Netbeans environment even though I have long since deleted the RobotBuilderTest project.

So, I tried to clean things up. I deleted DriveProto and uninstalled NetBeans. I also deleted the sunspotfrcsdk directory and my AppData/Roaming/Netbeans directory. I reinstalled Netbeans and the FRC plugins and cloned my DriveProto repository from GitHub. When I tried to build DriveProto this time, it named the output window again with RobotBuilderTest. This was last night after our build meeting so I haven't been able to try to download this to the robot to see whether it complains about the frc0000 again. I suspect it will.

Note that I did leave a previous unrelated project in my Documents/NetbeansProjects folder when I uninstalled Netbeans and cleaned everything else up.

Any thoughts on what's going on?

My next step will be to create a new user account on my laptop and install Netbeans fresh to that account and see what happens. I'd prefer not to have to do that so any thoughts anyone has are greatly appreciated.

notmattlythgoe 10-01-2014 13:14

Re: Trouble running on cRIO from Netbeans
 
Try right clicking on the project and selecting run from there instead of using the run button at the top.

jfitz0807 10-01-2014 13:30

Re: Trouble running on cRIO from Netbeans
 
Already tried that before cleaning things out and it still had the RobotBuilderTest frc0000 problem. I don't know if I tried that after re-installing, but I'm not hopeful.

Joe Ross 10-01-2014 13:57

Re: Trouble running on cRIO from Netbeans
 
The team number in RobotBuilder doesn't mean anything. You also have to set the team number in Netbeans. See http://wpilib.screenstepslive.com/s/...s-installation

jfitz0807 10-01-2014 15:27

Re: Trouble running on cRIO from Netbeans
 
Thank you!

I guess I missed that step (he says with a sheepish grin).

jfitz0807 10-01-2014 19:58

Re: Trouble running on cRIO from Netbeans
 
Now that I'm on my own laptop at our build meeting, I was able to check again. Actually, the team number was set in Netbeans. I also verified that the team number was set in the cRIO when I re-imaged it. I'm still getting the same error.

Here is the specific feedback I'm getting when we run:

[cRIO] Welcome to LabVIEW Real-Time 13.0
[cRIO] task 0xd00818 (sysapi-rpc) deleted: errno=0 (0) status=0 (0)
[cRIO]
[cRIO] [Squawk VM] Version: 2011 FRC, Nov 5 2011, 14:34:13
[cRIO] Uncaught exception in Thread.run():
[cRIO] on thread org.usfirst.frc0000.Robot - main
[cRIO] java.lang.IllegalArgumentException: MIDlet class specified, org.usfirst.frc0000.Robot, was not found
[cRIO] at com.sun.squawk.imp.MIDletMainWrapper.main(94)
[cRIO] in virtual method #95 of com.sun.squawk.Klass(bci=25)
[cRIO] at com.sun.squawk.Isolate.run(1506)
[cRIO] at java.lang.Thread.run(231)
[cRIO] in virtual method #47 of com.sun.squawk.VMThread(bci=42)
[cRIO] in static method #3 of com.sun.squawk.VM(bci=6)
[cRIO]
[cRIO]
[cRIO] --------------------------------------------------------------------
[cRIO] GCs: 1 full, 0 partial
[cRIO] ** VM stopped: exit code = 1 **

Any thoughts on where the "frc0000" is coming from?

jfitz0807 11-01-2014 16:32

Re: Trouble running on cRIO from Netbeans
 
Finally found out what was happening.

When we initially created the code with the Robot Builder, we did forget to set our team number in the "Java Package" line. We did try to fix it and all of the imports in our java files did get updated from org.usfirst.frc0000 to org.usfirst.frc2877, but somehow, the MANIFEST.MF file in the resources\META-INF folder under the project folder in Netbeans never got updated.


All times are GMT -5. The time now is 22:32.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi