Wintertree Software Inc.

Wintertree Spelling Server

Home Site index Contact us Catalog Shopping Cart Products Support Search

You are here: Home > Support > Wintertree Spelling Server > Known problems


Wintertree Spelling Server

Technical support

Known Problems


"An error occurred while checking spelling" message in Applet examples

Symptom 1: The message "An error occurred while checking spelling" appears when using one of the Spelling Applet examples. The Java console contains the following lines:

E::::
Reading response from server (2) (...):
java.lang.NullPointerException

Cause: A bug in the examples\applet\default.asp script.

Solution: Open c:\Program Files\Wintertree Spelling Server\examples\applet\default.asp using NotePad or a similar editor. Locate the following lines near the bottom of the script:

' We've checked all the words in the text.
Response.Write("E::::" & vbCrLf)

Insert the statements shown below so the lines look like the following:

' We've checked all the words in the text.
If (Not sentinelReturned) Then
Response.Write("$$start$$" & vbCrLf)
sentinelReturned = True
End If
Response.Write("E::::" & vbCrLf)

Symptom 2: The message "An error occurred while checking spelling" appears when using one of the .NET Spelling Applet examples (VBExample5 or CSExample5) when the text being spell-checked contains HTML markups. The Java console contains the following lines:

Reading response from server (1) (http://.../AppletServer.asxp):
java.io.IOException

Cause: Newer versions of .NET consider HTML markups in submitted text to be a security threat. The problem will occur when text containing HTML markups is submitted to any .NET application, and results an error page containing the following text:

A potentially dangerous Request.Form value was detected from the client.

Description: Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted. This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. You can disable request validation by setting validateRequest=false in the Page directive or in the configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case.

Because the forms contents are submitted to the server by SpellingApplet, and the response from the server is received by SpellingApplet, the contents of the error page are not visible.

Solution: Edit AppletServer.aspx in "form" mode, and insert the "validateRequest=false" option in the Page directive (use the HTML view). However, note that doing so will make your server vulnerable to the security threat against which Request Validation is intended to guard.


Spelling Server error -7

Applies to: All versions

Symptom: Your application or one of the example programs displays "Spelling Server error -7".

Cause: The -7 means that the language id passed to the CheckText or Suggest methods does not correspond to a known language id. However, this problem can also be a symptom of an invalid license key.

Solutions:


How to access the Wintertree Spelling Server event log

Wintertree Spelling Server records significant events in log files. Information logged to these files can be helpful in diagnosing configuration problems. When you contact the Support Group with Spelling Server related problems, you can save time by including the contents of the event log for the day the server was started.

Applies to: Version 1.7.3 and later

When the CheckText method returns a negative error code, it sets the value of the otherWord parameter to the contents of the event log (limited to 10K characters). You can display the event log contents in a browser window by forcing CheckText to return an error code:

Dim cursor, word, otherWord
result = WSS.CheckText(CStr(""), CLng(999999), CLng(0), CStr(""), CStr(""), cursor, word, otherWord)
If (result < 0) Then
Response.Write("<P><FONT COLOR=RED>Spelling server error " & result & "</FONT><BR>")
Response.Write("Diagnostic information:<BR>")
Response.Write(otherWord)
End If

In the example code above, an unknown language id (999999) is passed to the CheckText method to force it to return -7.

The event log information returned through the otherWord parameter is formatted for HTML display. Lines are separated with the <BR> markup. To convert the log information to text format, replace "<BR>" with CR-LF.

Applies to: Version 1.7 and later

The event log is created only if the EventLogPath string value is defined in the registry. This value is defined in the registry when you install Wintertree Spelling Server. EventLogPath contains the path to a folder on the server's file system where Wintertree Spelling Server's event logs can be created. By default, this path is c:\Program Files\Wintertree Spelling Server\EventLog.

The folder indicated by the EventLogPath string value must exist. Permissions assigned to this folder must allow any user or application to write to it. If the folder is empty, then most likely permissions on your system are preventing Wintertree Spelling Server from creating or writing to event log files. To get around this, you can use regedit to set EventLogPath to a writable folder, such as c:\WINNT\Temp or c:\Windows\Temp. Note that you may need to restart your server after changing the EventLogPath string value or changing permissions on the folder.

See the next section ("Apples to: Version 1.4 and later") for further information.

Applies to: Version 1.4 and later

The log files are created in the directory indicated by the EventLogPath setting (HKEY_LOCAL_MACHINE\Software\Wintertree\SpellingServer\EventLogPath). If this setting is not defined, the event logs are written in a directory named "eventlog" which is a subdirectory of the directory where WintertreeSpellingServer.dll resides (however, in version 1.7 and later, if EventLogPath is not defined, event logging is disabled). When you install Wintertree Spelling Server, the EventLogPath value is automatically set to c:\Program Files\Wintertree Spelling Server\eventlog.

The event log consists of (up to) 31 files, named "day01.txt" to "day31.txt". Each file corresponds to a day of the month. Events logged on the 6th of the month are written to "day06.txt", for example. When a log file is reused, events recorded on the same day the previous month are deleted. This arrangement keeps an historical record of significant events (up to one month's worth) without consuming excessive disk space. If you want to keep event logs for longer than one month, you can either make a backup of each file or change the EventLogPath setting each month.

Most significant events involving configuration problems occur when Wintertree Spelling Server starts, which is usually when the Start method is called or when the first spelling check takes place. If you are using the event logs to diagnose configuration problems, start with the log file corresponding to the day of the month when Wintertree Spelling Server started.

If the event log files are not created, the problem is most likely due to permissions. You can solve the problem by creating an EventLogPath string value in the registry which points to a different folder where files may be written. Details about the EventLogPath string value are contained in the user's guide.

Applies to: Version 1.3 and earlier

In version 1.3 and earlier, the event logs are not created automatically. Instead, an event log is written only if a string value named HKEY_LOCAL_MACHINE\Software\Wintertree\SpellingServer\LogFile is defined in the registry. The value is set to the path and name of a file where diagnostic information will be written when Wintertree Spelling Server runs.

Example program loops or hangs

Applies to: Version 1.2

Symptom: The "Example2" example program loops or hangs when the spelling check is complete, with CPU usage at or near 100%.

Cause: A file was missing from the distribution.

Solution: Copy the following HTML to a text editor (such as NotePad), and save the contents as file spellingcompleteform.html in "C:\Program Files\Wintertree Spelling Server\examples\example2\" (if you installed Wintertree Spelling Server to a different directory, use that path instead):

<HTML>
<HEAD>
<TITLE>Wintertree Spelling Server - Example 2</TITLE>
</HEAD>
<BODY BGCOLOR="WHITE">
<H1 ALIGN=CENTER>
Wintertree Spelling Server</H1>
<H2 ALIGN=CENTER>
Example 2</H2>
<FORM ACTION="default.asp" METHOD="POST" NAME="spellingForm">
<CENTER>
<P ALIGN=CENTER>
<TABLE WIDTH="75%" CELLPADDING="2" CELLSPACING="0" BORDER="0">
<TR>
<TD WIDTH="100%" BGCOLOR="#C0FFC0" VALIGN=TOP>
<P ALIGN=CENTER>
!!STATUS!!</P>
<P ALIGN=CENTER>
!!STATISTICS!!</P>
<CENTER>
<P ALIGN=CENTER>
<INPUT TYPE=SUBMIT NAME="action" VALUE="Edit Text"> <INPUT TYPE=SUBMIT NAME="action" VALUE="Submit">
</TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>


Garbage characters

Applies to: Version 1.1 - 1.2

Symptoms: The misspelled word returned through the CheckText method's word parameter contains garbage characters. This problem can be seen in the "Example2" example program, where a message such as "Not in dictionary: ^%$" is displayed, and the current word appears in the context display as "^%$" (or other random characters).

Causes:

This problem can be caused by the Spelling Server's Start method not being called. When the Start method has not been called, the CheckText method actually returns an error code. The example programs included with Wintertree Spelling Server in the versions listed above do not check for an error return from the CheckText method, so the problem is not reported and is manifested as the appearance of garbage characters as described above.

This problem can also occur if the language id passed to the CheckText method does not match a language defined in the registry (see "How to configure Wintertree Spelling Server" in the user's guide). In this case, the CheckText method returns -7.

Solutions:

  1. Make sure Spelling Server's Start method is called. The Start method is called in the Application_OnStart subroutine in global.asa (located in the "examples" directory where Wintertree Spelling Server is installed). If anything prevents the Application_OnStart subroutine from executing, the Start method will not be called and the problem described above will occur. If necessary, the Spelling Server's Start method can be called from an initialization script run by an administrator, but it must not be run at the same time that other Spelling Server methods are invoked, so it should be run before the server begins processing client requests that might involve spelling checks.

  2. In each of the example programs included with Wintertree Spelling Server (examples\example1\default.asp, examples\example2\default.asp, examples\performance\default.asp), search for a statement containing the text "result = WSS.CheckText" and insert the following statements immediately after the WSS.CheckText statement:

If (result < 0) Then
Response.Write "Spelling server error " & result
Exit Sub
End If

The statements listed above will cause the example programs to return the following text if the Start method has not been called:

Spelling server error -1
Spelling server error -7

As described in the "Error Codes" section of the Spelling Server user guide, a return code of -1 indicates that the Start method was not called, and a return code of -7 indicates that the language id was unknown.

If you're unsure of the cause of the error, turning on event logging may help. Event logging is described in the Wintertree Spelling Server user's guide; see "Log file" in "How to configure Wintertree Spelling Server." After setting the LogFile string value, restart your server and perform the steps needed to reproduce the problem. Examine the log file using Notepad or a similar text editor. It may contain clues about the circumstances which caused the problem. If you need to contact Wintertree Software for support, including the relevant portion of the log file may help in diagnosing your problem.


Cursor variable type

Applies to: Version: 1.1
Corrected in: Version 1.2

Symptom: If the cursor parameter passed to the CheckText method originated as a string, Wintertree Spelling Server may incorrectly interpret its input value as 0 and start checking the text from the beginning. This can happen if the cursor is saved as a hidden field in the form, then later extracted as a Request variable. The following code illustrates the problem:

Dim cursor, result
cursor = Request("Cursor")
result = SpellingServer.CheckText(..., cursor, ...)

The CheckText method will check the text from the beginning, possibly reporting misspellings that had already been reported.

Cause: The problem occurs because the cursor value is stored in the hidden "Cursor" form field as a string.

Solution: The problem can be avoided by explicitly converting the cursor variable to type long using the CLng conversion function:

Dim cursor, result
cursor = Request("Cursor")
cursor = CLng(cursor)
result = SpellingServer.CheckText(..., cursor, ...)


User dictionaries and custom dictionaries

Applies to: Version 1.1
Corrected in: Version 1.2

Symptom: The AddToUserDict method should create the user dictionary file if it does not exist. However, it currently does not create the file and will return a -13 error code (WSS_UNSUPPORTED_ACTION_ERR) if the file does not exist.

If you create a custom dictionary file that may at some point contain actions and other words (other than the default action, which is WSS_IGNORE_ACTION), the dictionary file must have a particular format or the AddToUserDict method will not write the action codes and other words to it. This is not stated in the user's guide.

Solution: A temporary solution to both of these problems is to create user and custom dictionary files using NotePad. The first line of the dictionary file must contain the following text:

#LID 30840

If the dictionary file contains this text as its first line, the AddToUserDict method will save words to the file, and the action code and other word (if specified) will also be saved in the file.


"Object does not support this property or method" or "document.SpellingApplet is null or not an object" with SpellingApplet

All platforms: The "Object does not support this property or method" or "xxx is null or not an object" message appearing in Internet Explorer is usually a configuration or communication problem. If the applet cannot be located on the server, or cannot be downloaded from the server, or the applet's JAR file is corrupted, IE will be unable to run the applet and the message may appear. SpellingApplet.jar must be located in the same virtual directory on the server as the HTML page which references it (though it is possible to place the .jar file in a different directory if the applet's CODEBASE tag is set). IE may continue to display the error message even after the problem is resolved unless the page is completely reloaded. On Windows systems, you can force IE to completely reload a page by pressing Ctrl+Shift+F5.

Macintosh only: When SpellingApplet is opened by Internet Explorer running on the Macintosh, the message "Object does not support this property of method" is displayed and the error line points to an attempt to call one of SpellingApplet's methods. Internet Explorer on the Macintosh does not (currently) support JavaScript to Applet communication. This communication is necessary for operation of SpellingApplet. Unfortunately, until the issue is resolved by Microsoft, SpellingApplet is not usable with Internet Explorer on the Macintosh platform.


Problems running the ASP.NET examples

Applies to: Version 1.6

Each specific virtual directory containing a Wintertree Spelling Server ASP.NET example must be configured as an application or the following message will be displayed by the ASP.NET framework when you attempt to run the example:

Configuration Error

It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This can be caused by a virtual directory not being configured as an application in IIS.

The solution is to configure the virtual directories containing the examples as applications. Instructions are given in the "Getting Started" section of the Wintertree Spelling Server user's guide.

On some systems, the ASP.NET example projects cannot be opened in Visual Studio.net unless the projects are located in a subdirectory of the wwwroot directory. If you have problems opening the ASP.NET examples, try copying the example ASP.NET projects from \Program Files\Wintertree Spelling Server\examples\asp.net to a subdirectory of wwwroot (usually located in Inetpub).


How to stop and restart Spelling Server

Applies to: All versions

Wintertree Spelling Server reads information from the system registry exactly once: when it starts, which happens the first time spelling is checked or when the Start method is called. The contents of dictionaries (except the user dictionary) are read and loaded into memory during this process. Once it has started, Spelling Server does not check the registry configuration or re-read dictionaries again while it is running. Therefore, if you change the configuration in the registry, or update a dictionary file configured via the registry, the change will not take effect until Spelling Server is restarted. (Changes to user dictionaries specified via the userDictFileName parameter take effect immediately, because the user dictionary is read on every call to CheckText or Suggest.)

One way to restart Spelling Server is to reboot the server on which it is running. Another way is to restart IIS. Both of these methods are somewhat drastic, and will probably cause inconvenience to your clients.

An easier method is to stop Spelling Server, which can be done by calling the Stop method. However, you must call the Stop method only when you are sure Spelling Server is not processing spelling requests; otherwise, a crash or other undesirable behavior may result. Unfortunately, there is no easy way to tell if Spelling Server is processing spelling requests. The best time to restart Spelling Server is when no clients are logged on to the server, or at some other point when you can be sure no spelling requests are in progress.

You can call Spelling Server's Stop method using a script similar to the following:

<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
Set WSS = Server.CreateObject("SpellingServer.SpellCheck")
Dim rv
rv = WSS.Stop()
</SCRIPT>

 


Home Site index Contact us Catalog Shopping Cart Products Support Search


Copyright © 2015 Wintertree Software Inc.