[ 
https://issues.apache.org/jira/browse/TINKERPOP3-698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

stephen mallette closed TINKERPOP3-698.
---------------------------------------
       Resolution: Fixed
    Fix Version/s: 3.0.0.GA
         Assignee: stephen mallette

Fixed via:

 
https://github.com/apache/incubator-tinkerpop/commit/e8597650be5a077cb8a1b18fd7bf97ae95d9c026

This issue didn't have anything to do with TinkerGraph or Gremlin Server. There 
was an issue in the driver that was not properly handling a particular response 
code that was related to "no result" messages returned from the server.

Note that TinkerGraph operates in its "classic" form by default.  In other 
words, it expects the types of IDs to "match".  Therefore, {{g.V(1)}} is not 
the same as {{g.V("1")}}.  your use of String was producing a traversal with no 
results and thus the driver wasn't handling that well. You can change the 
default configuration for TinkerGraph by specifying a different {{IdManager}} 
implementation:

https://github.com/apache/incubator-tinkerpop/blob/e8597650be5a077cb8a1b18fd7bf97ae95d9c026/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java#L76-L78
 

in your configuration:

https://github.com/apache/incubator-tinkerpop/blob/e8597650be5a077cb8a1b18fd7bf97ae95d9c026/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java#L439

This needs to be documented in more detail outside of javadocs.  Making a note 
to do that.  Thanks for reporting this - that was a bad bug.

> g.V("1", "2") throws an error with tinkergraph
> ----------------------------------------------
>
>                 Key: TINKERPOP3-698
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP3-698
>             Project: TinkerPop 3
>          Issue Type: Bug
>          Components: driver
>            Reporter: Dylan Millikin
>            Assignee: stephen mallette
>             Fix For: 3.0.0.GA
>
>
> I'm using gremlin-server & gremlin-console M9-RC3 for this. (I added "server" 
> as a component though it might not be related)
> Essentially it doesn't seem like anything other than g.V(1, 2) works. Any 
> variation of ID ({{g.V(1L, 2L)}}, {{g.V("1", "2")}}) results in the following 
> error (end of post)
> This seems to work ok in titan though.
> You can recreate the issue by running {{bin/gremlin-server 
> conf/gremlin-server-classic.yaml}} then doing:
> {noformat}
>  bin/gremlin.sh 
>          \,,,/
>          (o o)
> -----oOOo-(3)-oOOo-----
> plugin activated: tinkerpop.server
> plugin activated: tinkerpop.utilities
> plugin activated: tinkerpop.tinkergraph
> gremlin> :remote connect tinkerpop.server conf/remote.yaml
> ==>Connected - localhost/127.0.0.1:8182
> gremlin> :> g.V(1,2)
> ==>v[1]
> ==>v[2]
> gremlin> :> g.V("1","2")
> Display stack trace? [yN] y
> org.apache.tinkerpop.gremlin.groovy.plugin.RemoteException: 
>       at 
> org.apache.tinkerpop.gremlin.console.groovy.plugin.DriverRemoteAcceptor.submit(DriverRemoteAcceptor.java:112)
>       at 
> org.apache.tinkerpop.gremlin.console.commands.SubmitCommand.execute(SubmitCommand.groovy:41)
>       at org.codehaus.groovy.tools.shell.Shell.execute(Shell.groovy:101)
>       at 
> org.codehaus.groovy.tools.shell.Groovysh.super$2$execute(Groovysh.groovy)
>       at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:497)
>       at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
>       at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
>       at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
>       at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
>       at 
> org.codehaus.groovy.tools.shell.Groovysh.executeCommand(Groovysh.groovy:254)
>       at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:153)
>       at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:119)
>       at 
> org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:94)
>       at 
> org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)
>       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:497)
>       at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
>       at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
>       at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
>       at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
>       at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150)
>       at 
> org.codehaus.groovy.tools.shell.InteractiveShellRunner.work(InteractiveShellRunner.groovy:123)
>       at 
> org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:58)
>       at 
> org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$run(InteractiveShellRunner.groovy)
>       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:497)
>       at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
>       at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
>       at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
>       at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
>       at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150)
>       at 
> org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:82)
>       at 
> org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
>       at 
> org.apache.tinkerpop.gremlin.console.Console.<init>(Console.groovy:134)
>       at 
> org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
>       at org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:292)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to