Main Content

Magnolia Community Forums: Development: Query found more than one node of type "mgnl:role"


  • gzalys
    gzalys
    Full name: Gediminas Zalys
    Posts: 27
    Last post: Nov 23, 2016 7:04:41 AM
    Registered on: Aug 13, 2015
    Query found more than one node of type "mgnl:role"
    #1 by gzalys on Mar 10, 2016 1:20:21 PM

    Hi,

    I have bootstrapped some role remission changes. In order to get the bootstrap files i used export app in the "tools" menu.

    This is an error i started receiving after :
    2016-03-10 20:00:25,649 ERROR nolia.cms.security.RepositoryBackedSecurityManager: Query found more than one node of type "mgnl:role" with name "anonymous" under the root path "/".
    2016-03-10 20:00:25,666 ERROR nolia.cms.security.RepositoryBackedSecurityManager: Query found more than one node of type "mgnl:role" with name "imaging-base" under the root path "/".
    2016-03-10 20:00:29,187 ERROR nolia.cms.security.RepositoryBackedSecurityManager: Query found more than one node of type "mgnl:role" with name "superuser" under the root path "/".


    When i was exporting the roles i only exported the actual role not the entire repository,the export configuration was like below:

    Repository : userroles
    Base path : /anonymous

    Is this the correct way of exporting and importing user permissions under user roles? if yes why are there errors?

  • gzalys
    gzalys
    Full name: Gediminas Zalys
    Posts: 27
    Last post: Nov 23, 2016 7:04:41 AM
    Registered on: Aug 13, 2015
    Re: Query found more than one node of type "mgnl:role"
    #2 by gzalys on Jun 11, 2016 9:50:57 AM

    Any suggestions please? Kind of stuck on this one....

  • tm2016
    tm2016
    Full name: Thomas Martin
    Posts: 1
    Last post: Sep 26, 2016 11:16:35 AM
    Re: Query found more than one node of type "mgnl:role"
    #3 by tm2016 on Sep 26, 2016 11:16:35 AM

    I'd like to back this question: we also face this situation in multiple projects.
    During startup we observed similar outputs. In some instances we see over 200 (!) lines of said messages.
    Anyone has an idea?
    Thanks, Thomas

  • had
    had
    Full name: Jan Haderka
    Posts: 1,405
    Last post: Feb 6, 2017 1:59:05 PM
    Re: Query found more than one node of type "mgnl:role"
    #4 by had on Sep 26, 2016 4:27:38 PM

    Query in question is: "select * from [mgnl] where name() = '<your role>'" so whatever user it is, you have duplicates of that name (same name siblings) for given role. If you see that at startup, it could be either superuser role or if there's some install or scheduled task running it could be whatever role install/schedule tasks are looking for.

    The way to solve it is to look at your userroles workspace via jcr browser or via dump, find out those duplicates and get rid of them.

    HTH,
    Jan

  • gzalys
    gzalys
    Full name: Gediminas Zalys
    Posts: 27
    Last post: Nov 23, 2016 7:04:41 AM
    Registered on: Aug 13, 2015
    Re: Query found more than one node of type "mgnl:role"
    #5 by gzalys on Oct 10, 2016 8:44:28 AM

    I am glad this post has been revived, so i can share my learnings about this behaviour.

    As Jan mentioned above the best thing todo is to check your userroles workspace in JCR to see whether there are any duplicates there, and that will be your culprit.
    However for me, this wasnt the case, in JCR I had only one role, but I started noticing more and more of these messages over the time.

    Mostly this was happening on my local environment. My magnolia setup was pointing to local mysql setup which i frequently wiped, to test install tasks etc. I like clean system to work with. Now what i noticed is that after each wipe i get more of these warning messages... Which made me think that this could be the cause, so i went ahead and removed all the folders in the repository folder too and then cleaned the mysql db also. This has solved the issue.

    It seems that there are some sort of leftovers in the file system, and even if you wipe the DB, those leftovers interfere with the clean system.

    So to summarise, if you wish to wipe DB and start again, also make sure to wipe the folders under magnolia.repositories.home as it seems this error messages is only caused then.

You don't have the permission to post on this thread

Sign in

To login on this forum, you can use your Magnolia Forge, Support or Partner account, or, below, your Google, Yahoo! or OpenID account. If you have trouble logging in, or any other sort of issue, please let us know in the Meta forum, on the user-list, or simply by email at forum-admin at magnolia-cms dot com.

* Required

... or sign in with:

  • icon http://{your-openid-url}
  • icon
  • icon https://me.yahoo.com/