Jspell deployment in weblogic

FAQ

JSpell is a spell checker software API. The Page Scholar implementation of JSpell enables spell checking in the user interfaces of software such as web pages (HTML, ASP, JSP, CGI, etc.), Java applets and applications. There are various JSpell components, some of which allow spell checking in HTML Form and Text Input Fields and some, which allow spell checking inside Java Applets and Applications. Most of our software is designed for developers and systems administrators of web sites.

To start with jspell deployment in weblogic you shall already have the spell checker wars like jspellhtml.war and jspelliframe.war files. If not please go to http://www.jspell.com/ and download the war files according to your need.

Follow below steps to complete jspell deployment in weblogic

1. Copy the jspellhtml.war and jspelliframe.war files to weblogic servers file system.

2. Create two folders jspellhtml.war and jspelliframe.war and extract the jspellhtml.war and jspelliframe.war files accordingly inside the folders.

3. cd to <WAR_PATH_ON_WEBLOGIC>/jspellhtml/WEB-INF/ directory and run below command to provide 0750(rwx-r-x—) permission to all files inside it in a single user env. and in multi user env. give 0770(rwxrwx—) to all files inside the jspell folder.

chmod -R 0750 jspell

Note: Do same for <WAR_PATH_ON_WEBLOGIC>/jspelliframe/WEB-INF/ locations jspell folder too.

Note: Read/write is required for the lex_enGB.jdx and lex_enUS.jdx files to load into JVM successfully.

4. Login to weblogic admin console and navigate to Deployments and click on Lock and Edit button to start the deployment.

5. Click on Install button and Navigate to the extracted jspellhtml.war folder location and select the radio button and click on next.

6. Select the “Install this deployment as an application” radio button and click on next.

7. Select the target servers you want to deploy, incase you are deploying to cluster the choose cluster with “All servers in the cluster” radio button selected.

8. Put the name as jspellhtml and in the “Source accessibility” section select “I will make the deployment accessible from the following location” radio button.

9. Select the “Yes, take me to the deployment’s configuration screen.” radio button and click on Finish.

10. Once deployment completes click on the button Activate changes to activate the war and click on Deployments > Start – Servicing all requests to make the war active.

11. Restart the managed servers once

12. Do same for the jspelliframe.war file deployment too and put the deployment name as “jspelliframe” keeping rest done same as jspellhtml in previous steps.

Testing The Jspell war files:

1. To test the deployment was successful or not follow below steps:

1.a. Open IE browser and hit below url’s to access the jspellhtml and jspelliframe spell checkers directly.

1.b. Jspell HTML(Update the hostname to environment specific one):

http://<managed_server_host_name>:<server_port>/jspellhtml/

E.g.: http://ms1.techpaste.com:7006/jspellhtml/

Jspellhtml test page

1.c. Once the test application gets loaded successfully, Click on SpellCheck button and use replace all button to correct the spelling mistakes.

Jspellhtml spell checking test

The spelling mistakes shall get corrected successfully.

Jspellhtml spelling check test complete

1.d. Jspell IFrame(Update the hostname to environment specific one):

http://<managed_server_host_name>:<server_port>/jspelliframe/

E.g.: http://ms1.techpaste.com:7006/jspelliframe/

Jspelliframe test page

1.e. Once the test application gets loaded successfully, Click on SpellCheck red color Check mark symbol and use the replace all button to correct the spelling mistakes of test sentence (the quck brown fox jmps over the lzy dogg.). The spelling mistakes shall get corrected successfully to “The quack brown fox jumps over The lazy dog.”

Jspelliframe spelling check

Jspelliframe spell check test complete

2. Once all above verification steps are successful, you can consider the spellchecker is successfully deployed.

Troubleshooting:

If you get below error “The spell checker is unavailable. If you continue to receive this message, please contact your server administrator.” and “JSpell Has Not Been Properly Configured” like below while clicking on the spell check button.

Jspell Error in jspellhtml spell check

And In weblogic managed server log(.out file) you will see error like below:

+------------------------------------------------------------------------------+
| JSpell HTML Pro Spell Checker |
| Copyright (c) 2009 Page Scholar Inc. |
| http://www.jspell.com/jspell.html |
| ------ |
| |
| |
| ------ |
| Version 0811c |
| JDX Path: /opt/jspellhtml.war/WEB-INF/jspell/ |
+------------------------------------------------------------------------------+
Directory: /opt/jspellhtml.war/WEB-INF/jspell/ IS NOT VALID

CRITICAL - JSpell is using a backup JDX installation method. Please check
program arguments and/or web.xml parameters. Also check read/write
permissions on directory and .jdx files. Failure to fix this error may
result in problems with the licensing technology used by JSpell.

lex_enUS.jdx was not found in JSpell .jar files or on CLASSPATH.

ERROR - Backup installation method failed. JSpell index was not installed!
If you are using a web server then please check your web.xml file for the
correct arguments to jspellLexicons or indexDirectory. If this routine is
being called from other code please make sure arguments are correct.
User Dir: /opt/Middleware/user_projects/domains/nt_domain/
User Home: /home/weblogic/
Java Ext: /usr/java/jdk1.7.0_51/jre/lib/ext:/usr/java/packages/lib/ext/
Java Home: /usr/java/jdk1.7.0_51/jre/

java.io.FileNotFoundException: /opt/jspellhtml.war/WEB-INF/jspell/lex_enUS.jdx (Permission denied)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:241)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:122)
at com.jspell.domain.g.<init>(RandomAccessFile.java:246)
at com.jspell.domain.g.<init>(RandomAccessFile.java:170)
at com.jspell.domain.g.<init>(RandomAccessFile.java:142)
at com.jspell.domain.g.<init>(RandomAccessFile.java:195)
at com.jspell.domain.i.a(JSpellIndex.java:153)
at com.jspell.domain.i.<init>(JSpellIndex.java:126)
at com.jspell.domain.d.b(JSpellDictionaryLocal.java:115)
at com.jspell.domain.m.a(JSpellDictionaryManager.java:237)
at com.jspell.domain.m.a(JSpellDictionaryManager.java:161)
at com.jspell.domain.net.d.a(JSpellV.java:60)
at com.jspell.domain.net.b.indexSetup(JSpellTools.java:136)
at jsp_servlet.__jspell._jspService(__jspell.java:291)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3732)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
java.io.FileNotFoundException: /opt/jspellhtml.war/WEB-INF/jspell/lex_enGB.jdx (Permission denied)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:241)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:122)
at com.jspell.domain.g.<init>(RandomAccessFile.java:246)
at com.jspell.domain.g.<init>(RandomAccessFile.java:170)
at com.jspell.domain.g.<init>(RandomAccessFile.java:142)
at com.jspell.domain.g.<init>(RandomAccessFile.java:195)
at com.jspell.domain.i.a(JSpellIndex.java:153)
at com.jspell.domain.i.<init>(JSpellIndex.java:126)
at com.jspell.domain.d.b(JSpellDictionaryLocal.java:115)
at com.jspell.domain.m.a(JSpellDictionaryManager.java:237)
at com.jspell.domain.m.a(JSpellDictionaryManager.java:161)
at com.jspell.domain.net.d.a(JSpellV.java:60)
at com.jspell.domain.net.b.indexSetup(JSpellTools.java:136)
at jsp_servlet.__jspell._jspService(__jspell.java:291)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3732)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

To resolve this error make sure weblogic service user have read and write prvileges on files at /opt/jspellhtml.war/WEB-INF/jspelll folder’s lex_enGB.jdx and lex_enUS.jdx files to load into JVM successfully.

Note: Here /opt/jspellhtml.war/ is the location of extracted jspellhtml.war file.
For integration of jspell with tineMCE you can refer below url:

JSpell and TinyMCE

In case of any ©Copyright or missing credits issue please check CopyRights page for faster resolutions.

Leave a Reply