Troubleshooting
During the installation of the term checker, some users get these Java error messages:
java.io.IOException: Cannot load or parse input stream of '/org/languagetool/rules/en/grammar.xml'
. Refer to The system cannot find the path.java.io.FileNotFoundException: D:\path-to-the-file\ste8-term-checker\data-files\disambiguation-projectterms.xml (The system cannot find the path specified)
. Refer to The system cannot find the path.java.net.ConnectException: Connection timed out: connect
. Refer to Test the access to external files.java.net.ConnectException: connection refused: connect
. Refer to Test the access to external files.java.net.UnknownHostException: www.techscribe.co.uk
. Refer to Test the access to external files.java.lang.OutOfMemoryError: Java heap space
. Refer to Increase the memory that is available to Java.PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.
Refer to Java does not trust the TechScribe SSL certificate.
Some error messages are long, and you cannot see all the message (refer to the screenshot in the next section). Thus, get a text version of the Java error message.
If an error message has more than one line that start with Caused by:
, then usually, the last Caused by:
gives the root cause of the problem.
If you cannot solve the problem, contact TechScribe. If you send a Java error message, send the error message as text, not as an image.
To get a text version of a Java error message
- Close LanguageTool.
- Open the command line program. (In Microsoft Windows: Start > All Programs > Accessories > Command Prompt.)
- In the command line program, change the directory to the installation directory.
- Start Languagetool from the command line:
java -jar languagetool.jar
- LanguageTool starts and the error message appears. Close the error message and then close LanguageTool.
- 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.)
Make sure that you can use LanguageTool with your computer
If the file association is not correct, you cannot start LanguageTool.
- Download LanguageTool-6.4.zip (https://languagetool.org/download/LanguageTool-6.4.zip) and decompress it:
- In
LanguageTool-6.4
, double-clicklanguagetool.jar
and make sure that LanguageTool operates correctly. If you have problems with LanguageTool, get help from https://languagetooler.freshdesk.com/en/support/home. At this stage, the problem is not related to the term checker.)
The screenshot shows English. You will see the default language for your operating system (you can change the language on the interface to English).
The system cannot find the path
Message: Caused by: java.io.FileNotFoundException: ...
This error 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 screenshot shows that system cannot find file:///D:/path-to-the-file/ste-term-checker/data-files/disambiguation-projectterms.xml
.
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
Messages:
java.net.ConnectException: Connection timed out: connect
.java.net.ConnectException: connection refused: connect
.java.net.UnknownHostException: www.techscribe.co.uk
.
If possible,get help from your IT department.
The term checker tries to access password-protected files that are on the TechScribe website. Possible causes of the error messages are as follows:
- A firewall or a proxy server prevents LanguageTool from accessing the password-protected files.
- A DNS problem prevents prevents LanguageTool from accessing www.techscribe.co.uk. (
UnknownHostException
indicates that "the IP address of a host could not be determined".) - The Java security manager forbids
Authenticator.setDefault()
. Refer to Adding rules to an external file.
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:
- www.simplified-english.co.uk/disambiguation-access-test.xml
- www.simplified-english.co.uk/grammar-access-test.xml
To test the access to external files that have no password protection
- In the installation directory, in
..\org\languagetool\resource\en\disambiguation.xml
, paste this XML:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <!DOCTYPE doc [ <!ENTITY STE8DisambiguationRules SYSTEM "https://www.simplified-english.co.uk/disambiguation-access-test.xml"> ]> <rules lang="en" xmlns:xsi="https://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"> &STE8DisambiguationRules; </rules>
- In the installation directory, in
..\org\languagetool\rules\en\grammar.xml
, paste this XML:<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <!DOCTYPE doc [ <!ENTITY STE8GrammarRules SYSTEM "https://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"> &STE8GrammarRules; </rules>
- 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'.
Increase the memory that is available to Java
Message: java.lang.OutOfMemoryError: Java heap space
The message has two possible causes:
- Java does not have sufficient memory to run LanguageTool.
- Java does not have sufficient memory to run the term checker. You can do the procedure Create the directories and install LanguageTool. When you do the procedure Put the TechScribe files into LanguageTool and start the term checker the error occurs.
In this example, although LanguageTool starts, there is not sufficient memory. LanguageTool does not give an analysis of the text:
The solution is in two parts:
- Find the default memory that is is available to Java.
- 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.io/outofmemoryerror/java-heap-space.
- Open the command line program. (In Microsoft Windows: Start > All Programs > Accessories > Command Prompt.)
- 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 = 87241520 {product} uintx InitialHeapSize := 268435456 {product} uintx LargePageHeapSizeThreshold = 134217728 {product} uintx MaxHeapSize := 4265607168 {product} java version "1.8.0_211" Java(TM) SE Runtime Environment (build 1.8.0_211-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode) C:\Users\Mike>
To start LanguageTool with more than the default memory
- In the command line program, change the directory to the installation directory.
- 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 ofMaxHeapSize
. Example:
java -Xmx700m -jar languagetool.jar
Note:MaxHeapSize
shows the number of bytes, but-Xmx
uses megabytes (m). - Do one of these:
- If LanguageTool opens and operates correctly, continue the installation of the term checker.
- If the
java.lang.OutOfMemoryError: Java heap space
error occurs, do step 2 again, but increase the number of megabytes in-Xmx
. - If the
Error occurred during initialization of VM. Too small initial heap
message occurs, do step 2 again, and make sure that you includem
at the end of the value in-Xmx
.
Note. You cannot use the Java Control Panel to specify the memory, because "The settings in the Java Control Panel are not used by standalone and self-contained applications."
Note. In Windows, you can use a batch file to start the term checker with extra memory. If you do not know how to make a batch file, decompress ste-checker-extra-memory.zip into the LanguageTool folder. (The batch file contains this command: java -Xmx1000m -jar languagetool.jar
). To start the term checker, double-click ste-checker-extra-memory.bat
.
Java does not trust the TechScribe SSL certificate
Message: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Get help from your IT department.
For information about this error, refer to these web pages: