You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Clément de Groc (Jira)" <ji...@apache.org> on 2021/02/01 09:31:00 UTC

[jira] [Comment Edited] (TINKERPOP-2512) Duplicate jars in classpath when running gremlin-server.sh

    [ https://issues.apache.org/jira/browse/TINKERPOP-2512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17273813#comment-17273813 ] 

Clément de Groc edited comment on TINKERPOP-2512 at 2/1/21, 9:30 AM:
---------------------------------------------------------------------

[gremlin.sh|https://github.com/apache/tinkerpop/blob/master/gremlin-console/src/main/bin/gremlin.sh] in gremlin-console works slightly differently: instead of specifying Java classpath using the {{-cp}} argument, it relies on [exporting the CLASSPATH variable|https://github.com/apache/tinkerpop/blob/master/gremlin-console/src/main/bin/gremlin.sh#L61]. So it does not suffer from the same issue than {{gremlin-server.sh}}

I've opened a PR for JanusGraph (which suffers from the same issue) here: https://github.com/JanusGraph/janusgraph/pull/2414


was (Author: cdegroc):
[gremlin.sh|https://github.com/apache/tinkerpop/blob/master/gremlin-console/src/main/bin/gremlin.sh] in gremlin-console works slightly differently: instead of specifying Java classpath using the {{-cp}} argument, it relies on [exporting the CLASSPATH variable|https://github.com/apache/tinkerpop/blob/master/gremlin-console/src/main/bin/gremlin.sh#L61]. So it does not suffer from the same issue than {{gremlin-server.sh}}

I would like to open a PR for JanusGraph (which suffers from the same issue). Can you please tell me if I should target the {{master}} branch or {{v0.5}}?

> Duplicate jars in classpath when running gremlin-server.sh
> ----------------------------------------------------------
>
>                 Key: TINKERPOP-2512
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2512
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 3.4.10
>            Reporter: Clément de Groc
>            Priority: Minor
>
> First noticed with [JanusGraph's gremlin-server.sh|https://github.com/JanusGraph/janusgraph/blob/v0.5.3/janusgraph-dist/src/assembly/static/bin/gremlin-server.sh] but also seems to apply to [TinkerPop's gremlin-server.sh|https://github.com/apache/tinkerpop/blob/master/gremlin-server/src/main/bin/gremlin-server.sh]: the Java classpath contains every jar twice.
> I think this is due to the following
>  * A {{CP}} variable is built ([gremlin-server.sh#L97-L101|https://github.com/apache/tinkerpop/blob/master/gremlin-server/src/main/bin/gremlin-server.sh#L98-L101])
>  * A {{CLASSPATH}} variable is created and assigned CP ([gremlin-server.sh#L103|https://github.com/apache/tinkerpop/blob/master/gremlin-server/src/main/bin/gremlin-server.sh#L103])
>  * Java is started with {{-cp $CP:$CLASSPATH}} ([gremlin-server.sh#L169|https://github.com/apache/tinkerpop/blob/master/gremlin-server/src/main/bin/gremlin-server.sh#L169], gremlin-server.sh#L187, ...)
> Not setting the {{CLASSPATH}} variable or starting java with {{-cp $CP}} should be enough.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)