Gremlin inE/outE/in/out for Vertex returns nothing... struggled for days

62 views
Skip to first unread message

Ranqi Zhu

unread,
May 22, 2013, 5:08:26 PM5/22/13
to gremli...@googlegroups.com
I am using tinkerpop 2.3, orientdb 1.4.0
Gremlin inE/outE/in/out for Vertex returns nothing... struggled for days
I build the database using blueprint Frame.

public interface NamedObject extends VertexFrame {


    @Property("name")

    public String getName();


    @Property("name")

    public void setName(final String name);

}



public interface Tile extends NamedObject {


        

    @Property("lat")

    public String getLat();


    @Property("lat")

    public void setLat(double lat);


    @Property("lat")

    public void removeLat();

    

    

    

    @Property("lon")

    public String getLon();


    @Property("lon")

    public void setLon(double lat);


    @Property("lon")

    public void removeLon();

    

    


    @Adjacency(label = "adjacent", direction=Direction.BOTH)

    public Iterable<Tile> getAjacentTiles();


    @Adjacency(label = "adjacent", direction=Direction.BOTH)

    public void setAjacentTile(final Tile adj);

    

    

    

    @Incidence(label = "adjacent")

    public Iterable<Adjacent> getAjacents();

        

    @Incidence(label = "adjacent")

    public Adjacent addAjacents(final Tile tile);


    @Incidence(label = "adjacent")

    public void removeAjacents(final Adjacent adj);

    

    

    

}



public interface Adjacent extends EdgeFrame {


@Property("weight")

public Float getWeight();


@Property("weight")

public void setWeight(float weight);

    @Domain

    public Tile getDomain();


    @Range

    public Tile getRange();

}


Luca Garulli

unread,
May 22, 2013, 5:34:14 PM5/22/13
to gremlin-users
Hi,
you should use BP 2.4.0-SNAPSHOT with OrientDB 1.4.0-SNAPSHOT.

Lvc@


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

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Bryn Cooke

unread,
May 22, 2013, 5:44:03 PM5/22/13
to gremli...@googlegroups.com
Hi,
It looks like you are using Frames, can you make sure you are using 2.3.1 as there was a bug that affected @Adjacency when direction was set to IN where the edge direction was always set to OUT.

<dependency>
    <groupId>com.tinkerpop</groupId>
    <artifactId>frames</artifactId>
    <version>2.3.1</version>
</dependency>

Having said that, I notice that you have Direction.BOTH on setAdjacentTile. Edges in a property graph are not bi-directional so you need to specify either Direction.IN or Direction.OUT. A get method can retrieve incoming and outgoing edges.

If you're still stuck after this then please post some more of your code and I'll try to help.

Thanks,
Bryn

Ranqi Zhu

unread,
May 22, 2013, 6:01:16 PM5/22/13
to gremli...@googlegroups.com
Yes, I am using 2.3.1.  Thanks.

Ranqi Zhu

unread,
May 22, 2013, 6:03:06 PM5/22/13
to gremli...@googlegroups.com
OK... Let me try. 
BTW Are there jars for 2.4? 

Luca Garulli

unread,
May 22, 2013, 6:17:41 PM5/22/13
to gremlin-users
Are bundled into the graphdb/lib directory.

Lvc@

Ranqi Zhu

unread,
May 22, 2013, 6:31:32 PM5/22/13
to gremli...@googlegroups.com
Thank you for the reply. 
But could you articulate where is graphdb/lib? I didn't find any in the checked out blueprint directory. 
I am new so please pardon me. 
Thank you again!

Best,
Ranqi

Luca Garulli

unread,
May 22, 2013, 6:58:35 PM5/22/13
to gremlin-users
Where did you get Blueprints? Maven? Git? OrientDB Graph Edition?

Lvc@

Ranqi Zhu

unread,
May 22, 2013, 7:03:02 PM5/22/13
to gremli...@googlegroups.com
or Could we have 2.4-snapshot in Maven? Thanks!

Marko Rodriguez

unread,
May 22, 2013, 7:10:44 PM5/22/13
to gremli...@googlegroups.com
Hi,

About 1 hour ago I deployed the 2.4.0-SNAPSHOT to SonaType SNAPSHOT repo.

Marko.

Ranqi Zhu

unread,
May 22, 2013, 7:46:52 PM5/22/13
to gremli...@googlegroups.com
Downloaded jar from the Central repo. 
But I just got Marko's 2.4.0-SNAPSHOT at SonaType repo though.
However, now I can't even init a Orientgraph. It dies at

        m_dbg = new OrientGraph("remote:localhost/nycTpFrames1k", "admin", "admin");


Exception in thread "main" java.lang.NoSuchFieldError: CUSTOM

at com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.config(OrientBaseGraph.java:94)

at com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.<init>(OrientBaseGraph.java:89)

at com.tinkerpop.blueprints.impls.orient.OrientTransactionalGraph.<init>(OrientTransactionalGraph.java:30)

at com.tinkerpop.blueprints.impls.orient.OrientGraph.<init>(OrientGraph.java:30)

at com.placeiq.graphdb.GraphBuilderTinkerpop.<init>(GraphBuilderTinkerpop.java:44)

at com.placeiq.graphdb.GraphBuilderTinkerpop.main(GraphBuilderTinkerpop.java:307)


RQ

Ranqi Zhu

unread,
May 22, 2013, 7:47:21 PM5/22/13
to gremli...@googlegroups.com
Got it! Thank you Marko!!
Reply all
Reply to author
Forward
0 new messages