Menu

Another Nullpointer Exception

Help
T. Koehler
2002-03-14
2002-10-24
  • T. Koehler

    T. Koehler - 2002-03-14

    I'm using Sun JDK 1.3.1, and when I try to start
    the sample with
    java opennlp.grok.Grokling simple.gram

    this is the output I get:

    Loading grammar at URL: file:/home/torben/ai/grok/Grok/samples/grammar/simple.gram
    Loading Lex... Rules... Pipeline...
    Error in creating Pipeline:
    java.lang.NullPointerException
    Exception in thread "main" java.lang.NullPointerException
        at opennlp.common.Pipeline.verify(Pipeline.java:66)
        at opennlp.common.Pipeline.<init>(Pipeline.java:59)
        at opennlp.grok.Grokling.<init>(Grokling.java:84)
        at opennlp.grok.Grokling.main(Grokling.java:205)

    The same is true for IBM's JDK - so I don't think it's the VM.

     
    • Jason Baldridge

      Jason Baldridge - 2002-03-15

      This is problably a classpath issue. You need to make sure that /home/torben/ai/grok/Grok/src/java is in your classpath, which is so that the maxent models can be found and loaded. 

      Alternatively, you can get a checkout of the CVS, in which you will find a directory grok/bin with a script called "grokling" in it that will set up your classpath appropriately given that you set the GROK_HOME environment variable (in your case home/torben/ai/grok/).  Then you can run it by calling:

      > /home/torben/ai/grok/Grok/bin/grokling simple.gram

      Or just

      > grokling simple.gram

      if GROK_HOME/bin is in your path.

       
    • T. Koehler

      T. Koehler - 2002-03-15

      Thank you, including the src/java path worked.

       
    • Ioannis D. Canellos

      I had the same problem with tk22222, but adding the src/java in my classpath didn't work.

      I builded grok from scratch and after that all seems to work properly. Does this seem resonable ?

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.