Skip to content
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

The request SQL Create Edge using HTTP RESTful API does not work #1889

Closed
CrazyUmka opened this issue Dec 17, 2013 · 28 comments
Closed

The request SQL Create Edge using HTTP RESTful API does not work #1889

CrazyUmka opened this issue Dec 17, 2013 · 28 comments
Assignees
Milestone

Comments

@CrazyUmka
Copy link

A post request example:
http://localhost:2480/command/your_DB/sql/create edge E from #9:1 to #9:2
Server Response:
500:Server Internal Error

@lvca
Copy link
Member

lvca commented Dec 17, 2013

Can you report any errors in log files related to this? (log directory)

@CrazyUmka
Copy link
Author

2013-12-17 17:36:51:222 INFO Creating database local:${ORIENTDB_HOME}/databases/vk_graph [OServerCommandPostDatabase]
2013-12-17 17:40:46:318 SEVE Internal server error:
java.lang.NullPointerException [ONetworkProtocolHttpDb]
2013-12-17 17:43:28:084 SEVE Internal server error:
java.lang.NullPointerException [ONetworkProtocolHttpDb]

@lvca
Copy link
Member

lvca commented Dec 18, 2013

What OrientDB version are you using? Please report ALWAYS the OrientDB version in the first message.

@CrazyUmka
Copy link
Author

2013-12-17 17:28:15:847 INFO Loading configuration from: C:/Users/Grigory/Documents/orientdb-community-1.6.2/config/orientdb-server-config.xml... [OServerConfigurationLoaderXml]
2013-12-17 17:28:16:101 INFO OrientDB Server v1.6.2 (build UNKNOWN@r${buildNumber}; 2013-12-09 17:04:17+0100) is starting up... [OServer]
2013-12-17 17:28:16:111 INFO Databases directory: C:\Users\Grigory\Documents\orientdb-community-1.6.2\databases [OServer]
2013-12-17 17:28:16:145 INFO Listening binary connections on 0.0.0.0:2424 (protocol v.19) [OServerNetworkListener]
2013-12-17 17:28:16:146 INFO Listening http connections on 0.0.0.0:2480 (protocol v.10) [OServerNetworkListener]
2013-12-17 17:28:16:156 INFO Installing dynamic plugin 'studio-1.6.2.zip'... [OServerPluginManager]
2013-12-17 17:28:16:312 INFO Mail plugin installed and active. Loaded 1 profile(s): [default] [OMailPlugin]
2013-12-17 17:28:16:314 INFO OrientDB Server v1.6.2 is active. [OServer]
2013-12-17 17:29:09:393 WARN segment file 'default.0.oda' was not closed correctly last time [ODataLocal]
2013-12-17 17:29:09:450 WARN segment file 'default.odh' was not closed correctly last time [ODataLocalHole]
2013-12-17 17:29:09:532 WARN segment file 'database.ocf' was not closed correctly last time [OSingleFileSegment]
2013-12-17 17:29:09:695 WARN segment file 'index.0.oda' was not closed correctly last time [ODataLocal]
2013-12-17 17:29:09:751 WARN segment file 'index.odh' was not closed correctly last time [ODataLocalHole]
2013-12-17 17:29:09:774 WARN segment file 'internal.0.ocl' was not closed correctly last time [OMultiFileSegment]
2013-12-17 17:29:09:837 WARN segment file 'internal.och' was not closed correctly last time [OClusterLocalHole]
2013-12-17 17:29:09:854 WARN segment file 'index.0.ocl' was not closed correctly last time [OMultiFileSegment]
2013-12-17 17:29:09:921 WARN segment file 'index.och' was not closed correctly last time [OClusterLocalHole]
2013-12-17 17:29:09:937 WARN segment file 'manindex.0.ocl' was not closed correctly last time [OMultiFileSegment]
2013-12-17 17:29:10:001 WARN segment file 'manindex.och' was not closed correctly last time [OClusterLocalHole]
2013-12-17 17:29:10:027 WARN segment file 'default.0.ocl' was not closed correctly last time [OMultiFileSegment]
2013-12-17 17:29:10:093 WARN segment file 'default.och' was not closed correctly last time [OClusterLocalHole]
2013-12-17 17:29:10:119 WARN segment file 'orole.0.ocl' was not closed correctly last time [OMultiFileSegment]
2013-12-17 17:29:10:178 WARN segment file 'orole.och' was not closed correctly last time [OClusterLocalHole]
2013-12-17 17:29:10:195 WARN segment file 'ouser.0.ocl' was not closed correctly last time [OMultiFileSegment]
2013-12-17 17:29:10:253 WARN segment file 'ouser.och' was not closed correctly last time [OClusterLocalHole]
2013-12-17 17:29:10:274 WARN segment file 'orids.0.ocl' was not closed correctly last time [OMultiFileSegment]
2013-12-17 17:29:10:333 WARN segment file 'orids.och' was not closed correctly last time [OClusterLocalHole]
2013-12-17 17:29:10:362 WARN segment file 'ofunction.0.ocl' was not closed correctly last time [OMultiFileSegment]
2013-12-17 17:29:10:426 WARN segment file 'ofunction.och' was not closed correctly last time [OClusterLocalHole]
2013-12-17 17:29:10:440 WARN segment file 'oschedule.0.ocl' was not closed correctly last time [OMultiFileSegment]
2013-12-17 17:29:10:506 WARN segment file 'oschedule.och' was not closed correctly last time [OClusterLocalHole]
2013-12-17 17:29:10:552 WARN segment file 'v.0.ocl' was not closed correctly last time [OMultiFileSegment]
2013-12-17 17:29:10:634 WARN segment file 'v.och' was not closed correctly last time [OClusterLocalHole]
2013-12-17 17:29:10:658 WARN segment file 'e.0.ocl' was not closed correctly last time [OMultiFileSegment]
2013-12-17 17:29:10:721 WARN segment file 'e.och' was not closed correctly last time [OClusterLocalHole]
2013-12-17 17:29:10:897 WARN segment file 'txlog.otx' was not closed correctly last time [OTxSegment]
2013-12-17 17:29:11:576 INFO Wait till indexes restore after crash was finished. [OIndexManagerShared]
2013-12-17 17:29:12:651 INFO Index dictionary is not automatic index and will be added as is. [OIndexManagerShared$1]
2013-12-17 17:29:12:780 INFO Index dictionary was added in DB index list. [OIndexManagerShared$1]
2013-12-17 17:29:12:787 INFO Start creation of index OUser.name [OIndexManagerShared$1]
2013-12-17 17:29:12:955 INFO Index OUser.name was successfully created and rebuild is going to be started. [OIndexManagerShared$1]
2013-12-17 17:29:13:046 INFO Rebuild of OUser.name index was successfully finished. [OIndexManagerShared$1]
2013-12-17 17:29:13:049 INFO Start creation of index ORole.name [OIndexManagerShared$1]
2013-12-17 17:29:13:177 INFO Index ORole.name was successfully created and rebuild is going to be started. [OIndexManagerShared$1]
2013-12-17 17:29:13:218 INFO Rebuild of ORole.name index was successfully finished. [OIndexManagerShared$1]
2013-12-17 17:29:13:220 INFO 3 indexes were restored successfully, 0 errors [OIndexManagerShared$1]
2013-12-17 17:29:13:222 INFO Indexes restore after crash was finished. [OIndexManagerShared]
2013-12-17 17:36:51:222 INFO Creating database local:${ORIENTDB_HOME}/databases/vk_graph [OServerCommandPostDatabase]
2013-12-17 17:40:46:318 SEVE Internal server error:
java.lang.NullPointerException [ONetworkProtocolHttpDb]
2013-12-17 17:43:28:084 SEVE Internal server error:
java.lang.NullPointerException [ONetworkProtocolHttpDb]

@lvca
Copy link
Member

lvca commented Dec 20, 2013

It's not clear where the NPE happens. May you try it against last OrientDB version? Look at: https://github.com/orientechnologies/orientdb/wiki/Tutorial%3A-Installation#compile-your-own-the-community-edition. If the problem persists is it doable to send us the database (compressed) ?

@CrazyUmka
Copy link
Author

I compiled your source, but the problem has not been solved.

@CrazyUmka
Copy link
Author

Log Orient:
2013-12-27 20:42:31:733 INFO Loading configuration from: C:/Users/Grigory/releases/orientdb-community-1.6.2/config/orientdb-server-config.xml... [OServerConfigurationLoaderXml]
2013-12-27 20:42:32:602 INFO OrientDB Server v1.6.2 (build 5) is starting up... [OServer]
2013-12-27 20:42:32:625 INFO Databases directory: C:\Users\Grigory\releases\orientdb-community-1.6.2\databases [OServer]
2013-12-27 20:42:32:709 INFO Listening binary connections on 0.0.0.0:2424 (protocol v.19) [OServerNetworkListener]
2013-12-27 20:42:32:710 INFO Listening http connections on 0.0.0.0:2480 (protocol v.10) [OServerNetworkListener]
2013-12-27 20:42:32:735 INFO Installing dynamic plugin 'studio-1.6.2.zip'... [OServerPluginManager]
2013-12-27 20:42:32:847 INFO Installing GREMLIN language v.2.5.0-SNAPSHOT - graph.pool.max=50 [OGraphServerHandler]
2013-12-27 20:42:33:258 INFO OrientDB Server v1.6.2 is active. [OServer]
2013-12-27 20:46:17:816 INFO Creating database local:${ORIENTDB_HOME}/databases/vk_new [OServerCommandPostDatabase]
2013-12-27 20:48:09:552 SEVE Internal server error:
java.lang.NullPointerException [ONetworkProtocolHttpDb]

@lvca
Copy link
Member

lvca commented Dec 27, 2013

The log "Server v1.6.2" means that you've compiled an old version. Follow these instructions: https://github.com/orientechnologies/orientdb/wiki/Tutorial%3A-Installation#compile-your-own-the-community-edition

@lvca lvca closed this as completed Dec 27, 2013
@ghost ghost assigned lvca Dec 27, 2013
@CrazyUmka
Copy link
Author

What is the latest version orientDB?

@lvca
Copy link
Member

lvca commented Dec 27, 2013

The develop branch: 2.0-SNAPSHOT.

@CrazyUmka
Copy link
Author

Where is it? I git clone at address https://github.com/orientechnologies/orientdb.git
And i follow these steps:
Compile your own the Community Edition

Alternatively you can clone the Community Edition project from GitHub and compile it if you want to use the most latest functionality. For this task you have to install the Apache Ant tool and follow these steps:

git clone git@github.com:orientechnologies/orientdb.git
cd orientdb
ant clean install

After the compilation binaries will be placed under ../releases directory.

@lvca
Copy link
Member

lvca commented Dec 27, 2013

Sorry it was:
git clone -b develop git@github.com:orientechnologies/orientdb.git

@CrazyUmka
Copy link
Author

Thanks, now I will try

@CrazyUmka
Copy link
Author

log orient:
2013-12-27 21:27:29:866 INFO Loading configuration from: C:/Users/Grigory/Desktop/releases/orientdb-community-2.0-SNAPSHOT/config/orientdb-server-config.xml... [OServerConfigurationLoaderXml]
2013-12-27 21:27:30:073 INFO OrientDB Server v2.0-SNAPSHOT (build 0) is starting up... [OServer]
2013-12-27 21:27:30:082 INFO Databases directory: C:\Users\Grigory\Desktop\releases\orientdb-community-2.0-SNAPSHOT\databases [OServer]
2013-12-27 21:27:30:107 INFO Listening binary connections on 0.0.0.0:2424 (protocol v.19) [OServerNetworkListener]
2013-12-27 21:27:30:109 INFO Listening http connections on 0.0.0.0:2480 (protocol v.10) [OServerNetworkListener]
2013-12-27 21:27:30:115 INFO Installing dynamic plugin 'studio-1.6.2.zip'... [OServerPluginManager]
2013-12-27 21:27:30:174 INFO Mail plugin installed and active. Loaded 1 profile(s): [default] [OMailPlugin]
2013-12-27 21:27:30:415 INFO OrientDB Server v2.0-SNAPSHOT is active. [OServer]
2013-12-27 21:28:38:679 INFO Creating database local:${ORIENTDB_HOME}/databases/new_base [OServerCommandPostDatabase]
2013-12-27 21:29:54:678 SEVE Internal server error:
java.lang.NullPointerException [ONetworkProtocolHttpDb]

@CrazyUmka
Copy link
Author

Problem hasn't been solved...

@CrazyUmka
Copy link
Author

And what should I do?

@CrazyUmka
Copy link
Author

Please open Issue

@andrii0lomakin
Copy link
Member

Grigory,
)) I did not merge this fix

@andrii0lomakin
Copy link
Member

Could you check hotfix-1.6.3 branch.
In git directory could you execute "git checkout hotfix-1.6.3" and then "git pull" and then try "ant clean release" and run server.

@CrazyUmka
Copy link
Author

Do you speak Russian?

@andrii0lomakin
Copy link
Member

Sure but I do not do it in bug tracker ).

@CrazyUmka
Copy link
Author

How can I write to you personally?

@CrazyUmka
Copy link
Author

Error. I install release orientdb-community-1.6.3-SNAPSHOT.
I don't create vertex.
My Error:
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=2480): Max retries exceeded with url: /command/data_base/sql/create%20vertex%20V%20set%20name='Greg'

@CrazyUmka
Copy link
Author

Question... I test new version orientDB, but I find new bug OrientDB REST... I can't create vertex...
Using request: http://localhost:2480/command/test_data/sql/create vertex V set name = 'Greg'
0 NO RESPONSE Loading time: 30601 ms
I use testing browser rest client, type request: post
I'm doing something wrong? You can explain to me, please.

@lvca
Copy link
Member

lvca commented Jan 18, 2014

Only with 1.6.3 you have to pass the "Accept: application/json;" header.

@lvca lvca closed this as completed Jan 18, 2014
@CrazyUmka
Copy link
Author

Reopen Issue, please... Create vertex successfully, but create edge 500 Internal Server Error Loading time: 17 ms

@lvca lvca reopened this Jan 18, 2014
@CrazyUmka
Copy link
Author

Why in version OrientDB 1.7 rc1, error create edge is not corrected?
500 Server Internal Error, maybe can i do something wrong.

@andrii0lomakin
Copy link
Member

Could you encode your url to following http://localhost:2480/command/cedgetest/sql/create edge from %2311%3A0 to %2311%3A1 sharp is treated as anchor reference and truncated so part of the request test is sent to the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants