Closed pmontu closed 6 years ago
I just tested it and it worked.
[pieter@pieter-work2 bin]$ ./gremlin.sh
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: tinkerpop.tinkergraph
gremlin> :install org.umlg sqlg-postgres 1.3.3-SNAPSHOT
==>Loaded: [org.umlg, sqlg-postgres, 1.3.3-SNAPSHOT]
gremlin> :plugin list
==>tinkerpop.server[active]
==>tinkerpop.gephi
==>tinkerpop.utilities[active]
==>tinkerpop.sugar
==>tinkerpop.credentials
==>tinkerpop.tinkergraph[active]
==>sqlg.postgres
gremlin> :plugin use sqlg.postgres
==>sqlg.postgres activated
==>:exit
The :exit
first else the classpath won't include Sqlg
[pieter@pieter-work2 bin]$ ./gremlin.sh
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: sqlg.postgres
plugin activated: tinkerpop.tinkergraph
gremlin> :install org.umlg sqlg-postgres 1.3.3-SNAPSHOT
==>a module with the name sqlg-postgres is already installed
gremlin> :plugin use sqlg.postgres
==>sqlg.postgres activated
gremlin> graph = SqlgGraph.open('/home/pieter/Projects/sqlg/sqlg/sqlg-postgres-parent/sqlg-postgres/src/test/resources/sqlg.properties')
==>sqlggraph[SqlGraph] (jdbc:postgresql://localhost:5432/sqlgraphdb)
gremlin> g = graph.traversal()
==>sqlggraphtraversalsource[sqlggraph[SqlGraph] (jdbc:postgresql://localhost:5432/sqlgraphdb), standard]
gremlin> g.V()
==>v[public.A:::1]
==>v[public.B:::1]
==>v[public.C:::1]
gremlin>
My database happens to have those 3 elements in it.
I'd suggest clean your .groovy/grape folder. Think it gets confused. I am on a new laptop and this was the first time I tested the gremlin console as I do not normally make use of it.
Thank you for your reply
I downloaded https://archive.apache.org/dist/tinkerpop/3.2.3/apache-tinkerpop-gremlin-console-3.2.3-bin.zip and unzipped it. Then ran below commands
$ bin/gremlin.sh
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: tinkerpop.tinkergraph
gremlin> :plugin list
==>tinkerpop.server[active]
==>tinkerpop.gephi
==>tinkerpop.utilities[active]
==>tinkerpop.sugar
==>tinkerpop.credentials
==>tinkerpop.tinkergraph[active]
gremlin> :install org.umlg sqlg-postgres 1.3.3-SNAPSHOT
==>Conflicting module versions. Module [groovy-xml is loaded in version 2.4.7 and you are trying to load version 2.4.8
I tried using the dialect version by running below commands in vien
$ bin/gremlin.sh
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: tinkerpop.tinkergraph
gremlin> :install org.umlg sqlg-postgres-dialect 1.3.3-SNAPSHOT
==>Loaded: [org.umlg, sqlg-postgres-dialect, 1.3.3-SNAPSHOT]
gremlin> :plugin list
==>tinkerpop.server[active]
==>tinkerpop.gephi
==>tinkerpop.utilities[active]
==>tinkerpop.sugar
==>tinkerpop.credentials
==>tinkerpop.tinkergraph[active]
gremlin>
Deleting the .groovy folder dint work for me
Did you activate the plugin?
gremlin> :plugin use sqlg.postgres
==>sqlg.postgres activated
Only realize now, you should download the latest gremlin-console http://apache.is.co.za/tinkerpop/3.2.4/apache-tinkerpop-gremlin-console-3.2.4-bin.zip
I just tried with that one and it worked.
BTW I just released Sqlg 1.3.3 so I had to first uninstall the previous version from the console. Here is my full console,
[pieter@pieter-work2 bin]$ ./gremlin.sh
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: sqlg.postgres
plugin activated: tinkerpop.tinkergraph
gremlin> :install org.umlg sqlg-postgres 1.3.3
==>a module with the name sqlg-postgres is already installed
gremlin> :uninstall sqlg-postgres
==>Uninstalled sqlg-postgres - restart the console for removal to take effect
gremlin> :exit
[pieter@pieter-work2 bin]$ ./gremlin.sh
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: tinkerpop.tinkergraph
gremlin> :install org.umlg sqlg-postgres 1.3.3
==>Loaded: [org.umlg, sqlg-postgres, 1.3.3]
gremlin> :plugin use sqlg.postgres
==>sqlg.postgres activated
gremlin> graph = SqlgGraph.open('/home/pieter/Projects/sqlg/sqlg/sqlg-postgres-parent/sqlg-postgres/src/test/resources/sqlg.properties')
java.lang.IllegalStateException
Type ':help' or ':h' for help.
Display stack trace? [yN]N
gremlin> :exit
[pieter@pieter-work2 bin]$ ./gremlin.sh
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: sqlg.postgres
plugin activated: tinkerpop.tinkergraph
gremlin> :plugin use sqlg.postgres
==>sqlg.postgres activated
gremlin> graph = SqlgGraph.open('/home/pieter/Projects/sqlg/sqlg/sqlg-postgres-parent/sqlg-postgres/src/test/resources/sqlg.properties')
==>sqlggraph[SqlGraph] (jdbc:postgresql://localhost:5432/sqlgraphdb)
gremlin> g = graph.traversal()
==>sqlggraphtraversalsource[sqlggraph[SqlGraph] (jdbc:postgresql://localhost:5432/sqlgraphdb), standard]
gremlin> g.V()
==>v[public.AOptional:::1]
==>v[public.COptional:::1]
==>v[public.COptional:::2]
==>v[public.COptional:::3]
==>v[public.COptional:::4]
==>v[public.COptional:::5]
==>v[public.COptional:::6]
==>v[public.BOptional:::1]
==>v[public.BOptional:::2]
==>v[public.BOptional:::3]
==>v[public.BBOptional:::1]
==>v[public.BBOptional:::2]
==>v[public.BBOptional:::3]
gremlin>
Thank you so much. I used the new version. It works now
$ bin/gremlin.sh
\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: sqlg.postgres
plugin activated: tinkerpop.tinkergraph
gremlin> graph = SqlgGraph.open('conf/sqlg.properties')
==>sqlggraph[SqlGraph] (jdbc:postgresql://localhost:5432/tinkerpop)
gremlin> g = graph.traversal()
==>sqlggraphtraversalsource[sqlggraph[SqlGraph] (jdbc:postgresql://localhost:5432/tinkerpop), standard]
gremlin> g.V()
==>v[public.concept:::1]
gremlin>
Great!
It stopped working for me for sqlg 1.5.0
and gremlin-console 3.3.1
.
gremlin> :install org.umlg sqlg-postgres 1.5.0
==>Loaded: [org.umlg, sqlg-postgres, 1.5.0]
gremlin> :plugin list
==>tinkerpop.server[active]
==>tinkerpop.gephi
==>tinkerpop.utilities[active]
==>tinkerpop.sugar
==>tinkerpop.credentials
==>tinkerpop.tinkergraph[active]
It doesn't show in the list of :show imports
either.
I wonder if there are any dependencies that need to be additionally installed
I'll investigate. The console can be somewhat sensitive at times.
It's not a deal-breaker, it's just one of those "ok, now what" moments :)
This has been fixed.
tinkerpop version 3.2.3