26.18. JBuilder

26.18.1. Overview

The JBuilder sensor collects data regarding developer activities using the JBuilder editor. The JBuilder sensor represents this data using the Activity sensor data type (documented in Section 25.2, “Activity”), which represents editing actions and the "state change" event used to generate the Active Time abstraction.

JBuilder is "the leading cross-platform environment for building industrial-strength enterprise Java applications."

26.18.2. Installation

26.18.2.1. Prerequisites

The JBuilder sensor requires Java 1.5.0 or later, and has been tested with JBuilder 2005 Foundation. (We have not verified whether it works with earlier or later versions of JBuilder or with alternative configurations such as Enterprise or Developer).

26.18.2.2. Download HackyInstaller and set your Hackystat Host and User Key

Follow the instructions in Chapter 2, Client-side configuration: Tool sensor installation to set your Hackystat host and user key.

26.18.2.3. Configure and install the JBuilder sensor

In the HackyInstaller main window, select the JBuilder sensor and press "Configure Selected Sensor". Figure 26.34, “ JBuilder sensor installer configuration window ” shows what the configuration window should look like after the path to JBuilder is set, the sensor is enabled, and the "Install" button has been pressed to install the sensor.

Figure 26.34.  JBuilder sensor installer configuration window


JBuilder sensor installer configuration window

This sensor supports the following properties and paths:

  • Enable JBuilder Sensor: This property controls whether the sensor is active or not. If not checked, the sensor will not collect or send data even if installed.

  • JBuilder home directory: This path specifies the top-level directory for JBuilder. The JBuilder sensor requires the placement of a sensor executable into JBuilder's lib/ext/ directory.

26.18.3. Installation verification

26.18.3.1. List Sensor Data

After editing a file in JBuilder for a couple of minutes,exit JBuilder (which will trigger a send of the data to the server). Then login to your account on the Hackystat server, and use the "List Sensor Data" command on the Extras page to verify that Activity data for today's date was received by the server for the "JBuilder" tool.

26.18.3.2. Daily Diary

If the List Sensor Data command verifies that you are receiving data at the server, then the next check is to use the Daily Diary command to verify that state change events are being sent and abstracted into the Most Active File.

Once you have successfully edited a file, verified that it was sent to the server, and found it listed as the Most Active File in the Daily Diary, you can feel confident that the JBuilder sensor is installed correctly and that basic data is being sent to the server.

26.18.4. Installation troubleshooting

26.18.4.1. Troubleshooting general client-server problems

The first step in troubleshooting your sensor installation is to verify that your Hackystat host and key settings are valid and that you can contact the Hackystat server, as described in Section 2.4, “HackyInstaller GUI: Setting and verifying the Hackystat host and user key”

26.18.4.2. Using an incorrect version of JBuilder or Java

A common installation problem is attempting to install the sensor with an unsupported version of JBuilder or Java. Make sure you are using JBuilder 2005 Foundation and Java 1.5.0 or later.

26.18.4.3. Checking client-side logging

The JBuilder sensor writes out a file called jbuilder.0.log to the .hackystat/logs directory that can be useful in debugging your installation. Under normal conditions, this file should look similar to Example 26.42, “jbuilder.0.log file”.

Example 26.42. jbuilder.0.log file

Hackystat Version: 6.5.310 (March 10 2005 10:43:06)
SensorShell started at: 03/10/2005 11:42:20
Type 'help' for a list of commands.
Host: http://hackystat.ics.hawaii.edu/ is available and key is valid.
Defined shell command: Activity
Defined shell command: Coverage
Defined shell command: UnitTest
Defined shell command: BuffTrans
Defined shell command: Build
Defined shell command: FileMetric
#> AutoSend [10]
AutoSend OK (set to 10 minutes)
AutoSend enabled every 10 minutes.
Checking for offline data to recover.
No offline data found.
#> Activity [setTool, JBuilder]
setTool OK
#> Activity [add, Open Project, C:/Borland/JBuilder2005/samples/Welcome/Welcome.jpx]
Activity add OK (1 total)
#> Activity [add, Open File, C:/Borland/JBuilder2005/samples/Welcome/Welcome.html]
Activity add OK (2 total)
#> Activity [add, Open File, C:/Borland/JBuilder2005/samples/Welcome/Foo.java]
Activity add OK (3 total)
#> Activity [statechange, C:/Borland/JBuilder2005/samples/Welcome/Foo.java, 29]
Activity statechange OK (initial file name and buffer size)
#> Activity [statechange, C:/Borland/JBuilder2005/samples/Welcome/Foo.java, 41]
Activity statechange OK (added activity)
#> Activity [statechange, C:/Borland/JBuilder2005/samples/Welcome/Foo.java, 41]
Activity statechange OK (no change)
#> Activity [statechange, C:/Borland/JBuilder2005/samples/Welcome/Foo.java, 41]
Activity statechange OK (no change)
#> Activity [statechange, C:/Borland/JBuilder2005/samples/Welcome/Foo.java, 41]
Activity statechange OK (no change)
#> Activity [statechange, C:/Borland/JBuilder2005/samples/Welcome/Foo.java, 41]
Activity statechange OK (no change)
#> send
Sending sensor data (03/10 11:45:54)
  Activity: Send OK (4 entries)
  Ping: Ping OK (contacted server http://hackystat.ics.hawaii.edu/ with valid key.)
  Coverage: Send OK (No entries to send.)
  AutoSend: AutoSend OK ('send' command ignored)
  BuffTrans: Send OK (No entries to send.)
  UnitTest: Send OK (No entries to send.)
  Build: Send OK (No entries to send.)
  FileMetric: Send OK (No entries to send.)

26.18.4.4. Checking JBuilder startup logging

If you do not find a jbuilder.0.log file in the .hackystat/logs directory, then the most likely reason is that the plugin was not installed successfully. To troubleshoot this situation, change directories to the jbuilder installation directory and invoke JBuilder manually with the -verbose option. This will print out information about the loading of JBuilder, and indicate whether the Hackystat sensor was loaded successfully. Here is an abbreviated version of the output from this form of invocation:

C:\Borland\JBuilder2005\bin>JBuilder.exe -verbose
Scanning manifest from C:\Borland\JBuilder2005\debug\jdi\jdi-win.jar
Scanning manifest from C:\Borland\JBuilder2005\debug\sa\sa-jdi.jar
Scanning manifest from C:\Borland\JBuilder2005\jdk1.4\lib\tools.jar

   <approximately 500 lines of output deleted>

OpenTool org.hackystat.stdext.sensor.jbuilder.JBuilderSensor (716+2ms)

   <approximately 20 more lines deleted>

--- Initializing OpenTools-NodeChooser
OpenTool com.borland.jbuilder.node.ui.NodePackagePage (1+1ms)
OpenTool com.borland.jbuilder.editor.OpenSourceFast (0+1ms)
--- OpenTools-NodeChooser initialized (3ms total)

As you can see, there should be a single line, approximately 20 lines up from the last line printed on startup, that indicates that the hackystat sensor was started. If there is no reference to this line, then the sensor is probably not in the lib/ext folder. If the line is followed by an error message, then the sensor was found but did not load correctly.

26.18.4.5. Submit a trouble report

If none of the above troubleshooting activities solves your problem, then you should send an email to your Hackystat Administrator to request help. Please include in your email the following information:

  • The output from 'java -version'.

  • The output from 'JBuilder.exe -verbose'.

  • The output from 'java -jar sensorshell.jar -verify'.

  • The contents of your sensor.properties file.

  • The contents of the jbuilder.0.log file.

  • A description of the problem you are having.

26.18.5. Uninstallation

To disable JBuilder data collection temporarily, invoke HackyInstaller, bring up the JBuilder configuration window, and uncheck the "Enable JBuilder sensor" property, and apply the setting. To permanently uninstall the JBuilder sensor, press the "Uninstall" button.