{"action":"created","comment":{"url":"https://api.github.com/repos/neo4j/neo4j/pulls/comments/61875888","id":61875888,"diff_hunk":"@@ -84,6 +87,13 @@ public RecordFormats checkUpgradeable( File storeDirectory )\n             return format;\n         }\n \n+        // If we are trying to open an enterprise store when configured to use community format, then inform the user\n+        // of the config setting to change since downgrades aren't possible but the store can still be opened.\n+        if ( result.actualVersion.startsWith( \"vE\" ) && !format.storeVersion().startsWith( \"vE\" ) )","path":"community/kernel/src/main/java/org/neo4j/kernel/impl/storemigration/UpgradableDatabase.java","position":23,"original_position":23,"commit_id":"472cd6a0312c4772f64a98264ee69cdb0bd4d24a","original_commit_id":"472cd6a0312c4772f64a98264ee69cdb0bd4d24a","user":{"login":"spacecowboy","id":223655,"avatar_url":"https://avatars.githubusercontent.com/u/223655?v=3","gravatar_id":"","url":"https://api.github.com/users/spacecowboy","html_url":"https://github.com/spacecowboy","followers_url":"https://api.github.com/users/spacecowboy/followers","following_url":"https://api.github.com/users/spacecowboy/following{/other_user}","gists_url":"https://api.github.com/users/spacecowboy/gists{/gist_id}","starred_url":"https://api.github.com/users/spacecowboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spacecowboy/subscriptions","organizations_url":"https://api.github.com/users/spacecowboy/orgs","repos_url":"https://api.github.com/users/spacecowboy/repos","events_url":"https://api.github.com/users/spacecowboy/events{/privacy}","received_events_url":"https://api.github.com/users/spacecowboy/received_events","type":"User","site_admin":false},"body":"`result` IS `fromFormat`. Problem is that you can't instantiate the `fromFormat` object from result because the enterprise format is not a known format in this case, resulting in `IllegalArgumentException( \"Unknown store version '\" + storeVersion + \"'\" )` (see `RecordFormatSelector.selectForVersion( result.actualVersion )`).\r\n\r\nI can move the if-clause above into `RecordFormatSelector` if you prefer, e.g. something like:\r\n\r\nIn `RecordFormatSelector`:\r\n\r\n```java\r\n    /**\r\n     * Select record formats for provided store version.\r\n     *\r\n     * @param storeVersion store version to find format for\r\n     * @return record formats\r\n     * @throws IllegalArgumentException if format for specified store version not found\r\n     */\r\n    public static RecordFormats selectForVersion( String storeVersion )\r\n    {\r\n        Iterable<RecordFormats> currentFormats =\r\n                map( RecordFormats.Factory::newInstance, Service.load( RecordFormats.Factory.class ) );\r\n        for ( RecordFormats format : concat( KNOWN_FORMATS, currentFormats ) )\r\n        {\r\n            if ( format.storeVersion().equals( storeVersion ) )\r\n            {\r\n                return format;\r\n            }\r\n        }\r\n        // If we are trying to open an enterprise store but this is not a known format, \r\n        // e.g. we are running community, then inform the user\r\n        // of the config setting to change since downgrades aren't possible but the store can still be opened.\r\n        if ( storeVersion.startsWith( \"vE\" ) )\r\n        {\r\n            throw new StoreUpgrader.UnexpectedUpgradingStoreFormatException();\r\n        }\r\n        throw new IllegalArgumentException( \"Unknown store version '\" + storeVersion + \"'\" );\r\n    }\r\n```\r\n\r\nWhat do you think @lutovich ?\r\n","created_at":"2016-05-03T13:00:07Z","updated_at":"2016-05-03T13:00:07Z","html_url":"https://github.com/neo4j/neo4j/pull/7007#discussion_r61875888","pull_request_url":"https://api.github.com/repos/neo4j/neo4j/pulls/7007","_links":{"self":{"href":"https://api.github.com/repos/neo4j/neo4j/pulls/comments/61875888"},"html":{"href":"https://github.com/neo4j/neo4j/pull/7007#discussion_r61875888"},"pull_request":{"href":"https://api.github.com/repos/neo4j/neo4j/pulls/7007"}}},"pull_request":{"url":"https://api.github.com/repos/neo4j/neo4j/pulls/7007","id":67324946,"html_url":"https://github.com/neo4j/neo4j/pull/7007","diff_url":"https://github.com/neo4j/neo4j/pull/7007.diff","patch_url":"https://github.com/neo4j/neo4j/pull/7007.patch","issue_url":"https://api.github.com/repos/neo4j/neo4j/issues/7007","number":7007,"state":"open","locked":false,"title":"Improve error message for incorrect store format","user":{"login":"spacecowboy","id":223655,"avatar_url":"https://avatars.githubusercontent.com/u/223655?v=3","gravatar_id":"","url":"https://api.github.com/users/spacecowboy","html_url":"https://github.com/spacecowboy","followers_url":"https://api.github.com/users/spacecowboy/followers","following_url":"https://api.github.com/users/spacecowboy/following{/other_user}","gists_url":"https://api.github.com/users/spacecowboy/gists{/gist_id}","starred_url":"https://api.github.com/users/spacecowboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spacecowboy/subscriptions","organizations_url":"https://api.github.com/users/spacecowboy/orgs","repos_url":"https://api.github.com/users/spacecowboy/repos","events_url":"https://api.github.com/users/spacecowboy/events{/privacy}","received_events_url":"https://api.github.com/users/spacecowboy/received_events","type":"User","site_admin":false},"body":"Be more explicit about how the user can open an enterprise-only store if\r\ncurrent config is set to community.","created_at":"2016-04-21T09:44:44Z","updated_at":"2016-05-03T13:00:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b0f4f018a1e7c40ba0e990435f0028815f92debe","assignee":{"login":"lutovich","id":1638145,"avatar_url":"https://avatars.githubusercontent.com/u/1638145?v=3","gravatar_id":"","url":"https://api.github.com/users/lutovich","html_url":"https://github.com/lutovich","followers_url":"https://api.github.com/users/lutovich/followers","following_url":"https://api.github.com/users/lutovich/following{/other_user}","gists_url":"https://api.github.com/users/lutovich/gists{/gist_id}","starred_url":"https://api.github.com/users/lutovich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lutovich/subscriptions","organizations_url":"https://api.github.com/users/lutovich/orgs","repos_url":"https://api.github.com/users/lutovich/repos","events_url":"https://api.github.com/users/lutovich/events{/privacy}","received_events_url":"https://api.github.com/users/lutovich/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/neo4j/neo4j/milestones/6","html_url":"https://github.com/neo4j/neo4j/milestones/3.0","labels_url":"https://api.github.com/repos/neo4j/neo4j/milestones/6/labels","id":1464782,"number":6,"title":"3.0","description":null,"creator":{"login":"pe4cey","id":849508,"avatar_url":"https://avatars.githubusercontent.com/u/849508?v=3","gravatar_id":"","url":"https://api.github.com/users/pe4cey","html_url":"https://github.com/pe4cey","followers_url":"https://api.github.com/users/pe4cey/followers","following_url":"https://api.github.com/users/pe4cey/following{/other_user}","gists_url":"https://api.github.com/users/pe4cey/gists{/gist_id}","starred_url":"https://api.github.com/users/pe4cey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pe4cey/subscriptions","organizations_url":"https://api.github.com/users/pe4cey/orgs","repos_url":"https://api.github.com/users/pe4cey/repos","events_url":"https://api.github.com/users/pe4cey/events{/privacy}","received_events_url":"https://api.github.com/users/pe4cey/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":24,"state":"open","created_at":"2015-12-17T11:38:41Z","updated_at":"2016-04-22T13:48:59Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/neo4j/neo4j/pulls/7007/commits","review_comments_url":"https://api.github.com/repos/neo4j/neo4j/pulls/7007/comments","review_comment_url":"https://api.github.com/repos/neo4j/neo4j/pulls/comments{/number}","comments_url":"https://api.github.com/repos/neo4j/neo4j/issues/7007/comments","statuses_url":"https://api.github.com/repos/neo4j/neo4j/statuses/472cd6a0312c4772f64a98264ee69cdb0bd4d24a","head":{"label":"spacecowboy:3.0-format-error-msg","ref":"3.0-format-error-msg","sha":"472cd6a0312c4772f64a98264ee69cdb0bd4d24a","user":{"login":"spacecowboy","id":223655,"avatar_url":"https://avatars.githubusercontent.com/u/223655?v=3","gravatar_id":"","url":"https://api.github.com/users/spacecowboy","html_url":"https://github.com/spacecowboy","followers_url":"https://api.github.com/users/spacecowboy/followers","following_url":"https://api.github.com/users/spacecowboy/following{/other_user}","gists_url":"https://api.github.com/users/spacecowboy/gists{/gist_id}","starred_url":"https://api.github.com/users/spacecowboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spacecowboy/subscriptions","organizations_url":"https://api.github.com/users/spacecowboy/orgs","repos_url":"https://api.github.com/users/spacecowboy/repos","events_url":"https://api.github.com/users/spacecowboy/events{/privacy}","received_events_url":"https://api.github.com/users/spacecowboy/received_events","type":"User","site_admin":false},"repo":{"id":42576031,"name":"neo4j","full_name":"spacecowboy/neo4j","owner":{"login":"spacecowboy","id":223655,"avatar_url":"https://avatars.githubusercontent.com/u/223655?v=3","gravatar_id":"","url":"https://api.github.com/users/spacecowboy","html_url":"https://github.com/spacecowboy","followers_url":"https://api.github.com/users/spacecowboy/followers","following_url":"https://api.github.com/users/spacecowboy/following{/other_user}","gists_url":"https://api.github.com/users/spacecowboy/gists{/gist_id}","starred_url":"https://api.github.com/users/spacecowboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spacecowboy/subscriptions","organizations_url":"https://api.github.com/users/spacecowboy/orgs","repos_url":"https://api.github.com/users/spacecowboy/repos","events_url":"https://api.github.com/users/spacecowboy/events{/privacy}","received_events_url":"https://api.github.com/users/spacecowboy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/spacecowboy/neo4j","description":"Graphs for Everyone","fork":true,"url":"https://api.github.com/repos/spacecowboy/neo4j","forks_url":"https://api.github.com/repos/spacecowboy/neo4j/forks","keys_url":"https://api.github.com/repos/spacecowboy/neo4j/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spacecowboy/neo4j/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spacecowboy/neo4j/teams","hooks_url":"https://api.github.com/repos/spacecowboy/neo4j/hooks","issue_events_url":"https://api.github.com/repos/spacecowboy/neo4j/issues/events{/number}","events_url":"https://api.github.com/repos/spacecowboy/neo4j/events","assignees_url":"https://api.github.com/repos/spacecowboy/neo4j/assignees{/user}","branches_url":"https://api.github.com/repos/spacecowboy/neo4j/branches{/branch}","tags_url":"https://api.github.com/repos/spacecowboy/neo4j/tags","blobs_url":"https://api.github.com/repos/spacecowboy/neo4j/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spacecowboy/neo4j/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spacecowboy/neo4j/git/refs{/sha}","trees_url":"https://api.github.com/repos/spacecowboy/neo4j/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spacecowboy/neo4j/statuses/{sha}","languages_url":"https://api.github.com/repos/spacecowboy/neo4j/languages","stargazers_url":"https://api.github.com/repos/spacecowboy/neo4j/stargazers","contributors_url":"https://api.github.com/repos/spacecowboy/neo4j/contributors","subscribers_url":"https://api.github.com/repos/spacecowboy/neo4j/subscribers","subscription_url":"https://api.github.com/repos/spacecowboy/neo4j/subscription","commits_url":"https://api.github.com/repos/spacecowboy/neo4j/commits{/sha}","git_commits_url":"https://api.github.com/repos/spacecowboy/neo4j/git/commits{/sha}","comments_url":"https://api.github.com/repos/spacecowboy/neo4j/comments{/number}","issue_comment_url":"https://api.github.com/repos/spacecowboy/neo4j/issues/comments{/number}","contents_url":"https://api.github.com/repos/spacecowboy/neo4j/contents/{+path}","compare_url":"https://api.github.com/repos/spacecowboy/neo4j/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spacecowboy/neo4j/merges","archive_url":"https://api.github.com/repos/spacecowboy/neo4j/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spacecowboy/neo4j/downloads","issues_url":"https://api.github.com/repos/spacecowboy/neo4j/issues{/number}","pulls_url":"https://api.github.com/repos/spacecowboy/neo4j/pulls{/number}","milestones_url":"https://api.github.com/repos/spacecowboy/neo4j/milestones{/number}","notifications_url":"https://api.github.com/repos/spacecowboy/neo4j/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spacecowboy/neo4j/labels{/name}","releases_url":"https://api.github.com/repos/spacecowboy/neo4j/releases{/id}","deployments_url":"https://api.github.com/repos/spacecowboy/neo4j/deployments","created_at":"2015-09-16T08:54:13Z","updated_at":"2015-09-16T08:54:38Z","pushed_at":"2016-05-02T09:35:54Z","git_url":"git://github.com/spacecowboy/neo4j.git","ssh_url":"git@github.com:spacecowboy/neo4j.git","clone_url":"https://github.com/spacecowboy/neo4j.git","svn_url":"https://github.com/spacecowboy/neo4j","homepage":"http://neo4j.com","size":289593,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"2.3"}},"base":{"label":"neo4j:3.0","ref":"3.0","sha":"7fbb44656381fbc123bc8017b30d68c9725e3985","user":{"login":"neo4j","id":201120,"avatar_url":"https://avatars.githubusercontent.com/u/201120?v=3","gravatar_id":"","url":"https://api.github.com/users/neo4j","html_url":"https://github.com/neo4j","followers_url":"https://api.github.com/users/neo4j/followers","following_url":"https://api.github.com/users/neo4j/following{/other_user}","gists_url":"https://api.github.com/users/neo4j/gists{/gist_id}","starred_url":"https://api.github.com/users/neo4j/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neo4j/subscriptions","organizations_url":"https://api.github.com/users/neo4j/orgs","repos_url":"https://api.github.com/users/neo4j/repos","events_url":"https://api.github.com/users/neo4j/events{/privacy}","received_events_url":"https://api.github.com/users/neo4j/received_events","type":"Organization","site_admin":false},"repo":{"id":6650539,"name":"neo4j","full_name":"neo4j/neo4j","owner":{"login":"neo4j","id":201120,"avatar_url":"https://avatars.githubusercontent.com/u/201120?v=3","gravatar_id":"","url":"https://api.github.com/users/neo4j","html_url":"https://github.com/neo4j","followers_url":"https://api.github.com/users/neo4j/followers","following_url":"https://api.github.com/users/neo4j/following{/other_user}","gists_url":"https://api.github.com/users/neo4j/gists{/gist_id}","starred_url":"https://api.github.com/users/neo4j/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neo4j/subscriptions","organizations_url":"https://api.github.com/users/neo4j/orgs","repos_url":"https://api.github.com/users/neo4j/repos","events_url":"https://api.github.com/users/neo4j/events{/privacy}","received_events_url":"https://api.github.com/users/neo4j/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/neo4j/neo4j","description":"Graphs for Everyone","fork":false,"url":"https://api.github.com/repos/neo4j/neo4j","forks_url":"https://api.github.com/repos/neo4j/neo4j/forks","keys_url":"https://api.github.com/repos/neo4j/neo4j/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neo4j/neo4j/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neo4j/neo4j/teams","hooks_url":"https://api.github.com/repos/neo4j/neo4j/hooks","issue_events_url":"https://api.github.com/repos/neo4j/neo4j/issues/events{/number}","events_url":"https://api.github.com/repos/neo4j/neo4j/events","assignees_url":"https://api.github.com/repos/neo4j/neo4j/assignees{/user}","branches_url":"https://api.github.com/repos/neo4j/neo4j/branches{/branch}","tags_url":"https://api.github.com/repos/neo4j/neo4j/tags","blobs_url":"https://api.github.com/repos/neo4j/neo4j/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neo4j/neo4j/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neo4j/neo4j/git/refs{/sha}","trees_url":"https://api.github.com/repos/neo4j/neo4j/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neo4j/neo4j/statuses/{sha}","languages_url":"https://api.github.com/repos/neo4j/neo4j/languages","stargazers_url":"https://api.github.com/repos/neo4j/neo4j/stargazers","contributors_url":"https://api.github.com/repos/neo4j/neo4j/contributors","subscribers_url":"https://api.github.com/repos/neo4j/neo4j/subscribers","subscription_url":"https://api.github.com/repos/neo4j/neo4j/subscription","commits_url":"https://api.github.com/repos/neo4j/neo4j/commits{/sha}","git_commits_url":"https://api.github.com/repos/neo4j/neo4j/git/commits{/sha}","comments_url":"https://api.github.com/repos/neo4j/neo4j/comments{/number}","issue_comment_url":"https://api.github.com/repos/neo4j/neo4j/issues/comments{/number}","contents_url":"https://api.github.com/repos/neo4j/neo4j/contents/{+path}","compare_url":"https://api.github.com/repos/neo4j/neo4j/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neo4j/neo4j/merges","archive_url":"https://api.github.com/repos/neo4j/neo4j/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neo4j/neo4j/downloads","issues_url":"https://api.github.com/repos/neo4j/neo4j/issues{/number}","pulls_url":"https://api.github.com/repos/neo4j/neo4j/pulls{/number}","milestones_url":"https://api.github.com/repos/neo4j/neo4j/milestones{/number}","notifications_url":"https://api.github.com/repos/neo4j/neo4j/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neo4j/neo4j/labels{/name}","releases_url":"https://api.github.com/repos/neo4j/neo4j/releases{/id}","deployments_url":"https://api.github.com/repos/neo4j/neo4j/deployments","created_at":"2012-11-12T08:46:15Z","updated_at":"2016-05-03T05:34:00Z","pushed_at":"2016-05-03T12:43:18Z","git_url":"git://github.com/neo4j/neo4j.git","ssh_url":"git@github.com:neo4j/neo4j.git","clone_url":"https://github.com/neo4j/neo4j.git","svn_url":"https://github.com/neo4j/neo4j","homepage":"http://neo4j.com","size":358794,"stargazers_count":2573,"watchers_count":2573,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":901,"mirror_url":null,"open_issues_count":370,"forks":901,"open_issues":370,"watchers":2573,"default_branch":"3.1"}},"_links":{"self":{"href":"https://api.github.com/repos/neo4j/neo4j/pulls/7007"},"html":{"href":"https://github.com/neo4j/neo4j/pull/7007"},"issue":{"href":"https://api.github.com/repos/neo4j/neo4j/issues/7007"},"comments":{"href":"https://api.github.com/repos/neo4j/neo4j/issues/7007/comments"},"review_comments":{"href":"https://api.github.com/repos/neo4j/neo4j/pulls/7007/comments"},"review_comment":{"href":"https://api.github.com/repos/neo4j/neo4j/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/neo4j/neo4j/pulls/7007/commits"},"statuses":{"href":"https://api.github.com/repos/neo4j/neo4j/statuses/472cd6a0312c4772f64a98264ee69cdb0bd4d24a"}}}}