Problem creating a basic edge

66 views
Skip to first unread message

Steven McCraw

unread,
Mar 7, 2013, 3:41:29 PM3/7/13
to pacer...@googlegroups.com
Hi All,

I'm still in the early stages of getting started, so I'm sure I'm doing something ridiculous.  I'm following the documentation in the README to figure out how to add an edge, and it oddly works in a few cases, but in some cases it throws a weird exception.  Here's what I'm trying to do:

G.create_edge(nil, action, product, :product)

And here's the stack trace I get:

#<NativeException: java.lang.IllegalArgumentException: The type of given name is not a label: product> with backtrace:
         # com/thinkaurelius/titan/graphdb/transaction/AbstractTitanTx.java:287:in `getEdgeLabel'
         # com/thinkaurelius/titan/graphdb/transaction/AbstractTitanTx.java:230:in `addEdge'
         # com/thinkaurelius/titan/graphdb/blueprints/TitanBlueprintsTransaction.java:93:in `addEdge'
         # sun/reflect/NativeMethodAccessorImpl.java:-2:in `invoke0'
         # sun/reflect/NativeMethodAccessorImpl.java:57:in `invoke'
         # sun/reflect/DelegatingMethodAccessorImpl.java:43:in `invoke'
         # java/lang/reflect/Method.java:601:in `invoke'
         # com/thinkaurelius/titan/graphdb/transaction/AbstractTitanTx.java:287:in `getEdgeLabel'
         # com/thinkaurelius/titan/graphdb/transaction/AbstractTitanTx.java:230:in `addEdge'
         # com/thinkaurelius/titan/graphdb/blueprints/TitanBlueprintsTransaction.java:93:in `addEdge'
         # java/lang/reflect/Method.java:601:in `invoke'
         # ./app/titan/action.rb:38:in `add_product_from_data'


This seems like a very simple thing to want to do, but apparently titan needs some special handling for labels?  I can't explain what this works for some vertices and not others though.  Does anybody have ideas about what might be going wrong?

Thanks,
Mark

Steven McCraw

unread,
Mar 7, 2013, 5:06:15 PM3/7/13
to pacer...@googlegroups.com
Kindly ignore my last message.  I *was* doing something ridiculous, and now I understand it.  Essentially the problem was that I was (due to a bug in my code) creating a type on a vertex, and then trying to create the same type for an edge.  Sorry for the noise.

Darrick Wiebe

unread,
Mar 7, 2013, 7:02:15 PM3/7/13
to Pacer Group
Hey, no problem. Happy to answer your questions if they come up :)


--
You received this message because you are subscribed to the Google Groups "pacer-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pacer-users...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Steven McCraw

unread,
Mar 7, 2013, 10:01:12 PM3/7/13
to pacer...@googlegroups.com
Thanks Darrick!

I'm still feeling my way through, but it's all starting to click. I really appreciate the effort you put into this!

Sent from my mobile device. Apologies for brevity.
Reply all
Reply to author
Forward
0 new messages