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.
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.
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.
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.
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.
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.
See the previous question. You may need to add '-Djava.awt.headless=true' to your CATALINA_OPTS environment variable.
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".
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.
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.
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.
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.
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.
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”.