8.7. Common server installation problems and solutions

8.7.1. Overview

Unfortunately, installation of the Hackystat server does not always go completely smoothly. This section describes some common problems that have occurred and how to solve them.

8.7.1.1. I can't see the Hackystat startup message in Unix.

If you start up Tomcat in Unix using 'startup.sh', the console output does not appear. To make the current shell the console window for Tomcat under Unix, start up Tomcat using 'catalina.sh run'. You will then need to create a second shell window for execution of your Ant commands like hackyCore_Build.deployDist, and all.junit.

8.7.1.2. The "TimeZoneChanger" reports an error during Hackystat initialization to the Tomcat console.

Some of our test data in the 'testdataset' user account must be altered if Hackystat tests are run outside of Hawaiian Standard Time. The "TimeZoneChanger" runs during initialization to make these changes. If your server is not located in Hawaiian Standard Time, and you have not set the property hackystat.timezone in your hackystat.site.properties file to your local timezone, the TimeZoneChanger will report an error and subsequent unit tests may fail.

To fix this, you should set the hackystat.timezone property to the value recommended by TimeZoneChanger in its error message, then shutdown Tomcat, redeploy Hackystat, and start up Tomcat again.

8.7.1.3. When I run 'ant -q junitAll', some unit tests fail. What do I do next?

First, check to make sure that the TimeZoneChanger has not thrown an error by consulting the Tomcat console window for the Hackystat initialization message. If it has thrown an error, you must set the timezone, redeploy Hackystat, and rerun the test cases. If that isn't the problem, keep reading.

8.7.1.4. When I run Ant, it says there is a problem finding the tools.jar file.

This typically results from incorrect installation of Java or Ant in the C:\Program Files directory. Check to make sure that Java, Ant, and Tomcat are not installed in C:\Program Files, as discussed in Section 8.4, “Build tools installation”. Re-install these tools in a directory not containing spaces and try again. You might also consider sending a strongly worded email to Microsoft about their decision to include a space character in a key directory name.

8.7.1.5.  Several unit tests in hackyReport fail. The detailed JUnit failure message indicates a problem with my DISPLAY variable. How do I fix this?

You are getting this failure because you are running Hackystat under Unix in a 'headless' environment where no X Windows process is available to the Java graphics routines. To fix this problem, you need to do two things.

First, add the property 'java.awt.headless=true' to your hackystat.site.properties file. This will inform the Java process running the test cases that X Windows is not available for graphics, and will resolve the test case failures.

Second, you need to inform the Java process running Tomcat of the headless environment, otherwise chart graphics will not be generated successfully. To do this, add '-Djava.awt.headless=true' to your CATALINA_OPTS environment variable, and restart Tomcat.

8.7.1.6. I get broken links when I try to display charts in my browser from the server.

See the previous question. You may need to add '-Djava.awt.headless=true' to your CATALINA_OPTS environment variable.

8.7.1.7. I updated a value in my hackystat.site.properties file, but the server does not reflect this change!

Whenever you update any values in hackystat.site.properties, you must redeploy your Hackystat web application in order for the server to see the changes. For a binary configuration installation, this involves invoking "ant -q hackyCore_Build.deployDist".

8.7.1.8. I have set hackystat.host to http://localhost:8080/hackystat in my hackystat.site.properties file, and I cannot get any data sent to the server.

The problem is that hackystat.host should be set to http://<hostname>, not http://<hostname>/hackystat. Note that the "context root" for the hackystat web application within your server defaults to "hackystat", and this string is added to the value of hackystat.host when sending data. Under the rare circumstances where you need to deploy the hackystat web application using another context root, you can specify hackystat.context.root in your hackystat.site.properties file.

8.7.1.9.  When I run the junit tests, I get a bunch of unit test failures involving the org.hackystat.kernel.admin package, but the other tests pass!

This problem typically occurs when you have not set the hackystat.admin.userkey value in your hackystat.site.properties file or it is set to the wrong value. To diagnose this, first check to see that you have set this value in your hackystat.site.properties file. Next, check the value of the admin user key that is printed out to the Tomcat console on server startup, and make sure the two values are the same. Finally, bring up a browser, and once the Hackystat startup summary message has appeared in the Tomcat console, try to log in with the Admin user key and check to see if the "Admin" link appears in the navigation bar (which indicates that Hackystat has recognized this key as the Admin user key). Once you can login as the Admin user and see the Admin page, and this user key is present in your hackystat.site.properties file, then follow the directions for restarting the server. Note that whenever you edit the hackystat.site.properties file, you need to redeploy the server for it to see your changes.

8.7.1.10.  When I start up the server, I see a message in the console warning me about a user email with a duplicate user key!

This occurs when the Hackystat user data directory contains two accounts, each of which is assigned to the same user email. In Hackystat, there must be a one-to-one correspondence between user keys and user emails. Upon server startup, the Hackystat web application reads the contents of the users directory in the hackystat.data.dir directory. It uses the names of the subdirectories to determine the set of currently defined user keys. It next reads the user.default.xml file in each of these subdirectories in order to determine the user email to be associated with this user key. The warning you see is generated when it discovers a subdirectory that contains in its user.default.xml file a user email that is the same as a previously processed user subdirectory. To fix this problem, you must first shut down the server, then manually edit the users directory to eliminate this duplication. Once the users directory does not contain the duplicate user key/user email situation, start up the server and check to make sure the warning no longer appears.

8.7.1.11.  I would like to have a separate admin account and user account that share the same email.

This is not possible; each email address must map to one and only one hackystat account. Fortunately, there's really no problem having a user who is also an administrator.

8.7.1.12.  I am getting an error involving java.lang.NoClassDefFoundError: javax/servlet/ServletContext.

In Tomcat 4.x, the jar file containing servlet definitions is called servlet.jar. In Tomcat 5.x, the jar file containing servlet definitions is called servlet-api.jar. Hackystat, as of release 6.5, looks for the servlet definitions in servlet-api.jar by default. Thus, if you are using Tomcat 4.x, you will get this error. (Of course, you shouldn't be using Tomcat 4.x at all as of Version 7.0!) To override the default, you must define the property tomcat.servlet.jar.filename=servlet.jar in your hackystat.site.properties file and redeploy the system.

8.7.1.13. I get an error message saying that CHECKSTYLE_HOME is not set.

If you are running freshStart and certain other targets on the source distribution, then Checkstyle is invoked. If you have not installed Checkstyle correctly, then you will get this error message.

To fix this, follow the Checkstyle installation instructions in Section 8.5.8, “[Source only] Install Checkstyle”.

8.7.1.14.  I'm having a problem and none of your advice is helping!

I'm sorry. The next step is to fill out the Server Installation Problem Report and send it to Philip Johnson (johnson@hawaii.edu). We will do our best to help you resolve your problem.

8.7.2. Summary

This section hopefully addressed the most common known problems in configuration and installation of the Hackystat server. The next section describes how to send in a Server Problem Report when you have encountered a problem that you cannot solve on your own.