-
Notifications
You must be signed in to change notification settings - Fork 871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to create edges in the latest 1.4.0 (June 7th, 2013) #1518
Comments
Probably WRITTEN_BY doesn't extend V ? Can you connect with the console and type: orientdb> list classes On create edge specify always the class name, or "E" if you don't care about sub-types. |
Shouldn't WRITTEN_BY extend E since it's defining edges, and not V as in your question? If I type: create edge E from #9:1 to #9:2 I get: Error: java.lang.IllegalArgumentException: Edge label can not be null So in short: when using custom class which extends E, I get: "Error: com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error on parsing command at position #0: Class [here goes custom class name] was not found" |
I've more information now if needed. "Tinkerpop" database that comes with OrientDB has 3 classes extended from class E: followed_by, sung_by, written_by. If I try to create an edge for class "written_by" I get an error I reported earlier (Class WRITTEN_BY was not found). |
Ok, it seems I've narrowed the problem. I've just installed OrientDB on one of our test Ubuntu servers, and everything is working OK: creating databases, creating classes extended from either V or E, creating nodes and creating edges. The original problem is still persistent on my own Windows machine, but I've also noticed another problem which might be related to this one. When I start OrientDB server, I can create a new database (let's say it's name is "ABC"). I can then connect to that database and make changes (add classes, add data). If I shut down the server, and restart it, next time I try to connect to my ABC database I get the following error:
I don't know why but it repeats certain parts of the path when it tries to connect to my new database. My OrientDB installation path is:
and my ABC database is located in:
but server tries to access my database here (which is non-existing location):
It seems OrientDB doesn't write the database path correctly when the database is created for the first time which might cause the original issue ("Class [some class] was not found"). |
I don't know why this issue is closed and marked as "Invalid", yet it's behaving same with 1.4.1 version. I've managed to fix issue with wrong path, but issue with creating edges is still persistent. However, I've some more information regarding this issue. It seems the problem is only with the first created class extended from E because if I try to add another class which extends E, I can successfully create an edge. So, to make the long story short: create "Users" class which extends V class, and two classes "Friendship" and "Hates" which extend E class. Following happens:
Now, if I delete both "Friendship" and "Hates" classes, and recreate them in the following order: first "Hates", then "Friendship", then I have the following:
I hope this helps. |
I've replicated your case and seems to work with latest snapshot. Please, can you check if it's the same of your? orientdb> create database local:/temp/databases/issue1518 admin admin local graph Current database is: local:/temp/databases/issue1518 orientdb> create class Users extends V Class created successfully. Total classes in database now: 11 orientdb> create class Friendship extends E Class created successfully. Total classes in database now: 12 orientdb> create class Hates extends E Class created successfully. Total classes in database now: 13 orientdb> create vertex Users set name = 'Luca' Created vertex 'Users#11:0{name:Luca} v0' in 0,010000 sec(s). orientdb> create vertex Users set name = 'Nobody' Created vertex 'Users#11:1{name:Nobody} v0' in 0,001000 sec(s). orientdb> create edge Friendship from #11:0 to #11:1 Created edge '[e[#11:0->#11:1][#11:0-Friendship->#11:1]]' in 0,005000 sec(s). orientdb> create edge Hates from #11:0 to #11:1 Created edge '[e[#11:0->#11:1][#11:0-Hates->#11:1]]' in 0,002000 sec(s). orientdb> |
With both 1.4.2 and 1.5.0 snapshots I'm having same issue, but even worse: I'm not able to create edges for any class no matter in which order they were created. 1.4.1 is OK, but it's not working with the first created class. However, by your database path I'd assume you're using Linux based system. As stated before, even 1.4.0 is working OK on Ubuntu, I seem to only have problems on Windows. |
Can you create/work with the database using slashs instead of back-slashes? It could be the reason. |
I'm going to close this issue. If the problem persists with last snapshot please reopen/comment this. |
I've installed the latest stable 1.4.0 Snapshot from June 7th, 2013 and I'm not able to create edges to nodes through console nor web interface. I'm using "tinkerpop" database, and the following to create a test edge:
create edge written_by from #9:1 to #9:2
but I'm getting an error saying:
"Error: com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error on parsing command at position #0: Class WRITTEN_BY was not found"
even tough the class "written_by" exists. I've tried to create my own database, and adding nodes is working, but trying to add edges fails. If I don't use class name and just try to execute:
create edge from #9:1 to #9:2
I get the error saying:
"Error: java.lang.IllegalArgumentException: Edge label can not be null"
The text was updated successfully, but these errors were encountered: