{"action":"created","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5764","repository_url":"https://api.github.com/repos/orientechnologies/orientdb","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5764/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5764/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5764/events","html_url":"https://github.com/orientechnologies/orientdb/issues/5764","id":135766982,"number":5764,"title":"Help to Create Databse and Its schema to a server (JAVA GRAPH API)","user":{"login":"stfanbrg","id":14077423,"avatar_url":"https://avatars.githubusercontent.com/u/14077423?v=3","gravatar_id":"","url":"https://api.github.com/users/stfanbrg","html_url":"https://github.com/stfanbrg","followers_url":"https://api.github.com/users/stfanbrg/followers","following_url":"https://api.github.com/users/stfanbrg/following{/other_user}","gists_url":"https://api.github.com/users/stfanbrg/gists{/gist_id}","starred_url":"https://api.github.com/users/stfanbrg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stfanbrg/subscriptions","organizations_url":"https://api.github.com/users/stfanbrg/orgs","repos_url":"https://api.github.com/users/stfanbrg/repos","events_url":"https://api.github.com/users/stfanbrg/events{/privacy}","received_events_url":"https://api.github.com/users/stfanbrg/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-02-23T15:26:45Z","updated_at":"2016-02-24T13:28:43Z","closed_at":"2016-02-24T13:18:08Z","body":"Hello,\r\n\r\nI am starting a project and I want to create a new database with custom schema (new class of Vertex and Edge only ) using a remote server. (for my test : localhost )\r\n\r\nBefore to create the database  , I want to test if it exists but It seems I have to use OServerAdmin to test it :: \r\n           \r\n           ODB exception factory.exists : Cannot check the existance of a database in a remote server. \r\n           Please use the console or the OServerAdmin class.\r\n\r\nSo once I had my OServerAdmin, and I checked the Database didn't exist, I create it with \r\n           serverAdmin.createDatabase(\"Test,\"graph\",\"plocal\");\r\nand I create the schema with the follwing function as described in the  Issue #2815\r\n\r\nmy code ::\r\n          private void createVertexType(final String p_Name,final HashMap<String, OType> p_Attributs) throws RuntimeException{\r\n    \tfinal OrientGraph aOrientGraph = new OrientGraph(graphURL); \r\n\t\t\r\n\t\taOrientGraph.executeOutsideTx(new OCallable<Object, OrientBaseGraph>() {\r\n\t\t\t@Override\r\n\t\t\tpublic Object call(OrientBaseGraph iArgument) {\t\r\n\t\t\t\tOrientVertexType vertex = (OrientVertexType) aOrientGraph.createVertexType(p_Name).setClusterSelection(\"default\");\r\n\t\t\t\tIterator<String> keySetIterator = p_Attributs.keySet().iterator();\r\n\t\t\t\twhile(keySetIterator.hasNext()){ \r\n\t\t\t\t\tString key = keySetIterator.next(); \r\n\t\t\t\t\tvertex.createProperty(key, p_Attributs.get(key));\r\n\t\t\t\t} \r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\taOrientGraph.shutdown();\r\n    }\r\n    \r\n    private void createEdgeType(final String p_Name) throws RuntimeException{\r\n    \tfinal OrientGraph aOrientGraph = new OrientGraph(graphURL); \r\n\t\t\r\n\t\taOrientGraph.executeOutsideTx(new OCallable<Object, OrientBaseGraph>() {\r\n\t\t\t@Override\r\n\t\t\tpublic Object call(OrientBaseGraph iArgument) {\t\r\n\t\t\t\taOrientGraph.createEdgeType(p_Name).setClusterSelection(\"default\");\r\n\t\t\t\treturn null;\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\taOrientGraph.shutdown();\r\n\t\t\r\n    }\r\n\r\nAfter this step, if I use ServerAdmin.existsDatabase()  I have a error network like if the server is frozen : \r\n\r\nGRAVE: Cannot open database with url 127.0.0.1:2480/localhost:2480\r\ncom.orientechnologies.common.io.OIOException: Cannot open a connection to remote server: 127.0.0.1:2480/localhost:2480\r\n\tat com.orientechnologies.orient.client.remote.OStorageRemote.getAvailableNetwork(OStorageRemote.java:2136)\r\n\tat com.orientechnologies.orient.client.remote.OStorageRemote.openRemoteDatabase(OStorageRemote.java:1859)\r\n\tat com.orientechnologies.orient.client.remote.OStorageRemote.open(OStorageRemote.java:222)\r\n\tat com.orientechnologies.orient.client.remote.OStorageRemoteThread.open(OStorageRemoteThread.java:89)\r\n\tat com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.open(ODatabaseDocumentTx.java:252)\r\n\tat com.tinkerpop.blueprints.impls.orient.OrientGraphFactory.getDatabase(OrientGraphFactory.java:132)\r\n\tat com.tinkerpop.blueprints.impls.orient.OrientGraphFactory.drop(OrientGraphFactory.java:59)\r\n\tat com.myorpheo.logs.orientdb.OrientDBConnection.dropDatabase(OrientDBConnection.java:282)\r\n\tat com.myorpheo.logs.orientdb.OrientDB.dropDataBase(OrientDB.java:291)\r\n\tat com.myorpheo.logs.orientdb.MYGUI.dropDataBase(MYGUI.java:241)\r\n\tat com.myorpheo.logs.orientdb.MYGUI$5.actionPerformed(MYGUI.java:126)\r\n\tat javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)\r\n\tat javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)\r\n\tat javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)\r\n\tat javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)\r\n\tat javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)\r\n\tat java.awt.Component.processMouseEvent(Component.java:6516)\r\n\tat javax.swing.JComponent.processMouseEvent(JComponent.java:3321)\r\n\tat java.awt.Component.processEvent(Component.java:6281)\r\n\tat java.awt.Container.processEvent(Container.java:2229)\r\n\tat java.awt.Component.dispatchEventImpl(Component.java:4872)\r\n\tat java.awt.Container.dispatchEventImpl(Container.java:2287)\r\n\tat java.awt.Component.dispatchEvent(Component.java:4698)\r\n\tat java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)\r\n\tat java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)\r\n\tat java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)\r\n\tat java.awt.Container.dispatchEventImpl(Container.java:2273)\r\n\tat java.awt.Window.dispatchEventImpl(Window.java:2719)\r\n\tat java.awt.Component.dispatchEvent(Component.java:4698)\r\n\tat java.awt.EventQueue.dispatchEventImpl(EventQueue.java:747)\r\n\tat java.awt.EventQueue.access$300(EventQueue.java:103)\r\n\tat java.awt.EventQueue$3.run(EventQueue.java:706)\r\n\tat java.awt.EventQueue$3.run(EventQueue.java:704)\r\n\tat java.security.AccessController.doPrivileged(Native Method)\r\n\tat java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)\r\n\tat java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)\r\n\tat java.awt.EventQueue$4.run(EventQueue.java:720)\r\n\tat java.awt.EventQueue$4.run(EventQueue.java:718)\r\n\tat java.security.AccessController.doPrivileged(Native Method)\r\n\tat java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)\r\n\tat java.awt.EventQueue.dispatchEvent(EventQueue.java:717)\r\n\tat java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)\r\n\tat java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)\r\n\tat java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)\r\n\tat java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)\r\n\tat java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)\r\n\tat java.awt.EventDispatchThread.run(EventDispatchThread.java:91)\r\nCaused by: com.orientechnologies.common.io.OIOException: Error on connecting to 127.0.0.1:2480/localhost:2480\r\n\tat com.orientechnologies.orient.client.remote.ORemoteConnectionManager.createNetworkConnection(ORemoteConnectionManager.java:255)\r\n\tat com.orientechnologies.orient.client.remote.ORemoteConnectionManager$1.createNewResource(ORemoteConnectionManager.java:80)\r\n\tat com.orientechnologies.orient.client.remote.ORemoteConnectionManager$1.createNewResource(ORemoteConnectionManager.java:77)\r\n\tat com.orientechnologies.common.concur.resource.OResourcePool.getResource(OResourcePool.java:94)\r\n\tat com.orientechnologies.orient.client.remote.ORemoteConnectionManager.acquire(ORemoteConnectionManager.java:101)\r\n\tat com.orientechnologies.orient.client.remote.OStorageRemote.getAvailableNetwork(OStorageRemote.java:2123)\r\n\t... 46 more\r\nCaused by: com.orientechnologies.orient.enterprise.channel.binary.ONetworkProtocolException: Cannot read protocol version from remote server /127.0.0.1:2480: java.net.SocketTimeoutException: Read timed out\r\n\tat com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClient.<init>(OChannelBinaryAsynchClient.java:99)\r\n\tat com.orientechnologies.orient.client.remote.ORemoteConnectionManager.createNetworkConnection(ORemoteConnectionManager.java:242)\r\n\r\nOn the console server I can see ::\r\n2016-02-23 13:46:39:458 INFO  {db=Test} Created database 'Test' of type 'plocal' [ONetworkProtocolBinary]\r\n2016-02-23 13:46:57:535 SEVER Request not supported. Code: -1 [ONetworkProtocolBinary]\r\n2016-02-23 13:46:57:537 SEVER Received unread response from /127.0.0.1:63286 probably corrupted data from the network connection. Cleared dirty data in the buffer (4 bytes): [├┐├┐├┐├┐] [OChannelBinary\r\nServer]\r\n2016-02-23 13:53:15:960 INFO  {db=Test4} Created database 'Test4' of type 'plocal' [ONetworkProtocolBinary]\r\n2016-02-23 15:10:30:463 INFO  {db=Test} Created database 'Test' of type 'plocal' [ONetworkProtocolBinary]\r\n2016-02-23 15:14:42:268 INFO  {db=Test1} Created database 'Test1' of type 'plocal' [ONetworkProtocolBinary]\r\n2016-02-23 15:15:19:230 SEVER Request not supported. Code: -1 [ONetworkProtocolBinary]\r\n2016-02-23 15:15:19:230 SEVER Received unread response from /127.0.0.1:54557 probably corrupted data from the network connection. Cleared dirty data in the buffer (4 bytes): [├┐├┐├┐├┐] [OChannelBinary\r\nServer]\r\n2016-02-23 15:18:04:236 INFO  {db=Test2} Created database 'Test2' of type 'plocal' [ONetworkProtocolBinary]\r\n2016-02-23 15:18:45:266 SEVER Request not supported. Code: -1 [ONetworkProtocolBinary]\r\n2016-02-23 15:18:45:266 SEVER Received unread response from /127.0.0.1:54859 probably corrupted data from the network connection. Cleared dirty data in the buffer (4 bytes): [├┐├┐├┐├┐] [OChannelBinary\r\nServer]\r\n2016-02-23 15:19:37:748 WARNI ->0:0:0:0:0:0:0:1: Command not found: GET.sqlProfiler/Test2 [ONetworkProtocolHttpDb]\r\n2016-02-23 15:19:40:015 SEVER Internal server error:\r\ncom.orientechnologies.orient.core.exception.OQueryParsingException: Error on parsing query at position #8: Error on parsing command at position #0: Error on parsing query\r\nQuery:  _studio WHERE user.name = '{{username}}' AND type = 'GraphConfig'\r\n-------------^\r\n--> com.orientechnologies.orient.core.exception.OCommandExecutionException: Class '_STUDIO' was not found in current database [ONetworkProtocolHttpDb]\r\n2016-02-23 15:34:09:463 INFO  {db=Test5} Created database 'Test5' of type 'plocal' [ONetworkProtocolBinary]\r\n\r\n\r\nwhere is the mistake ?"},"comment":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/comments/188255126","html_url":"https://github.com/orientechnologies/orientdb/issues/5764#issuecomment-188255126","issue_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5764","id":188255126,"user":{"login":"stfanbrg","id":14077423,"avatar_url":"https://avatars.githubusercontent.com/u/14077423?v=3","gravatar_id":"","url":"https://api.github.com/users/stfanbrg","html_url":"https://github.com/stfanbrg","followers_url":"https://api.github.com/users/stfanbrg/followers","following_url":"https://api.github.com/users/stfanbrg/following{/other_user}","gists_url":"https://api.github.com/users/stfanbrg/gists{/gist_id}","starred_url":"https://api.github.com/users/stfanbrg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stfanbrg/subscriptions","organizations_url":"https://api.github.com/users/stfanbrg/orgs","repos_url":"https://api.github.com/users/stfanbrg/repos","events_url":"https://api.github.com/users/stfanbrg/events{/privacy}","received_events_url":"https://api.github.com/users/stfanbrg/received_events","type":"User","site_admin":false},"created_at":"2016-02-24T13:28:42Z","updated_at":"2016-02-24T13:28:42Z","body":"@maggiolo00 \r\nwith Version: Mars Release (4.5.0)"}}