Tips and Tricks
During the course of development and testing, we've found lots little things that need to be tweaked in order to improve the end-user's experience with Onyx.
This page tries to gather these tips.
Tomcat
Tips related to Apache Tomcat.
The suggested version to install is the latest 6.0.x release.
| These tips assume that you are using Sun's Java Virtual Machine |
SSL (HTTPS)
See SSL Deployment
Allocating Memory to Tomcat
On most default Tomcat installations, the memory allocated to the service is insufficient. It is necessary to increase the memory to the instance of Tomcat that is running Onyx. Doing this depends on the OS you are using. Read-on for OS-specific details.
There are two memory settings that need to be tweaked: -Xmx and -XX:MaxPermSize.
In the examples below, we assume that the server has 2GB of RAM.
- If your server has more RAM, you can increase the -Xmx setting, it is not necessary to increase the -XX:MaxPermSize setting.
- If your server has less than 2GB of RAM, you can decrease the -Xmx and the -XX:MaxPermSize setting, try to keep the same ratio (4:1), but do not allocate less than 128m to -XX:MaxPermSize.
Tomcat on Ubuntu
There are usually two issues encountered with running Tomcat on Ubuntu. The first is due to the use of a Security Manager and the second is due to
Allocating Memory
To allocate memory to your Tomcat instance, you'll need to create an environment variable. If Tomcat was installed using apt, then edit the /etc/default/tomcat6 file.
Disabling the Security Manager
Tomcat as a Windows Service
A default installation of Tomcat does not allocate enough memory to Java. It is highly recommended that you increase Tomcat's allocated memory.
Allocating Memory
When Tomcat is installed as a Windows Service, this can be accomplished by opening the service's settings dialog:

- Righ-click on the Tomcat icon
- Select Configure...

- Select the Java tab
- Add -XX:MaxPermSize=256M to the list of arguments
- Specify the upper bound of the memory allocated to Tomcat (in Megabytes)
| The Maximum Memory Pool setting is the equivalent to passing the -Xmx argument to java |
Printing
When running Tomcat as a Windows Service, make sure that the user running the Tomcat service can use the printer. This is not the case by default. Permissions must be given to the tomcat user in order for Onyx to see the printer you wish to use.
| Can someone provide the way to properly do this? CaG fixed the issue by making Tomcat run as a domain user, then login to the server as that user and install the printer. There's probably a better way of doing this e.g.: install the printer as a "system" printer instead of installing it per-user |
Prism
Tips related to Prism.
The current suggested version of Prism is 0.8.
Prism and Acrobat Reader
Acrobat Reader doesn't seem to work with Prism 0.9 (html embedded PDF document). It is recommended that we use Prism 0.8 for now, until a newer version is released..
Do not have "View documents in preview document mode when signing" checked in Preferences --> Security dialog.
Using Self-Signed SSL Certificates
| TODO: the current solution is to use firefox to accept the certificate and then copy the resulting config file to the prism profile. |
Fullscreen Prism
TODO: there is no easy solution to this right now. There are several ways of doing it:
|
Version 1.0b1
Has F11 (Fullscreen) capability.
You can accept Self-Signed Certificates. No need to copy the firefox config file.
Acrobat Reader works.
It works in Vista.
You will have to add the following lines to the \Documents and Settings\USER NAME\Application Data\Prism\PRISM APP NAME\Profiles*.default\perf.js
Make sure the application is not running at the time you make this change or it will be over ridden when the application is shutdown
| I was hoping to get prism to default with these settings but have not found a way to do this yet. |
Touch Screens
It is recommended to put your touch-screen monitors on "Click on contact" mode. Please avoid any kind of "mouse emulation", since it will complexify the interaction with the touch screen.
Specific Make and Models
Model ? Vendor ?
Do ? to put the monitor into ? mode.
MySQL Database
Consent Form Submission Problems
You may encounter an error when attempting to submit a consent form, especially a large multi-page consent form written in a double-byte character set. This error occurs because the consent form is too large to be stored in the database, which places a limit on the size of items it's willing to store. To get around this, you must modify the MySql database settings to permit larger amounts of data to be stored in the database. The configuration file to edit is my.ini on Window and my.cnf on Linux. Modify or add the max_allowed_packet value.
Start with 3M which means 3 megabytes. If it still doesn't work, increase the value. You will need to restart the MySql database server after making the change.
Electronic Instruments
General Troubleshooting
BadFieldException when Starting an Instrument
This is caused by a bug in the version of Java installed on the workstation. The bug is reported here.
To fix this issue, make sure the Java installed on the workstation is at least 1.6.0_02.
Unable to Save Instrument Data Due to Session Timeout
Once the Java Web Start application for a test begins then the web session timeout counter for the logged in user will no longer be set to zero every time the user interacts with the program. This happens because the user is no longer interacting with the web application, but with a third party instrument application. If the timeout is set too low, say to 5 minutes and the test takes longer than 5 minutes to perform, then the session will timeout and the data from the test will not be saved. (The user will need to log in again, once the test is over.)
During setup ensure that the session timeout value is set to a large enough value to complete all tests. A value of 45 or 60 (minutes) will be adequate to complete instrument tests as well as the Noddle test.
Tanita
Connection for the Tanita scale
If the a serial 9 pin connection is used, the Port Settings for Flow control must be set to Hardware.
Windows instructions
Control Panel in classic view >System > Hardware (tab) > Device Manager (button) > Expand Ports
Double click the port that needs to be changed, usually COM1.
Port settings tab
Set Flow control to Hardware
Achilles Express
The Achilles Express software version 5.11 and previous are know to produce erroneous data. Specifically, the SOS and BUA parameters are not calculated properly. The Stiffness Index is correct though.
Version 5.12 and above of the software fixes this issue.
Miscellaneous
Onyx Configuration
Please make sure that you configured Onyx to run in deployment mode when running in a production environment. This is very important since this will improve the overall performance of the application. You can do this by setting up the following property in onyx-config.properties (see Onyx config directory):
# Onyx Web application mode: deployment or development
org.obiba.onyx.webapp.configurationType=deployment