On a Windows 8 machine, with COMTOR and its associated files installed in "c:\comtor-code", an attempt to run "ant cliRun" on some arbitrary source files ("c:\test") results in a NullPointerException.
The exception occurs when certain modules, such as OffensiveWords, attempt to load dictionary files. loadDataList() in org.comtor.analyzers.Util calls toString() on tempdir (= ComtorStandAlone.getTempDir()), which is null. There is an associated setter, ComtorStandAlone.setTempDir(), but this is never called anywhere.
I can circumvent the problem by hard-coding tempdir to "c:\comtor-code\code\cloudDeploy\supporting-files", but this is obviously a temporary fix.
The stack trace is as follows:
[java] Exception in thread "Thread-1" Exception in thread "Thread-0" java.lang.NullPointerException
[java] at org.comtor.analyzers.Util.loadDataList(Util.java:56)
[java] at org.comtor.analyzers.OffensiveWords.analyze(OffensiveWords.java:71)
[java] at org.comtor.drivers.ComtorStandAlone$DocletThread.run(ComtorStandAlone.java:211)
[java] java.lang.NullPointerException
[java] at org.comtor.analyzers.Util.loadDataList(Util.java:56)
[java] at org.comtor.analyzers.SpellCheck.init(SpellCheck.java:85)
[java] at org.comtor.analyzers.SpellCheck.analyze(SpellCheck.java:232)
[java] at org.comtor.drivers.ComtorStandAlone$DocletThread.run(ComtorStandAlone.java:211)
[java] org.json.JSONException: JSONObject["score"] not found.
The cli version is rather outdated and it does not surprise me that it fails. It's long overdue for some bug fixing.... You may wish to use the temp fix for now. Given that we have migrated to the cloud for our deployments, we should weigh the usefulness of the cli...
It's true, but at least for Sara's case (doing module development), the standalone cli client is probably easiest to use w/o having to set up stuff in the cloud or even deploy a local Tomcat instance.
The cli version is rather outdated and it does not surprise me that it
fails. It's long overdue for some bug fixing.... You may wish to use the
temp fix for now. Given that we have migrated to the cloud for our
deployments, we should weigh the usefulness of the cli...
On 5/27/14 5:53 PM, S. Williamson wrote:
--
Peter J. DePasquale, Ph.D.
Associate Professor, Department of Computer Science
The College of New Jersey
(e) depasqua [at] tcnj [dot] edu
(p) 609-771-2806 (f) 609-637-5190
PGP public key available at: http://goo.gl/43fW8
Related
Bugs: #34