jython-gremlin traversal error

15 views
Skip to first unread message

Real Life Adventure

unread,
May 17, 2020, 8:16:11 PM5/17/20
to JanusGraph users
received below error while accessing traversal api from jython-gremlin

graph = TinkerFactory.createModern()
g = graph.traversal()


ERROR:
 g = graph.traversal()
        at org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategies$GlobalCache.getStrategies(TraversalStrategies.java:276)
        at org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource.<init>(GraphTraversalSource.java:91)
        at org.apache.tinkerpop.gremlin.structure.Graph.traversal(Graph.java:170)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
java.lang.IllegalStateException: java.lang.IllegalStateException: org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph

any suggetions help me out.

Thanks,
RLA.

JB Data31

unread,
May 18, 2020, 9:18:10 AM5/18/20
to janusgra...@googlegroups.com
Can you share, the whole jy file and the command line that produces this output.

@JBΔ



--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/b8a8e6e0-d69f-4d93-9149-116350a45468%40googlegroups.com.

Real Life Adventure

unread,
May 18, 2020, 9:32:41 AM5/18/20
to JanusGraph users
Thanks for the response.

please find below code.
import sys
sys.path.append("/home/admin/EVERESTDX/GREMLIN/apache-tinkerpop-gremlin-console-3.4.6/lib/gremlin-console-3.4.6.jar")
sys.path.append("/home/admin/EVERESTDX/GREMLIN/apache-tinkerpop-gremlin-console-3.4.6/lib/gremlin-core-3.4.6.jar")
sys.path.append("/home/admin/EVERESTDX/GREMLIN/apache-tinkerpop-gremlin-console-3.4.6/lib/gremlin-driver-3.4.6.jar")
sys.path.append("/home/admin/EVERESTDX/GREMLIN/apache-tinkerpop-gremlin-console-3.4.6/lib/gremlin-shaded-3.4.6.jar")
sys.path.append("/home/admin/EVERESTDX/GREMLIN/apache-tinkerpop-gremlin-console-3.4.6/ext/tinkergraph-gremlin/lib/tinkergraph-gremlin-3.4.6.jar")
sys.path.append("/home/admin/EVERESTDX/GREMLIN/apache-tinkerpop-gremlin-console-3.4.6/lib/commons-configuration-1.10.jar")
sys.path.insert(0,'/home/admin/EVERESTDX/GREMLIN/apache-tinkerpop-gremlin-console-3.4.6/lib')

#import org.apache.commons.beanutils.PropertyUtils
from org.apache.tinkerpop.gremlin.tinkergraph.structure import TinkerFactory,TinkerGraph
from org.apache.tinkerpop.gremlin.process.traversal.dsl.graph import GraphTraversalSource
from org.apache.tinkerpop.gremlin.process.traversal import TraversalSource
from org.apache.tinkerpop.gremlin.structure import *


graph = TinkerFactory.createModern()
g = graph.traversal() #line producing below error


RESPONSE:
COMMAND:jython test.py
Traceback (most recent call last):
  File "test.py", line 18, in <module>
    g = graph.traversal() #line producing that error
        at org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategies$GlobalCache.getStrategies(TraversalStrategies.java:276)
        at org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource.<init>(GraphTraversalSource.java:91)
        at org.apache.tinkerpop.gremlin.structure.Graph.traversal(Graph.java:170)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
java.lang.IllegalStateException: java.lang.IllegalStateException: org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph

Thanks,
RLA.

On Monday, May 18, 2020 at 6:48:10 PM UTC+5:30, JB Data31 wrote:
Can you share, the whole jy file and the command line that produces this output.

@JBΔ



Le lun. 18 mai 2020 à 00:16, Real Life Adventure <srinu....@gmail.com> a écrit :
received below error while accessing traversal api from jython-gremlin

graph = TinkerFactory.createModern()
g = graph.traversal()


ERROR:
 g = graph.traversal()
        at org.apache.tinkerpop.gremlin.process.traversal.TraversalStrategies$GlobalCache.getStrategies(TraversalStrategies.java:276)
        at org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource.<init>(GraphTraversalSource.java:91)
        at org.apache.tinkerpop.gremlin.structure.Graph.traversal(Graph.java:170)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
java.lang.IllegalStateException: java.lang.IllegalStateException: org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph

any suggetions help me out.

Thanks,
RLA.

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgra...@googlegroups.com.

JB Data31

unread,
May 18, 2020, 10:21:47 AM5/18/20
to janusgra...@googlegroups.com
$ jython basic346.jy
graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]

Transpose my relative paths to yours absolutes and it should be good.

@JBΔ



To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/cebd2444-d86e-4451-915f-1ca4327ac647%40googlegroups.com.
basic346.jy

Real Life Adventure

unread,
May 18, 2020, 11:48:20 PM5/18/20
to JanusGraph users
Thanks @JB.it is working perfectly.
Reply all
Reply to author
Forward
0 new messages