Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Starting the WebSpellChecker Server release 5.1.0 and higher, the new grammar engine requires Java 8 and higher. After the installation, on start, the Application Server (AppServer) will try to auto-detect a path to an existing Java Virtual Machine (JVM). Also, you have an option to set a path to JVM manually or change the auto-detected path to your custom one. This manual will help you with this.

1. Install Java

First of all, you need to make sure that you have installed Java Runtime Environment (JRE) or Java Development Kit 8+, as both of them contain a Java Virtual Machine (JVM) that is required to run Java programs. The new grammar engine is written in Java.

2. Stop AppServer

Before any changes in the AppServer configuration file (AppServerX.xml), stop AppServer.

3. Specify path to JVM in AppServer configuration file

  • Locate the AppServerX.xml configuration file in the WebSpellChecker installation folder on your server. 
Info

The default path to the AppServerX.xml file: <WebSpellChecker_Installation_Path>/AppServer/AppServerX.xml

  • Find a section with parameters responsible for the configuration of Java Virtual Machine (JVM) that are required for the grammar engine: <PathToJavaVirtualMachine>...</PathToJavaVirtualMachine>
Code Block
languagexml
themeEmacs
titleAppServerX.xml
<!-- At least java 8 is required to use langtool grammar engine. In case of empty tag AppServer tries to detect path to jvm library automatically. -->
<!-- You can put path to jvm library here. Path example for Linux: /usr/lib/jvm/java-8-oracle/jre/lib/amd64/server/libjvm.so. -->
<!-- Path example for Windows: C:/Program Files/Java/jre1.8.0_121/bin/server/jvm.dll -->
<PathToJavaVirtualMachine></PathToJavaVirtualMachine>
<!-- Put maximum heap size restriction in megabytes for langtool in java virtual machine. -->
<JVMMaxMemorySizeMb>256</JVMMaxMemorySizeMb>
  • Use the PathToJavaVirtualMachine parameter to specify a correct path to a JVM on your server.
Code Block
languagexml
themeEmacs
titleAppServerX.xml
<PathToJavaVirtualMachine>your_path_to_JVM</PathToJavaVirtualMachine>

4. Start AppServer

As soon as a correct path to JVM is specified in AppServerX.xml, start AppServer for the changes to take effect.

5. Verify operability

As soon as these steps are done, the status should change to "active":true. You can also check the grammar by visiting /samples/ that are shipped with the package.

  1. Check the status: 
    Excerpt Include
    IN:_include_wsc54x_status_check_response
    IN:_include_wsc54x_status_check_response
    nopaneltrue
  2. Go to the Demo Sample pages (http(s)://your_host_name:port/wscservice/samples) that shipped with the WebSpellChecker Server package and choose any of the demo samples with enabled Grammar.
  3. Additionally, go to logs (e.g. Child-0.log or Child-1.log) files that are located in AppServer/Logs folder and check if there are any errors that appear after you specified path to your JVM. Here is an example of errors that are thrown by AppServer if a path to JVM is not found.
Code Block
MM/DD/YY:HH:MM:50.821	#18794:0	Subsystem_General	Error	Could not find path to jvm.dll. At least java 8 is required to use grammar engine. You can specify path to jvm library in AppServerX.xml in 'PathToJavaVirtualMachine' tag.
MM/DD/YY:HH:MM:50.821	#18794:0	Subsystem_General	Error	Function execution error (name:check_grammar1, result:-1, params:check_grammar1
test message
-1
en_US
)