{"action":"created","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4722","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4722/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4722/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4722/events","html_url":"https://github.com/orientechnologies/orientdb/issues/4722","id":98945854,"number":4722,"title":"[2.1-rc6] IllegalStateException when trying to move vertices","user":{"login":"hho","id":478228,"avatar_url":"https://avatars.githubusercontent.com/u/478228?v=3","gravatar_id":"","url":"https://api.github.com/users/hho","html_url":"https://github.com/hho","followers_url":"https://api.github.com/users/hho/followers","following_url":"https://api.github.com/users/hho/following{/other_user}","gists_url":"https://api.github.com/users/hho/gists{/gist_id}","starred_url":"https://api.github.com/users/hho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hho/subscriptions","organizations_url":"https://api.github.com/users/hho/orgs","repos_url":"https://api.github.com/users/hho/repos","events_url":"https://api.github.com/users/hho/events{/privacy}","received_events_url":"https://api.github.com/users/hho/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"lvca","id":312606,"avatar_url":"https://avatars.githubusercontent.com/u/312606?v=3","gravatar_id":"","url":"https://api.github.com/users/lvca","html_url":"https://github.com/lvca","followers_url":"https://api.github.com/users/lvca/followers","following_url":"https://api.github.com/users/lvca/following{/other_user}","gists_url":"https://api.github.com/users/lvca/gists{/gist_id}","starred_url":"https://api.github.com/users/lvca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvca/subscriptions","organizations_url":"https://api.github.com/users/lvca/orgs","repos_url":"https://api.github.com/users/lvca/repos","events_url":"https://api.github.com/users/lvca/events{/privacy}","received_events_url":"https://api.github.com/users/lvca/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/orientechnologies/orientdb/milestones/60","html_url":"https://github.com/orientechnologies/orientdb/milestones/2.1.1","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/milestones/60/labels","id":1242057,"number":60,"title":"2.1.1","description":"","creator":{"login":"lvca","id":312606,"avatar_url":"https://avatars.githubusercontent.com/u/312606?v=3","gravatar_id":"","url":"https://api.github.com/users/lvca","html_url":"https://github.com/lvca","followers_url":"https://api.github.com/users/lvca/followers","following_url":"https://api.github.com/users/lvca/following{/other_user}","gists_url":"https://api.github.com/users/lvca/gists{/gist_id}","starred_url":"https://api.github.com/users/lvca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvca/subscriptions","organizations_url":"https://api.github.com/users/lvca/orgs","repos_url":"https://api.github.com/users/lvca/repos","events_url":"https://api.github.com/users/lvca/events{/privacy}","received_events_url":"https://api.github.com/users/lvca/received_events","type":"User","site_admin":false},"open_issues":34,"closed_issues":2,"state":"open","created_at":"2015-08-05T13:34:08Z","updated_at":"2015-08-06T00:13:57Z","due_on":"2015-08-11T22:00:00Z","closed_at":null},"comments":4,"created_at":"2015-08-04T11:23:37Z","updated_at":"2015-08-06T08:46:02Z","closed_at":null,"body":"I'm trying to get started with OrientDB, using the \"GratefulDeadConcerts\" demo database.\r\n\r\nI created a class Song and tried to move the song vertices to it:\r\n\r\n```\r\n➜ ./console.sh \r\n\r\nOrientDB console v.2.1-rc6 (build UNKNOWN@r; 2015-07-28 16:19:54+0000) www.orientdb.com\r\nType 'help' to display all the supported commands.\r\nInstalling extensions for GREMLIN language v.2.6.0\r\n\r\norientdb> connect remote:localhost/GratefulDeadConcerts admin admin\r\n\r\nConnecting to database [remote:localhost/GratefulDeadConcerts] with user 'admin'...OK\r\norientdb {db=GratefulDeadConcerts}> create class Song extends V\r\n\r\nClass created successfully. Total classes in database now: 14\r\n\r\norientdb {db=GratefulDeadConcerts}> create class Artist extends V\r\n\r\nClass created successfully. Total classes in database now: 15\r\n\r\norientdb {db=GratefulDeadConcerts}> move vertex (select from v where type='song') to class:Song\r\n\r\nError: com.orientechnologies.orient.core.exception.OCommandExecutionException: Error on execution of command: sql.move vertex (select from v where type='song') to class:Song\r\n\r\nError: java.lang.IllegalStateException: Move vertex requires an active transaction to be executed in safe manner\r\n\r\norientdb {db=GratefulDeadConcerts}> list classes\r\n\r\n\r\nCLASSES\r\n----------------------------------------------+------------------------------------+------------+----------------+\r\n NAME                                         | SUPERCLASS                         | CLUSTERS   | RECORDS        |\r\n----------------------------------------------+------------------------------------+------------+----------------+\r\n Artist                                       | [V]                                | 15         |              0 |\r\n E                                            |                                    | 10         |              0 |\r\n followed_by                                  | [E]                                | 11         |           7047 |\r\n OFunction                                    |                                    | 6          |              0 |\r\n OIdentity                                    |                                    | -          |              0 |\r\n ORestricted                                  |                                    | -          |              0 |\r\n ORIDs                                        |                                    | 8          |              0 |\r\n ORole                                        | [OIdentity]                        | 4          |              3 |\r\n OSchedule                                    |                                    | 7          |              0 |\r\n OTriggered                                   |                                    | -          |              0 |\r\n OUser                                        | [OIdentity]                        | 5          |              3 |\r\n Song                                         | [V]                                | 14         |            100 |\r\n sung_by                                      | [E]                                | 13         |            501 |\r\n V                                            |                                    | 9          |            709 |\r\n written_by                                   | [E]                                | 12         |            501 |\r\n----------------------------------------------+------------------------------------+------------+----------------+\r\n TOTAL = 15                                                                                                 8864 |\r\n----------------------------------------------+------------------------------------+------------+----------------+\r\n```\r\n\r\nEven though an Exception is thrown, the first 100 records seem to be moved to the `Song` class?\r\nThe error message seems to be misleading – if I issue a `begin` before the `move` the outcome is the same.\r\n\r\nWith 2.0.13 everything works as expected."},"comment":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/comments/128293920","html_url":"https://github.com/orientechnologies/orientdb/issues/4722#issuecomment-128293920","issue_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/4722","id":128293920,"user":{"login":"lvca","id":312606,"avatar_url":"https://avatars.githubusercontent.com/u/312606?v=3","gravatar_id":"","url":"https://api.github.com/users/lvca","html_url":"https://github.com/lvca","followers_url":"https://api.github.com/users/lvca/followers","following_url":"https://api.github.com/users/lvca/following{/other_user}","gists_url":"https://api.github.com/users/lvca/gists{/gist_id}","starred_url":"https://api.github.com/users/lvca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lvca/subscriptions","organizations_url":"https://api.github.com/users/lvca/orgs","repos_url":"https://api.github.com/users/lvca/repos","events_url":"https://api.github.com/users/lvca/events{/privacy}","received_events_url":"https://api.github.com/users/lvca/received_events","type":"User","site_admin":false},"created_at":"2015-08-06T08:46:02Z","updated_at":"2015-08-06T08:46:02Z","body":"Is the issue in the console only or with API? I think the console uses an instance with no autoTransaction(true), so when the move vertex does the commit, the TX is not open anymore. If you have this problem in console only, as workaround, please call the `begin` before further move vertex commands"}}