Adding this property for key [~T$SchemaName] and value [...] violates a uniqueness constraint

72 views
Skip to first unread message

Matteo Lissandrini

unread,
Aug 7, 2020, 11:21:07 AM8/7/20
to JanusGraph users
Hello,

I'm having this error thrown at me during loading of a large graph (dbpedia)
and I cannot understand what is it complaining about.

Can you help me?

Thanks,
Matteo

Boxuan Li

unread,
Aug 8, 2020, 10:57:43 PM8/8/20
to JanusGraph users
Hi Matteo,

The error log is indeed a bit counter-intuitive. Looks like your program was trying to create a new property (or label), but the property (or label) already existed in the database.

You may want to check your program. I would suggest checking the existence of property (label) before trying to create one.

Regards,
Boxuan

Matteo Lissandrini

unread,
Aug 10, 2020, 12:14:52 PM8/10/20
to JanusGraph users
Hi Boxuan,
thanks for the reply.

This is the full error:

org.janusgraph.core.SchemaViolationException: Adding this property for key [~T$SchemaName] and value [rtns8_designation] violates a uniqueness constraint [SystemIndex#~T$SchemaName]

I actually run a distinct before creating the schema
here is the relevant piece of code

So I am quite sure I am not creating it twice. Any ideas?

Thanks,
Matteo

BO XUAN LI

unread,
Aug 10, 2020, 12:21:36 PM8/10/20
to janusgra...@googlegroups.com
Are you running the code against a clean database? Does the property already exist before you run this piece of code?

-- 
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/87e2ab14-63d5-4e3d-afa5-a020adad8dfan%40googlegroups.com.

Matteo Lissandrini

unread,
Aug 10, 2020, 12:25:46 PM8/10/20
to JanusGraph users
I am loading a graph from scratch in an empty database.
Could it be that there may be an edge label and a property name with the same name?

Boxuan Li

unread,
Aug 10, 2020, 12:28:48 PM8/10/20
to JanusGraph users
Yeah, that's possible. You need to make sure properties and labels don't have the same name.

Matteo Lissandrini

unread,
Aug 10, 2020, 1:03:25 PM8/10/20
to JanusGraph users
So there is no way to have a graph with a property name and an edge label with the same name?

BO XUAN LI

unread,
Aug 10, 2020, 9:19:16 PM8/10/20
to janusgra...@googlegroups.com

Matteo Lissandrini

unread,
Aug 19, 2020, 9:26:50 AM8/19/20
to JanusGraph users
Is this just an arbitrary design decision or is it technically impossible in this architecture?
Reply all
Reply to author
Forward
0 new messages