Terminal initialization failed ... Found class jline.Terminal, but interface was expected
Robert Dale <rob...@...>
Titan/JanusGraph has been using 2.11 and TinkerPop has been using 2.12 for the last 2 years or so. JanusGraph overrides TinkerPop's version. There is only one copy of jline in either TinkerPop or JanusGraph distributions. In jline, the interface change was from 1.x to 2.x. I would suspect that jline 1.x is somewhrere in your classpath. A quick search leads to some stackoverflow answers that point to the HADOOP classpath. However, if you believe that this is a bug in either JanusGraph, TinkerPop, please provide the steps to reproduce with a clean distribution and without manipulating the classpath. In the meantime, I have created an issue to update JanusGraph to the TinkerPop version - https://github.com/JanusGraph/janusgraph/pull/491 Robert Dale On Sat, Sep 2, 2017 at 7:23 AM, Rohit Jain <rohit.j...@...> wrote: Here is what one of our developers found: |
|
Rohit Jain <rohit.j...@...>
Here is what one of our developers found:
It looks like there are some incompatibilities in the interface for the class jline.Terminal between jline 2.11 and jline 2.12. If the jline 2.12, part of Cloudera CDH Hive, is loaded, Gremlin will fail with the following error: [ERROR] Terminal initialization failed; falling back to unsupported java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected If the jline 2.11 version is loaded, Gremlin does not have a problem. To work around the issue at this moment, here is what was done: We changed gremlin.sh around line 43, to add the janusgraph/lib at the beginning of the current class path. It is likely, that the only library needed to be in front was jline. But we added them all to the front, so they get preference over any of the current jars and classes. #WORKAROUND....PUT LIB in front of classpath #export CLASSPATH="${CLASSPATH:-}:$CP" export CLASSPATH="$CP:${CLASSPATH:-}" This indicates that perhaps Gremlin / Tinkerpop, as included with JanusGraph, may not be compatible with jline 2.12 after all. |
|
Rohit Jain <rohit.j...@...>
... /opt/cloudera/parcels/CDH/lib/hive/lib/jline-2.12.jar .../disk1/rohit/janusgraph-0.1.1-hadoop2/lib/jline-2.11.jar ... Rohit |
|
Robert Dale <rob...@...>
SCRIPT_DEBUG=y ./bin/gremlin.sh Robert Dale On Fri, Sep 1, 2017 at 4:39 PM, Rohit Jain <rohit.j...@...> wrote:
|
|
Rohit Jain <rohit.j...@...>
Robert, I am not a Linux expert either :-( Do you know how I can find out what version of jline in my CLASSPATH I am picking up? Rohit |
|
Robert Dale <rob...@...>
You clearly have too many versions of jline. JanusGraph uses 2.11, TinkerPop uses 2.12. Either should work fine but use just one. Robert Dale On Fri, Sep 1, 2017 at 4:27 PM, Rohit Jain <rohit.j...@...> wrote:
|
|
Rohit Jain <rohit.j...@...>
Robert, You are just so fast! We are on Linux centos I think. I tried setting it to none as you suggested, but I still got the same error. Here are the versions of jline installed on the system. $ find . -name jline* ./crunch/lib/jline-2.10.4.jar ./hadoop-httpfs/webapps/webhdfs/WEB-INF/lib/jline-2.11.jar ./llama/lib/jline-2.11.jar ./sentry/lib/jline-2.11.jar ./hadoop-kms/webapps/kms/WEB-INF/lib/jline-2.11.jar ./hadoop-0.20-mapreduce/lib/jline-2.11.jar ./whirr/lib/jline-2.11.jar ./impala/lib/jline-2.12.jar ./zookeeper/lib/jline-2.11.jar ./hadoop-yarn/lib/jline-2.11.jar ./oozie/oozie-sharelib-yarn/lib/hive2/jline-2.11.jar ./oozie/oozie-sharelib-yarn/lib/sqoop/jline-2.11.jar ./oozie/oozie-sharelib-yarn/lib/hcatalog/jline-2.11.jar ./oozie/oozie-sharelib-yarn/lib/pig/jline-2.11.jar ./oozie/oozie-sharelib-yarn/lib/hive/jline-2.11.jar ./oozie/oozie-sharelib-yarn/lib/spark/jline-2.10.5.jar ./oozie/oozie-sharelib-yarn/lib/spark/jline-2.11.jar ./oozie/lib/jline-2.11.jar ./oozie/libserver/jline-2.11.jar ./oozie/oozie-sharelib-mr1/lib/hive2/jline-2.11.jar ./oozie/oozie-sharelib-mr1/lib/sqoop/jline-2.11.jar ./oozie/oozie-sharelib-mr1/lib/hcatalog/jline-2.11.jar ./oozie/oozie-sharelib-mr1/lib/pig/jline-2.11.jar ./oozie/oozie-sharelib-mr1/lib/hive/jline-2.11.jar ./oozie/oozie-sharelib-mr1/lib/spark/jline-2.10.5.jar ./oozie/oozie-sharelib-mr1/lib/spark/jline-2.11.jar ./oozie/libtools/jline-2.11.jar ./hive/lib/jline-2.12.jar |
|
Robert Dale <rob...@...>
What OS, terminal are you using? Are there other versions of jline in the classpath? You can try setting `-Djline.terminal=none` e.g. `export JAVA_OPTIONS="-Djline.terminal=none" ; ./bin/gremlin.sh` Robert Dale On Fri, Sep 1, 2017 at 4:02 PM, Rohit Jain <rohit.j...@...> wrote:
|
|
Rohit Jain <rohit.j...@...>
Hi folks, I keep running into this problem. I don't know how I got around it the last time but it has cropped up again. Any ideas? bin/gremlin.sh \,,,/ (o o) -----oOOo-(3)-oOOo----- [ERROR] Terminal initialization failed; falling back to unsupported java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected Rohit |
|