Menu

#34 ComtorStandAlone ant cliRun failure; tempdir is null?

beta_S09
open
nobody
None
5
2014-05-27
2014-05-27
No

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.

Related

Bugs: #34

Discussion

  • Peter DePasquale

    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...

     
  • mlocasto

    mlocasto - 2014-05-27

    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.

     
  • Peter DePasquale

    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:


    [bugs:#34] http://sourceforge.net/p/comtor/bugs/34/ ComtorStandAlone
    ant cliRun failure; tempdir is null?

    Status: open
    Group: beta_S09
    Created: Tue May 27, 2014 09:53 PM UTC by S. Williamson
    Last Updated: Tue May 27, 2014 09:53 PM UTC
    Owner: nobody

    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.


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/comtor/bugs/34/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

    --
    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

MongoDB Logo MongoDB