{"action":"created","issue":{"url":"https://api.github.com/repos/DSpace/DSpace/issues/1132","labels_url":"https://api.github.com/repos/DSpace/DSpace/issues/1132/labels{/name}","comments_url":"https://api.github.com/repos/DSpace/DSpace/issues/1132/comments","events_url":"https://api.github.com/repos/DSpace/DSpace/issues/1132/events","html_url":"https://github.com/DSpace/DSpace/pull/1132","id":113854768,"number":1132,"title":"DS-2408: Fix ordering of listeners in web.xml to ensure Kernel always starts before DB migrations happen","user":{"login":"tdonohue","id":483997,"avatar_url":"https://avatars.githubusercontent.com/u/483997?v=3","gravatar_id":"","url":"https://api.github.com/users/tdonohue","html_url":"https://github.com/tdonohue","followers_url":"https://api.github.com/users/tdonohue/followers","following_url":"https://api.github.com/users/tdonohue/following{/other_user}","gists_url":"https://api.github.com/users/tdonohue/gists{/gist_id}","starred_url":"https://api.github.com/users/tdonohue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdonohue/subscriptions","organizations_url":"https://api.github.com/users/tdonohue/orgs","repos_url":"https://api.github.com/users/tdonohue/repos","events_url":"https://api.github.com/users/tdonohue/events{/privacy}","received_events_url":"https://api.github.com/users/tdonohue/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/DSpace/DSpace/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/DSpace/DSpace/milestones/13","html_url":"https://github.com/DSpace/DSpace/milestones/5.4","labels_url":"https://api.github.com/repos/DSpace/DSpace/milestones/13/labels","id":1243782,"number":13,"title":"5.4","description":null,"creator":{"login":"helix84","id":201026,"avatar_url":"https://avatars.githubusercontent.com/u/201026?v=3","gravatar_id":"","url":"https://api.github.com/users/helix84","html_url":"https://github.com/helix84","followers_url":"https://api.github.com/users/helix84/followers","following_url":"https://api.github.com/users/helix84/following{/other_user}","gists_url":"https://api.github.com/users/helix84/gists{/gist_id}","starred_url":"https://api.github.com/users/helix84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helix84/subscriptions","organizations_url":"https://api.github.com/users/helix84/orgs","repos_url":"https://api.github.com/users/helix84/repos","events_url":"https://api.github.com/users/helix84/events{/privacy}","received_events_url":"https://api.github.com/users/helix84/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":15,"state":"open","created_at":"2015-08-06T13:08:53Z","updated_at":"2015-10-28T20:16:19Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-10-28T15:57:33Z","updated_at":"2015-11-02T09:09:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/DSpace/DSpace/pulls/1132","html_url":"https://github.com/DSpace/DSpace/pull/1132","diff_url":"https://github.com/DSpace/DSpace/pull/1132.diff","patch_url":"https://github.com/DSpace/DSpace/pull/1132.patch"},"body":"(*This PR replaces #1008 as this fix is only applicable for the 5.x branch and NOT for master. In the master branch, the way in which DB migrations are kicked off has changed significantly in the API refactor.*)\r\n\r\nSeveral of our webapps load our custom `<listener>` classes in the wrong order, which can cause \"DSpace Kernel cannot be null\" errors to occur that end up blocking the creation of the default Groups...see\r\n\r\nhttps://jira.duraspace.org/browse/DS-2408\r\n\r\nSimply put, the \"org.dspace.servicemanager.servlet.DSpaceKernelServletContextListener\" MUST always be listed FIRST. That Listener is what initializes the DSpace Kernel, and the Kernel must be initialized for DSpace Spring Services to function (otherwise you get those \"DSpace Kernel cannot be null\" errors)\r\n\r\nOAI, REST and RDF all have slightly incorrect `web.xml` files.  This PR fixes each of them, and adds a warning comment to all `web.xml` files to hopefully avoid this problem in the future.\r\n\r\nRegarding DS-2408, if one of these three webapps (OAI, REST, RDF) loads first, then we end up with this Kernel error (and no admin group). If another webapp loads first, then the Kernel is initialized properly and all groups are created successfully."},"comment":{"url":"https://api.github.com/repos/DSpace/DSpace/issues/comments/152962753","html_url":"https://github.com/DSpace/DSpace/pull/1132#issuecomment-152962753","issue_url":"https://api.github.com/repos/DSpace/DSpace/issues/1132","id":152962753,"user":{"login":"aschweer","id":1010888,"avatar_url":"https://avatars.githubusercontent.com/u/1010888?v=3","gravatar_id":"","url":"https://api.github.com/users/aschweer","html_url":"https://github.com/aschweer","followers_url":"https://api.github.com/users/aschweer/followers","following_url":"https://api.github.com/users/aschweer/following{/other_user}","gists_url":"https://api.github.com/users/aschweer/gists{/gist_id}","starred_url":"https://api.github.com/users/aschweer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aschweer/subscriptions","organizations_url":"https://api.github.com/users/aschweer/orgs","repos_url":"https://api.github.com/users/aschweer/repos","events_url":"https://api.github.com/users/aschweer/events{/privacy}","received_events_url":"https://api.github.com/users/aschweer/received_events","type":"User","site_admin":false},"created_at":"2015-11-02T09:09:00Z","updated_at":"2015-11-02T09:09:00Z","body":"I replicated the problem on a clean 5_x install by deploying only the oai webapp. I then ran ./dspace create-administrator and it threw the expected error message. After cleaning the database, applying the patch and repeating the test steps, creating an administrator went through fine (and I could see in the DSpace log that the admin group was created, which didn't happen before the patch. \r\n\r\nMerging to 5_x given that the PR comes from a committer and there is another +1 vote on it."}}