Bottom of Page | Previous Page | Next Page | Contents

Troubleshooting HATS

This chapter provides information that enables you to use message logs and traces to diagnose problems that could occur when users interact with your HATS application. It also outlines some problems that could be encountered, and solutions to those problems.

Message logs and traces

When a HATS application runs in the WebSphere Application Server, logging and tracing is performed for the application. Logging and tracing is controlled by the settings of the runtime.properties file. The location of this file differs between the machine where you installed HATS Studio and the server machine where your applications run:

HATS Studio (for the Run on Server function)
HATS Studio files are stored on your system under the drive and directory where you installed your WebSphere Studio program, such as WebSphere Studio Application Developer. In the workspace subdirectory, a folder with the Enterprise Application project name you specified when you created your project resides. The path to the runtime.properties file is /workspace/fn.ear/runtime.properties, where fn is the Enterprise Application project name. You can also locate the file on the Navigator tab of the HATS Studio under the /fn.ear/ folder. Double-click the runtime.properties file to open the file in a HATS Studio editor.
Server
In the drive and directory where you installed WebSphere, there is a folder named installedApps. In the installedApps subdirectory, a folder with the Enterprise Application project name you specified when you created your project resides. The path to the runtime.properties file is /installedApps/fn.ear/runtime.properties, where fn is the Enterprise Application project name.

You can use any text editor to modify the runtime.properties file. If you modify the file, you must stop and restart the server that is running the application for the changes to take effect.

The runtime.properties file contains the following basic properties:

Note:
Names of the properties are case-sensitive. Do not change the property names.
num_licenses
Specifies the number of licenses you purchased. HATS tracks the number of HATS connections to host resources and logs a message when the value exceeds the number of licenses purchased.

The value is an integer. There is no default. Specify num_licenses = - 1 if you purchased an unlimited license.

licenseTracking
Specifies whether HATS tracks license usage or not. The value is binary. The default is 0.
0
HATS does not track license usage.
1
HATS tracks license usage for all application servers in a node. The license usage information is written to a file named licensex.txt in the log directory of the HATS application installation directory on the server, where the x is either 1 or 2.

The maximum size of the license usage files is 512 KB. When the file size of the license1.txt file reaches 512 KB, the file is renamed to license2.txt and a new license1.txt file is created. The new license1.txt file contains the most recent license usage information. When the new license1.txt reaches 512 KB and is renamed, the old license2.txt is deleted.

The license usage files contain the following information, arranged in rows, with each row representing one hour of operation. The values are separated by a space ( ).

  1. Date
  2. Time
  3. The highest license count since the application was started
  4. The highest license count in the last hour (the maximum of the last 60 entries)
  5. The license count for each minute (1- 60)
maxTraceFiles
The maximum number of trace information files. The default is 5.

The base trace file name in runtime.properties is used as a template to generate unique sets of trace files for each application server. The default base name for a trace file is trace.txt, which can be changed.

An index (1, 2, 3, and so forth) is added to this name to distinguish multiple trace files. When trace1.txt reaches maxTraceFileSize, it is closed and renamed to trace2.txt. A new trace1.txt file is opened.

When the maxTraceFiles number is exceeded, the oldest file is deleted.

The location of the trace*.txt files differs between the machine where you installed HATS Studio and the server machine where your applications run:

HATS Studio (for the Run on Server function)
HATS Studio files are stored on your system under the drive and directory where you installed your WebSphere Studio program, such as WebSphere Studio Application Developer. In the workspace subdirectory, a folder with the Enterprise Application project name you specified when you created your project resides. In the Enterprise Application project name directory, there is a /logs directory. The path to the trace*.txt files is /workspace/fn.ear/logs/trace*.txt, where fn is the Enterprise Application project name.
Server
In the drive and directory where you installed WebSphere, there is a folder named installedApps. In the installedAppssubdirectory, a folder with the Enterprise Application project name you specified when you created your project resides. The path to the trace*.txt files is installedApps/fn.ear/logs/trace*.txt, where fn is the Enterprise Application project name.
maxTraceFileSize
Specifies the maximum size, in kilobytes, that a trace file reaches before an additional trace file is opened.

The value is a decimal integer. The default is 1024 KB.

traceFile
The name used as a template to generate file names for each set of application server files to which trace messages are written. The default base name for a trace file is trace.txt.
maxLogFiles
The maximum number of message files. The default is 2.

The base message log file name in runtime.properties is used as a template to generate unique sets of message log files for each application server. The default base name for a log file is messages.txt, which can be changed.

An index (1, 2, 3, and so forth) is added to this name to distinguish multiple message log files. When messages1.txt reaches maxLogFileSize, it is closed and renamed to messages2.txt. A new messages1.txt file is opened.

When the maxLogFiles number is exceeded, the oldest file is deleted.

The location of the messages*.txt files differs between the machine where you installed HATS Studio and the server machine where your applications run:

HATS Studio (for the Run on Server function)
HATS Studio files are stored on your system under the drive and directory where you installed your WebSphere Studio program, such as WebSphere Studio Application Developer. In the workspace subdirectory, a folder with the Enterprise Application project name you specified when you created your project resides. In the Enterprise Application project name directory, there is a /logs directory. The path to the messages*.txt files is /workspace/fn.ear/logs/messages*.txt, where fn is the Enterprise Application project name.
Server
In the drive and directory where you installed WebSphere, there is a folder named installedApps. In the installedAppssubdirectory, a folder with the Enterprise Application project name you specified when you created your project resides. The path to the messages*.txt files isinstalledApps/fn.ear/logs/messages*.txt, where fn is the Enterprise Application project name.
maxLogFileSize
Specifies the maximum size, in kilobytes, that a message log file reaches before an additional log file is opened.

The value is a decimal integer. The default is 512 KB.

logFile
The name used as a template to generate file names for each set of application server files to which log messages are written. The default base name for a trace file is messages.txt.

The runtime.properties file contains the following HATS server tracing properties:

trace.RUNTIME
Specifies the level of tracing for the main runtime and for all settings under RUNTIME.* that do not specify a trace level.

The value is an integer from 0-9. The default is 0.

See the description of the tracelevel.* keys for information on values for this setting.

trace.RUNTIME.WIDGET
Specifies the level of tracing for HATS widgets. This setting overrides the setting of trace.RUNTIME for tracing of widgets.

The value is an integer from 0-9. The default is 0.

See the description of the tracelevel.* keys for information on values for this setting.

trace.RUNTIME.ACTION
Specifies the level of tracing for HATS event actions. This setting overrides the setting of trace.RUNTIME for tracing of event actions.

The value is an integer from 0-9. The default is 0.

See the description of the tracelevel.* keys for information on values for this setting.

trace.RUNTIME.COMPONENT
Specifies the level of tracing for HATS components. This setting overrides the setting of trace.RUNTIME for tracing of components.

The value is an integer from 0-9. The default is 0.

See the description of the tracelevel.* keys for information on values for this setting.

trace.UTIL
Specifies the level of tracing for HATS runtime utilities.

The value is an integer from 0-9. The default is 0.

See the description of the tracelevel.* keys for information on values for this setting.

tracelevel.x
Each of the tracelevel keys specifies as its value a hexadecimal digit string. This string is a mask which is applied to the tracing feature for components which use that trace level. Each bit of the digit string controls one type of tracing for HATS.

The values of tracelevel.1 through tracelevel.7 should not be changed unless requested by IBM support. Otherwise, specifying these seven tracelevel.* properties is not necessary.

Tracelevel.8 and tracelevel.9 values can be used to create customized tracing levels.

The default values are:

tracelevel.1
0000000000020000
tracelevel.2
000000000000020f
tracelevel.3
000000000004023f (minimum)
tracelevel.4
0000000000041a3f
tracelevel.5
00000000000c1bbf (normal)
tracelevel.6
00000000000c1bbf
tracelevel.7
00000000001c1bbf (maximum)
tracelevel.8
00000000001c1bbf
tracelevel.9
00000000001c1bbf

To customize the trace masks, add together the following (hex) values:

x000001
Informational messages
x000002
Warning messages
x000004
Error messages
x000008
Critical error messages
x000010
API traces
x000020
Callback API traces
x000080
Method entry
x000100
Method exit
x000200
Exceptions
x000400
Miscellaneous traces
x000800
Object creation
x001000
Object disposal
x020000
Reserved
x040000
Miscellaneous data - level 1
x080000
Miscellaneous data - level 2
x100000
Miscellaneous data - level 3

The runtime.properties file contains the following Host On-Demand tracing properties:

Note:
You should not enable the Host On-Demand traces (except for PSEVENT, OIAEVENT, and COMMEVENT) unless requested by IBM Support.
trace.HOD.PS
Specifies the level of Host On-Demand presentation space tracing.

The value is an integer from 0-3. The default is 0.

trace.HOD.DS
Specifies the level of Host On-Demand data stream tracing.

The value is an integer from 0-3. The default is 0.

trace.HOD.TRANSPORT
Specifies the level of Host On-Demand transport tracing.

The value is an integer from 0-3. The default is 0.

trace.HOD.MACRO
Specifies the level of tracing for Host On-Demand macros.

The value is an integer from 0-2. The default is 0.

0
Host On-Demand macro tracing is not enabled.
1
Host On-Demand event tracing is enabled.
2
Host On-Demand support tracing is enabled.
trace.HOD.USERMACRO
Specifies the level of tracing for trace actions in Host On-Demand macros.

The value is an integer from 0-3. The default is 0.

trace.HOD.SESSION
Specifies the level of Host On-Demand session tracing.

The value is an integer from 0-3. The default is 0.

trace.HOD.PSEVENT
Specifies the level of Host On-Demand PS events.

The value is an integer from 0-1. The default is 0.

trace.HOD.OIAEVENT
Specifies the level of Host On-Demand OIA events.

The value is an integer from 0-1. The default is 0.

trace.HOD.COMMEVENT
Specifies the level of Host On-Demand COMM events.

The value is an integer from 0-1. The default is 0.

Problems and solutions

This section describes problems that could occur when users interact with your HATS application, and solutions to those problems.

Browser-related items

Disabling the browser's Back button

If a user of your HATS application clicks the browser's Back button rather than using the controls on the Web page, the results will be unpredictable. You can disable the Back button by inserting this script into each template used by your HATS application:

<HEAD>
<HTML>
<SCRIPT Language="Javascript">
function goHist(a)
{
history.go(a);//Go forward one.
}
</SCRIPT>
</HEAD>
<body onLoad="goHist(1);">

Tabbed folders not supported on Netscape 4

The tabbed folder widget is not supported on Netscape 4.x, regardless of platform. If you use tabbed folders in your HATS application, tell your users to use Internet Explorer or Netscape 7.

Button text alignment in specific browsers

The text alignment on buttons does not appear as left-justified (right-justified for bidirectional applications) in the following browsers: Internet Explorer 5.0, Netscape 6.2.3, and Netscape 7. Therefore, you see inconsistent spacing around button text in these browsers.

Highlighting characters in Netscape 4.78 on AIX

When running a HATS application on AIX using Netscape 4.78, characters may appear incorrectly when you highlight the text in the browser. This is a known issue with the IBM HTTP Server, the internal Web server used by WebSphere. Currently there is no way to work around this problem. However, this does not compromise product functionality.

Netscape 4.7x browser limitations on UNIX

On Netscape 4.7x browsers running on Unix platforms, the caption on the Button widget does not display the space between words.

Problem assigning clones in Netscape 6.2.3

If a HATS administrator wants to administer a specific clone by using a session ID obtained from a user and pasting this value in the text input field on selectclone.jsp, he may not be directed to the correct clone if using Netscape 6.2.3. To solve this problem, use Internet Explorer or Netscape 7 to perform clone selection.

Insert and overwrite mode in entry fields

While most unprotected entry fields on host screens are empty, some host applications may fill entry fields with underscores (_) or occasionally with periods (.). Although emulator screens have control over whether the cursor is in input or overwrite mode, HTML always places the cursor into insert mode. Because of this, users may occasionally need to manually select overwrite mode. Users of Internet Explorer can use the Insert key to change to overwrite mode. In Netscape, the Insert key does not change the mode, so users can use the Delete key to delete text to be replaced, or highlight the text with the mouse before typing the new text.

Start Netscape before Run on Server

If you try to start the Run on Server function to preview a HATS project, and the server does not start, the Netscape browser might be unable to start. The Run on Server uses the browser that you have defined in your WebSphere Studio preferences (not the default browser for your machine). If Netscape is your Studio default browser, follow these steps to enable the server to run:

  1. Use Task Manager to end the Netscape process.
  2. Start a Netscape browser.
  3. Select the project and click the Run on Server icon. The server should be able to use the open Netscape window.

Click twice for cursor to appear in browser input field

When you preview a project in WebSphere Studio, using the Run on Server function, your cursor may not appear in the input field for every host screen. To solve this problem, you must click twice (instead of once) in the Web browser running on WebSphere Studio to cause the cursor to appear in the input field.

Microsoft Script Debugger screen pop up when previewing screens

When previewing a transformed screen, a Microsoft Script Debugger screen may pop up after clicking any buttons, links, or input fields.

Follow these steps to disable the screen:

  1. Open an Internet Explorer browser window
  2. Click Tools> Internet Options
  3. In the Internet Options panel, click the Advanced Tab
  4. Check Disable script debugging
  5. Click the OK button to save the configuration.

Incorrect data in HATS applications with non-English locales

HATS application input can be corrupted in non-English locales and result in incorrect data being used.

HATS applications rely on input data from Servlet and Java Server Page (JSP) API's to retrieve HTML FORM data from the FORM character set and convert it to Unicode. The Servlet's getParameter() methods must decide on the character set of the FORM. HATS applications create JSPs in all locales using the UTF-8 character set; so UTF-8 is the required character set for processing HATS application data.

The specification for FORM provides a charset value in the content-type attribute, but most browsers do not add the charset value to content-type. Also, in WebSphere Application Server 4.0 (WAS), there is no way for the HATS application to dynamically specify the character set used for each form; however, you can assign a character set mapping used by the entire WAS. A customizable properties file provides a locale-to-character set mapping used by WAS. The file is \\WebSphere\AppServer\properties\encoding.properties.

The encoding.properties file determines which character set is used in reading input data. For example:

en=ISO-8859-1
fr=ISO-8859-1
.
.
.
zh=GB2312
zh_TW=Big5

The default ISO-8859 character set works in most cases; however, input data in non-Latin1, double-byte, and bi-directional locales is frequently corrupted.

To establish UTF-8 as the character set, edit the encoding.properties file.

  1. In this file, find the entry for the WAS locale. For example, Traditional Chinese is zh_TW and Simplified Chinese is zh.
  2. Change the value of this entry to UTF-8 for that locale. For example, zh=UTF-8.
  3. Save your changes, then restart WAS.
  4. You should now be able to run your internationalized HATS application.

Thai font size too small for default transformation

The default font size for HATS applications is 10-point type. For a Thai session, the default font size is too small; it should be 12-point type. For transformations to display well on a Thai session, you should increase the font size by applying one of the supplied stylesheets or modyfing the stylesheet you are using to display the proper font size.

Thai characters accepted incorrectly in text input widget

If you are running a HATS application in the Run on Server function of WebSphere Studio, Thai characters may appear incorrectly in the text input widget. You must edit the encoding.properties file located in WebSphere/AppServer/properties/encoding.properties by changing the "th" locale from windows-874 to UTF-8.

The line currently reads:

tr=ISO-8859-9
th=windows-874
vi=windows-1258

The new line should read:

tr=ISO-8859-9
th=UTF-8
vi=windows-1258

Host terminal screen problem on KOR environment

If you experience problems opening a host terminal screen in the KOR environment, change the following lines in the file [wsad folder]\jre\lib\font.properties.ko from:

monospaced.0=\uad74\ub9bc,HANGEUL_CHARSET
monospaced.1=Courier New
monospaced.2=Lucida Sans Typewriter Regular

to

monospaced.0=\uad74\ub9bc\uccb4c,HANGEUL_CHARSET
monospaced.1=Courier New,ANSI_CHARSET
monospaced.2=\uad74\ub9bc\uccb4,HANGEUL_CHARSET,NEED_CONVERTED

Finally, restart WebSphere Studio.

Incorrect cursor position in unprotected host fields

HATS applications use standard HTML INPUT fields to render unprotected host fields, but HTML does not provide control over the cursor position within these fields. Host screens usually place the cursor at the beginning of an unprotected field, but some do not. HATS renders the unprotected field by placing the cursor at the beginning of the field instead of at the host-indicated cursor position. You may need to click on the correct location within such fields to place the cursor at the desired location.

Invalid transformation/template links at runtime

If you create a HATS studio transformation, make sure it is in the same subfolder level as the template you are using. Transformations are embedded in templates, and if a transformation is in a different subdirectory level than its template, the links will be invalid at runtime.

The following is an example of an incorrect embedding and will fail at runtime:

/proj/webApplication/transformations/sub/login.jsp in
/proj/webApplication/templates/Simple1.jsp

This example demonstrates correct embedding:

/proj/webApplication/transformations/sub/login.jsp in
/proj/webApplication/templates/other/Simple1.jsp

If it is not possible to put the transformation and template at the same subdirectory level, change the links in the transformation to be relative to the URL root. Double-click on the transformation in the HATS Project View, then click the Source tab. Change each occurrence of SRC="..common/ to SRC="<%= request.getContextPath()%>/common/.

JVM memory problem on AIX and Solaris

If you deploy a HATS application to run on WebSphere Application Server on the AIX or Solaris platform, make these configuration changes to the server's Java Virtual Machine (JVM) to avoid a memory problem:

Restart WebSphere Application Server.

End users receiving HTTP 404 error

If the end users of your application are receiving an HTTP 404 - File not found when trying to run an application message, WebSphere Application Server could be configured incorrectly.

If your deployed .ear file contains the .war files for multiple applications, the WebSphere Application Server (WAS) administrator must configure the server with Module Visibility set to Application.

[ Top of Page | Previous Page | Next Page ]