Troubleshooting

During the installation of the term checker, some users get Java error messages such as these:

Before you contact TechScribe, do the troubleshooting procedures. If you send an error message to TechScribe, if possible, send the message as text, not as an image.

To get a text version of a Java error message

  1. Close LanguageTool.
  2. Open the command line program. (In Microsoft Windows: Start > All Programs > Accessories > Command Prompt.)
  3. In the command line program, change the directory to the LanguageTool installation directory.
  4. Start Languagetool from the command line: java -jar languagetool.jar
  5. LanguageTool starts and the error message appears. Close the error message and then close LanguageTool.
  6. The error message appears in the command line program. Copy the error message. (In Microsoft Windows, right-click>Select All. The text becomes black. Press the Enter key.)

The system cannot find the path

The most usual problem occurs if you incorrectly edit disambiguation.xml or grammar.xml in procedure Download the templates for your project terms. Make sure that the edited paths are correct.

The screen shot shows that system cannot find file:///D:/path-to-the-file/ste-term-checker/data-files/disambiguation-projectterms.xml.
An example Java error message

The system cannot find disambiguation-projectterms.xml because in disambiguation.xml, I removed the comments from the entity reference, but I did not change the file location:
<!ENTITY ProjectTermsDisambiguationRules SYSTEM "file:///D:/path-to-the-file/ste-term-checker/data-files/disambiguation-projectterms.xml">

On a small screen, you will see only part of the full error message. Possibly, you will see the line
Caused by: java.io.IOException: Cannot load or parse input stream of '/org/languagetool/rules/en/grammar.xml', but you will not see the line
Caused by: java.io.FileNotFoundException: D:\path-to-the-file\ste-term-checker\data-files\disambiguation-projectterms.xml (The system cannot find the path specified). Thus, get a text version of a Java error message.

Test the access to external files

The term checker tries to access password-protected files that are on the TechScribe website. Possible causes of the error messages are as follows:

To help you to find the cause of the problem, test the access to external files that have no password protection. In the test, you will change the entity references to 'point' to these small files, which are not password-protected:

To test the access to external files that have no password protection

  1. In the LanguageTool stand-alone installation directory, in ..\org\languagetool\resource\en\disambiguation.xml, paste this XML:
    
    <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
    <!DOCTYPE doc [
    <!ENTITY STE7DisambiguationRules SYSTEM "http://www.simplified-english.co.uk/disambiguation-access-test.xml">
    ]>
    <rules lang="en" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/languagetool-org/languagetool/master/languagetool-core/src/main/resources/org/languagetool/resource/disambiguation.xsd">
    &STE7DisambiguationRules;
    </rules>
    
  2. In the LanguageTool stand-alone installation directory, in ..\org\languagetool\rules\en\grammar.xml, paste this XML:
    
    <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
    <!DOCTYPE doc [
    <!ENTITY STE7GrammarRules SYSTEM "http://www.simplified-english.co.uk/grammar-access-test.xml">
    ]>
    <rules lang="en" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/languagetool-org/languagetool/master/languagetool-core/src/main/resources/org/languagetool/rules/rules.xsd">
    &STE7GrammarRules; 
    </rules>
    
  3. Double-click languagetool.jar.
    If the term checker can access the external files, which are not password-protected, you will see the message:
    EXTERNAL ACCESS: SUCCESS. The term checker found the word 'LanguageTool'.
    Test the access to an external file

Increase the memory that is available to Java

The error message java.lang.OutOfMemoryError: Java heap space has two possible causes:

In this example, although LanguageTool starts, there is not sufficient memory. LanguageTool does not give an analysis of the text:
LanguageTool starts, but there is a heap space error

The solution is in two parts:

  1. Find the default memory that is is available to Java.
  2. Start LanguageTool with more than the default memory.

To find the default memory that is available to Java

The default memory that is available to Java is not the memory that your computer has. Refer to https://plumbr.eu/outofmemoryerror/java-heap-space.

  1. Open the command line program. (In Microsoft Windows: Start > All Programs > Accessories > Command Prompt.)
  2. Enter this command: java -XX:+PrintFlagsFinal -version | findstr /i "HeapSize"
    The output shows the maximum heap size (MaxHeapSize) in bytes:
    
    C:\Users\Mike>java -XX:+PrintFlagsFinal -version | findstr /i "HeapSize"
        uintx ErgoHeapSizeLimit                         = 0                                   {product}
        uintx HeapSizePerGCThread                       = 67108864                            {product}
        uintx InitialHeapSize                          := 16777216                            {product}
        uintx LargePageHeapSizeThreshold                = 134217728                           {product}
        uintx MaxHeapSize                              := 268435456                           {product}
    java version "1.8.0_144"
    Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
    Java HotSpot(TM) Client VM (build 25.144-b01, mixed mode, sharing)
    
    C:\Users\Mike>
    

To start LanguageTool with more than the default memory

  1. In the command line program, change the directory to the LanguageTool installation directory.
  2. Start LanguageTool from the command line and use -Xmx to specify the maximum memory available to Java. The value of -Xmx must be more than the value of MaxHeapSize. Usually, 500 megabytes is sufficient. Example: java -Xmx500m -jar languagetool.jar
    Note: MaxHeapSize shows the number of bytes, but -Xmx uses megabytes (m).
  3. Do one of these:
    1. If LanguageTool opens and operates correctly, continue the installation of the term checker.
    2. If the java.lang.OutOfMemoryError: Java heap space error occurs, do the previous step again, but increase the number of megabytes in -Xmx.
RSS feed