Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Aaron Radzinski
    @aradzinski
    nccurl.sh has been deprecated (and removed)
    Alexey Domozhirov
    @aldomozhirov

    Hi! I'm trying to get started with nlpcraft server, but when executing command bin/nlpcraft.sh start-server (on latest version) I'm getting following scala exception. Could you please say what might be the problem? Thanks in advance for the answer!

    Exception in thread "main" java.lang.NullPointerException: Cannot read the array length because "$this" is null
    at scala.collection.mutable.ArrayOps$ofRef$.length$extension(ArrayOps.scala:204)
    at scala.collection.mutable.ArrayOps$ofRef.length(ArrayOps.scala:204)
    at scala.collection.IndexedSeqOptimized.foreach(IndexedSeqOptimized.scala:35)
    at scala.collection.IndexedSeqOptimized.foreach$(IndexedSeqOptimized.scala:33)
    at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:198)
    at org.apache.nlpcraft.model.tools.cmdline.NCCli$.cleanUpTempFiles(NCCli.scala:473)
    at org.apache.nlpcraft.model.tools.cmdline.NCCli$.delayedEndpoint$org$apache$nlpcraft$model$tools$cmdline$NCCli$1(NCCli.scala:3069)
    at org.apache.nlpcraft.model.tools.cmdline.NCCli$delayedInit$body.apply(NCCli.scala:75)
    at scala.Function0.apply$mcV$sp(Function0.scala:39)
    at scala.Function0.apply$mcV$sp$(Function0.scala:39)
    at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)
    at scala.App.$anonfun$main$1$adapted(App.scala:80)
    at scala.collection.immutable.List.foreach(List.scala:392)
    at scala.App.main(App.scala:80)
    at scala.App.main$(App.scala:78)
    at org.apache.nlpcraft.model.tools.cmdline.NCCli$.main(NCCli.scala:75)
    at org.apache.nlpcraft.model.tools.cmdline.NCCli.main(NCCli.scala)
    Alekseis-MacBook-Pro:apache-nlpcraft aleksei$ java11
    Alekseis-MacBook-Pro:apache-nlpcraft aleksei$ bin/nlpcraft.sh
    Exception in thread "main" java.lang.NullPointerException
    at scala.collection.mutable.ArrayOps$ofRef$.length$extension(ArrayOps.scala:204)
    at scala.collection.mutable.ArrayOps$ofRef.length(ArrayOps.scala:204)
    at scala.collection.IndexedSeqOptimized.foreach(IndexedSeqOptimized.scala:35)
    at scala.collection.IndexedSeqOptimized.foreach$(IndexedSeqOptimized.scala:33)
    at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:198)
    at org.apache.nlpcraft.model.tools.cmdline.NCCli$.cleanUpTempFiles(NCCli.scala:473)
    at org.apache.nlpcraft.model.tools.cmdline.NCCli$.delayedEndpoint$org$apache$nlpcraft$model$tools$cmdline$NCCli$1(NCCli.scala:3069)
    at org.apache.nlpcraft.model.tools.cmdline.NCCli$delayedInit$body.apply(NCCli.scala:75)
    at scala.Function0.apply$mcV$sp(Function0.scala:39)
    at scala.Function0.apply$mcV$sp$(Function0.scala:39)
    at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)
    at scala.App.$anonfun$main$1$adapted(App.scala:80)
    at scala.collection.immutable.List.foreach(List.scala:392)
    at scala.App.main(App.scala:80)
    at scala.App.main$(App.scala:78)
    at org.apache.nlpcraft.model.tools.cmdline.NCCli$.main(NCCli.scala:75)
    at org.apache.nlpcraft.model.tools.cmdline.NCCli.main(NCCli.scala)

    Aaron Radzinski
    @aradzinski
    Hi Alexey!
    What OS/JDK you are using?
    Alexey Domozhirov
    @aldomozhirov
    Hey! I'm using MacOS Catalina 10.15.7, openjdk 16.0.1
    But also tried with openjdk 11
    Aaron Radzinski
    @aradzinski
    NLPCraft 0.7.4?
    Alexey Domozhirov
    @aldomozhirov
    Yes, the latest one from here: https://nlpcraft.apache.org/download.html
    But also tried with 0.7.3 - the same outcome :(
    Aaron Radzinski
    @aradzinski
    I’ve just downloaded 0.7.4 (bin) and tested it on Mac OS 11.2.3 + jdk 11.0.8
    any chance you can download the latest ‘master’ and try it out?
    Alexey Domozhirov
    @aldomozhirov
    Sure, will do it right now
    Alexey Domozhirov
    @aldomozhirov
    Hmm... Now having:
    X Server failed to start: Cannot run program "/usr/bin/java" (in directory "/Users/aleksei/incubator-nlpcraft"): /Users/aleksei/.nlpcraft/server_log_1619108354386.txt (No such file or directory)
    Aaron Radzinski
    @aradzinski
    that’s strange
    I don’t think we test on MacOS 10.x - but it’s hard to see what can be wrong
    I’ve just run ‘master’ on 11.2.3 and it works fine
    can you try to remove ‘~/.nlpcraft’ folder and try again?
    Alexey Domozhirov
    @aldomozhirov
    Looks like this folder have not been created for me, as I cannot see it
    I think I will try to upgrade my MacOS version to latest and will see, may be it somehow could affect
    Aaron Radzinski
    @aradzinski
    You don’t have '/Users/aleksei/.nlpcraft’?
    Alexey Domozhirov
    @aldomozhirov
    Nope:
    Alekseis-MacBook-Pro:~ aleksei$ ls /Users/aleksei/.nlpcraft
    ls: /Users/aleksei/.nlpcraft: No such file or directory
    Aaron Radzinski
    @aradzinski
    hmm...
    let me ask around to see if anyone is running MacOS 10.x
    btw, did you download src or bin distribution?
    Alexey Domozhirov
    @aldomozhirov
    I tried downloading src and bin from here https://nlpcraft.apache.org/download.html, and also cloning git repo iself. The outcome is the same :(
    Aaron Radzinski
    @aradzinski
    ok, got it
    can you run “java -version”?
    Alexey Domozhirov
    @aldomozhirov
    Here it is:
    openjdk 16.0.1 2021-04-20
    OpenJDK Runtime Environment (build 16.0.1+9-24)
    OpenJDK 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)
    Aaron Radzinski
    @aradzinski
    it could be openjdk - we don’t test openjdk on macos
    Here’s what I have right now on MacOS 11.2.3:
    ~/incubator-nlpcraft master ❯ java -version
    java version "11.0.8" 2020-07-14 LTS
    Java(TM) SE Runtime Environment 18.9 (build 11.0.8+10-LTS)
    Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.8+10-LTS, mixed mode)
    Alexey Domozhirov
    @aldomozhirov
    It is Oracle, right?
    Aaron Radzinski
    @aradzinski
    yes
    Alexey Domozhirov
    @aldomozhirov
    Ok, will try to upgarde my MacOS and install Oracle JDK this time. Thanks for the hint!
    Aaron Radzinski
    @aradzinski
    we’ll do some digging here as well - let us know if you get it to work
    Alexey Domozhirov
    @aldomozhirov
    Ok, thanks for so quick responses!
    skhdl
    @skhdl
    Seems CLI mode is broken for current release (0.7.4).
    Easiest way (before fix which we'll prepare in few days) - start server from IDE - org.apache.nlpcraft.server.NCServer
    Sorry for this inconvenience
    skhdl
    @skhdl
    tested for Java(TM) SE Runtime Environment 18.9 (build 11.0.9+7-LTS) 64-Bit (macOS)
    Alexey Domozhirov
    @aldomozhirov

    Hey! I've updated MacOS to version 11.2.3 and changed jdk to Oracle one:

    java 16.0.1 2021-04-20
    Java(TM) SE Runtime Environment (build 16.0.1+9-24)
    Java HotSpot(TM) 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)

    Now when attempting to start server from IntlliJ IDEA IDE (IntelliJ IDEA 2020.3.2 (Ultimate Edition) Build #IU-203.7148.57, built on January 26, 2021), I'm getting following error:

    Module 'nlpcraft' production: java.lang.ExceptionInInitializerError

    Any ideas, might it be connected with IDE or with my local environment?

    skhdl
    @skhdl
    use please java 11
    Alexey Domozhirov
    @aldomozhirov
    Yes, with java 11 it worked 👌 Thanks!
    Aaron Radzinski
    @aradzinski
    we are fixing 0.7.4 and we’ll release 0.7.5 shortly as well - sorry for the instabilities
    Alexey Domozhirov
    @aldomozhirov
    No problem! Thanks a lot for your help 🙏
    Alexey Domozhirov
    @aldomozhirov

    Could you please help me with one more issue? I'm trying to run the probe using JVM run configuration (as described in readme.txt) with server running as separate app. So, the probe is managing to connect to server, but when trying to execute any "ask", I'm getting this in probe logs:

    Apr-23|14:07:23|ERR| Uplink connection failed.
    Apr-23|14:07:23|ERR|   +-+ Error reading data. -> (NCSocket.scala:111)
    Apr-23|14:07:23|ERR|     | o.a.n.common.socket.NCSocket.read -> (NCSocket.scala:111)
    Apr-23|14:07:23|ERR|     | o.a.n.common.util.NCUtils$$anon$3.run -> (NCUtils.scala:985)
    Apr-23|14:07:23|ERR|     +-+ Error deserialization data -> (NCUtils.scala:868)
    Apr-23|14:07:23|ERR|       | o.a.n.common.util.NCUtils$.deserialize -> (NCUtils.scala:868)
    Apr-23|14:07:23|ERR|       | o.a.n.common.socket.NCSocket.read -> (NCSocket.scala:106)
    Apr-23|14:07:23|ERR|       | o.a.n.common.util.NCUtils$$anon$3.run -> (NCUtils.scala:985)
    Apr-23|14:07:23|ERR|       +-+ [java.io.InvalidClassException] org.apache.nlpcraft.common.nlp.NCNlpSentence; local class incompatible: stream classdesc serialVersionUID = -2459378081725392973, local class serialVersionUID = -4180989482790036043 -> (ObjectStreamClass.java:689)
    Apr-23|14:07:23|ERR|         | o.a.n.common.util.NCUtils$.deserialize -> (NCUtils.scala:863)
    Apr-23|14:07:23|ERR|         | o.a.n.common.socket.NCSocket.read -> (NCSocket.scala:106)
    Apr-23|14:07:23|ERR|         | o.a.n.common.util.NCUtils$$anon$3.run -> (NCUtils.scala:985)

    Am I running the probe correctly or missing something?

    Aaron Radzinski
    @aradzinski
    is this ‘master’, MacOS 12.x and JDK 11?
    skhdl
    @skhdl
    Seems like you have different versions probe and server.
    For example, server started from IDE (master branch), and probe 0.7.4 from maven or something like this.
    Can it be?
    Alexey Domozhirov
    @aldomozhirov
    I have now MacOS 12.x and JDK 11. This is not master, but distribution of version 0.7.4. I've started server from IDE in one window and probe in another (the same IDE). Project was generated using gen-project from the same distribution.
    So, both server and probe started from IDE with the same Oracle JDK 11
    Alexey Domozhirov
    @aldomozhirov
    Hmm... Seems like I found the solution. I just started server from my project itself as Run Configuration (as written in readme.txt), but not from distribution (in the same IDE window). Now it's working.
    Aaron Radzinski
    @aradzinski
    Alexey - I would recommend to switch to master (upcoming 0.7.5). This release will bring some chnages that are not backward compatible (esprecially for intent DSL) + plenty of bug fixes