Cannot Delete Group Members/Subgroups from Groups in dspace v6.3

531 views
Skip to first unread message

Jordan

unread,
Jun 11, 2020, 12:17:00 PM6/11/20
to DSpace Technical Support
I'm attempting to remove a subgroup from a group in the group editor in dspace v6.3. I am in the Administrator group, so I should have permissions to do this, but when i select the subgroup from the "Group Members" pane, click "Remove", and then click "Update," I get an Internal Server Error, and the subgroup is NOT deleted from the parent group. I also get an Internal Server Error when trying to add a subgroup as a Group Member of a parent group, but the subgroup IS added successfully (despite the Internal Server Error). 

In summary:

Adding a subgroup as a group member to a parent group works, but produces a false positive Internal Server Error message.
Deleting/Removing a subgroup/group member from a parent group does NOT work, and produces an Internal Server Error message when clicking "Update".

Is this a known bug, or do I need to change some configuration/permission setting(s) for my environment? Any assistance on this topic is greatly appreciated!


Mark H. Wood

unread,
Jun 12, 2020, 9:51:19 AM6/12/20
to DSpace Technical Support
It's hard to say without knowing what the internal server error was.

When a DSpace administrator receives the Internal Server Error
message, or one is reported, the message means "go look in the log
files for more information."

If the log doesn't make the problem obvious, please post relevant
extracts so that we have deeper insight into what was happening at the
time.

--
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu
signature.asc

Jordan hormel

unread,
Jun 12, 2020, 10:00:32 AM6/12/20
to DSpace Technical Support
Hi Mark,

My SA was in a crunch and didn't have time to grep around in the logs yesterday before I posted. We've got a really tight deadline before our go-live date so I was just trying to open a door to have another option for exploring a solution if he is unable to figure out what's going on. I was also curious if there was a known bug or some quirkiness with group/subgroup dependencies that didn't allow for deletion in that dspace release. I will provide logs as soon as I receive them.

Thanks for the response.

Regards,
Jordan

--
All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/
---
You received this message because you are subscribed to a topic in the Google Groups "DSpace Technical Support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dspace-tech/X9gA_k2bWFA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/20200612135115.GA25423%40IUPUI.Edu.
Message has been deleted

Braxton Van Gundy

unread,
Jun 18, 2020, 11:36:26 AM6/18/20
to DSpace Technical Support
Hi again Mark, I posted a reply with the log file snippet earlier but I accidentally grabbed the wrong text segment from the log file. The correct one is below, any ideas?  We're getting a Stack Overflow Error from what looks to be an infinite loop. Sorry for the slow response, we were experiencing logging issues on our end. 

2020-06-18 11:27:17,360 WARN  org.dspace.app.webui.servlet.InternalErrorServlet @ :session_id=(removed):internal_error:-- URL Was: https://my-dspace-site/tools/group-edit
-- Method: POST
-- Parameters were:
-- group_name: "GROUP_TO_EDIT"
-- group_id: "eba5888a-e1ea-4597-ae91-01cd41a06925"
-- group_ids: "53461767-6731-4b6d-9406-01166be7b3f4"
-- submit_group_update: "Update Group"
-- group_ids: "53461767-6731-4b6d-9406-01166be7b3f4"
-- submit_group_update: "Update Group"

javax.servlet.ServletException: Servlet execution threw an exception
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:326)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.dspace.app.webui.filter.RegisteredOnlyFilter.doFilter(RegisteredOnlyFilter.java:66)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.dspace.utils.servlet.DSpaceWebappServletFilter.doFilter(DSpaceWebappServletFilter.java:78)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
        at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:190)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.StackOverflowError
        at java.util.HashMap.getNode(HashMap.java:572)
        at java.util.HashMap.containsKey(HashMap.java:596)
        at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:679)
        at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:694)
        at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:694)
        at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:694)
        at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:694)
        at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:694)
        at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:694)
        at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:694)
        at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:694)
        at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:694)
        at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:694)
        at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:694)
        at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:694)
        at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:694)
        at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:694)
        at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:694)
        at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:694)
        at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:694)
        at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:694)
        at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:694)
        at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:694)
        at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:694)
        at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:694)
        at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:694)
        at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:694)
        at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:694)
        at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:694)
        at org.dspace.eperson.GroupServiceImpl.getChildren(GroupServiceImpl.java:694)
       
         ------------------- This goes on for hundreds of lines ------------------------------------------

        2020-06-18 11:27:17,362 WARN  org.dspace.app.webui.util.UIUtil @ Unable to send email alert
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.dspace.content.DSpaceObject.metadata, could not initialize proxy - no Session
        at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:569)
        at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:188)
        at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:548)
        at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:126)
        at org.hibernate.collection.internal.PersistentBag.iterator(PersistentBag.java:266)
        at org.dspace.content.DSpaceObjectServiceImpl.getMetadata(DSpaceObjectServiceImpl.java:129)
        at org.dspace.content.DSpaceObjectServiceImpl.getMetadataFirstValue(DSpaceObjectServiceImpl.java:380)
 at org.dspace.content.DSpaceObjectServiceImpl.getMetadata(DSpaceObjectServiceImpl.java:129)
        at org.dspace.content.DSpaceObjectServiceImpl.getMetadataFirstValue(DSpaceObjectServiceImpl.java:380)
        at org.dspace.eperson.EPerson.getFirstName(EPerson.java:253)
        at org.dspace.eperson.EPerson.getFullName(EPerson.java:229)
        at org.dspace.app.webui.util.UIUtil.sendAlert(UIUtil.java:531)
        at org.dspace.app.webui.servlet.InternalErrorServlet.doGet(InternalErrorServlet.java:54)
        at org.dspace.app.webui.servlet.InternalErrorServlet.doPost(InternalErrorServlet.java:62)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:743)
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:410)
        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:337)
        at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:479)
        at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:417)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:204)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
        at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:190)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:748)
2020-06-18 11:27:17,363 DEBUG org.dspace.app.webui.util.JSPManager user....@email.com:session_id=(removed):ip_addr=(removed):view_jsp:/error/internal.jsp

José Geraldo

unread,
Jun 18, 2020, 1:09:53 PM6/18/20
to Jordan, DSpace Technical Support
Hello,

I already noticed this error in the JSPUI, when looking at the log an error is returned in the cascade delete in the data base.

An alternative I found was to use the XMLUI interface to perform this process of deleting groups.

--
All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/3f10b806-747f-4059-a3ef-20de37ce7f1co%40googlegroups.com.


--
At.te,

José Geraldo

Braxton Van Gundy

unread,
Jun 18, 2020, 2:22:13 PM6/18/20
to DSpace Technical Support
Unfortunately, I think it's too late for us to turn back to XMLUI.  Hoping to find a fix so we can keep using JSPUI. 


On Thursday, June 18, 2020 at 1:09:53 PM UTC-4, José Geraldo wrote:
Hello,

I already noticed this error in the JSPUI, when looking at the log an error is returned in the cascade delete in the data base.

An alternative I found was to use the XMLUI interface to perform this process of deleting groups.

Em qui., 11 de jun. de 2020 às 13:16, Jordan <horm...@gmail.com> escreveu:
I'm attempting to remove a subgroup from a group in the group editor in dspace v6.3. I am in the Administrator group, so I should have permissions to do this, but when i select the subgroup from the "Group Members" pane, click "Remove", and then click "Update," I get an Internal Server Error, and the subgroup is NOT deleted from the parent group. I also get an Internal Server Error when trying to add a subgroup as a Group Member of a parent group, but the subgroup IS added successfully (despite the Internal Server Error). 

In summary:

Adding a subgroup as a group member to a parent group works, but produces a false positive Internal Server Error message.
Deleting/Removing a subgroup/group member from a parent group does NOT work, and produces an Internal Server Error message when clicking "Update".

Is this a known bug, or do I need to change some configuration/permission setting(s) for my environment? Any assistance on this topic is greatly appreciated!


--
All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspac...@googlegroups.com.


--
At.te,

José Geraldo

Mark H. Wood

unread,
Jun 19, 2020, 10:48:29 AM6/19/20
to DSpace Technical Support
The seemingly endless recursion (which caused the stack overflow)
makes me think that there may be a circular group membership
somewhere. Group A contains group B contains group A would be a
simple example. The only way I've thought of to look for such a
problem is to inspect the group2group database table. The content of
that table should represent a collection of directed acyclic graphs.
If one of those graphs is cyclic, GroupServiceImpl.getChildren will
never terminate and will eventually fill the stack.

I don't have a simple, quick way to find such a cycle, but I found a
few references that will probably tell you more than you ever wanted
to know about the subject, with suggestions for practical solutions.

https://stackoverflow.com/questions/261573/best-algorithm-for-detecting-cycles-in-a-directed-graph
https://www.geeksforgeeks.org/detect-cycle-in-a-graph/
https://en.wikipedia.org/wiki/Cycle_(graph_theory)

I'd read the one at StackOverflow first. Remember that the table
probably contains *more than one graph*. The 'epersongroup' table
contains all of the groups and may be helpful for inspecting the whole
collection of graphs.



There's another approach: add some code to limit the depth of
getChildren, throwing an exception when the limit is hit. Catching,
logging and then re-throwing the exception in getChildren ought to
show you the problematic path. This would be similar to the depth-first
search for a cycle suggested in the references above. I don't know
which way would be better for you.

We probably ought to have such an (adjustable) depth limit in
getChildren anyway.
signature.asc

Sean Kalynuk

unread,
Jun 19, 2020, 11:01:40 AM6/19/20
to DSpace Technical Support
Here is a SQL query I've used for examining the group hierarchy. It is fixed to 5 levels since we don't have much nesting in our system.

select
epg1.eperson_group_id as GID1,
epg1.name as Name1,
epg2.eperson_group_id as GID2,
epg2.name as Name2,
epg3.eperson_group_id as GID3,
epg3.name as Name3,
epg4.eperson_group_id as GID4,
epg4.name as Name4,
epg5.eperson_group_id as GID5,
epg5.name as Name5
from epersongroup epg1
left join group2group g2g1 on g2g1.parent_id=epg1.uuid
left join epersongroup epg2 on epg2.uuid=g2g1.child_id
left join group2group g2g2 on g2g2.parent_id=epg2.uuid
left join epersongroup epg3 on epg3.uuid=g2g2.child_id
left join group2group g2g3 on g2g3.parent_id=epg3.uuid
left join epersongroup epg4 on epg4.uuid=g2g3.child_id
left join group2group g2g4 on g2g4.parent_id=epg4.uuid
left join epersongroup epg5 on epg5.uuid=g2g4.child_id
order by Name1,Name2,Name3,Name4,Name5

--
Sean
--
All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/20200619144824.GB14311%40IUPUI.Edu.

Braxton Van Gundy

unread,
Jun 19, 2020, 7:40:37 PM6/19/20
to DSpace Technical Support
Hi Mark, thanks for the reply!  I think this is pointing us in the right direction. Now it's just a matter of getting my changes to GroupServiceImpl.java to actually take so I can figure out which path is the culprit. 

Braxton Van Gundy

unread,
Jun 22, 2020, 11:24:35 AM6/22/20
to DSpace Technical Support
We fixed the issue, it turns out the errors we were seeing were a result of a cyclic group reference.  I tried to find the group programatically, but had issues getting the changes to take in the code.  In the end, I just went through each group one by one and looked for circular group membership.  It took forever, but eventually I found the offending group and removed it in the database.  The table you need to modify is the "group2group" table. We deleted the offending entry from this table in the psql database and all of our group related internal server errors went away. 

Jordan hormel

unread,
Jun 22, 2020, 2:00:35 PM6/22/20
to Braxton Van Gundy, DSpace Technical Support
Thanks to all for your help! We greatly appreciate it!

Kind regards,
Jordan Rasmussen 

--
All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/
---
You received this message because you are subscribed to a topic in the Google Groups "DSpace Technical Support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dspace-tech/X9gA_k2bWFA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/4bc91fd1-24cd-42aa-bde7-e0090735bdfdo%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages