[dspace-tech] Re: We can not apply Access Conditions in Dspace 7
Hi Zeynep, If all you needed is to disable Administrator in all the submitting forms you have you can do it by commenting out the Administrator line in [dspace]/config/spring/api/access-conditions.xml on line 73. Read more about it or how to customize it to fit your requirments here https://wiki.lyrasis.org/display/DSDOC7x/Submission+User+Interface#SubmissionUserInterface-Modifyingaccessconditions(embargo,etc.)presentedforBitstreams Hope it help Mo. On Thursday, March 23, 2023 at 2:22:12 PM UTC+3 Zeynep Şolta wrote: > Please help on this subject! > We upgraded to Dspace 7. After, we made editing on submission form. We > excluded the adinistrator option from default access conditions section. > Now we can not apply any access conditions type to sources. We see access > conditions section on the submission form, but don't apply. For example we > choose ambargo , and then date and send. Then, screen freezes, won't > progress. We also don't see access conditions section when any item files > editing. How we can solve this problem? Could you please share a > troubleshooting guide on this subject? > > -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/a469f70e-c856-4194-9a3f-954a31b72e50n%40googlegroups.com.
[dspace-tech] Re: Dspace 7.4 SSL front-end problems
Hi Jorge, You need to change your setup in dspace.cfg to read what you see below and then install apache or nginx and set it up as a reverse proxy. See the attached file in the link below for hints. in dspace.cfg I have defined the urls: dspace.server.url = https://rd.udb.edu.sv/server dspace.ui.url = https://rd.udb.edu.sv https://groups.google.com/g/dspace-tech/c/jDu1PyOEiKg/m/PdfiCloVAgAJ BR, Mo. On Thursday, March 23, 2023 at 8:43:07 PM UTC+3 Jorge Alberto Bonilla Castaneda wrote: > hello everyone > > I had already configured my dspace on a server in the cloud and with its > corresponding DNS, however, when I received the security certificate and > proceeded to configure it, only the back end worked for me: > https://rd.udb.edu. sv/ > > however the front-end from that moment throws me an error: > https://rd.udb.edu.sv:4000/ > > in dspace.cfg I have defined the urls: > dspace.server.url = https://rd.udb.edu.sv/server > dspace.ui.url = https://rd.udb.edu.sv:4000 > > and in config.prod.yml > ui: >ssl:true >host: 0.0.0.0 >port: 4000 >nameSpace: / > > rest: >ssl:true >host: rd.udb.edu.sv >port: 443 > > I am doing something wrong ? > -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/1d8f9660-0117-4775-8c41-98aec30e1078n%40googlegroups.com.
[dspace-tech] Dspace 7.4 SSL front-end problems
hello everyone I had already configured my dspace on a server in the cloud and with its corresponding DNS, however, when I received the security certificate and proceeded to configure it, only the back end worked for me: https://rd.udb.edu. sv/ however the front-end from that moment throws me an error: https://rd.udb.edu.sv:4000/ in dspace.cfg I have defined the urls: dspace.server.url = https://rd.udb.edu.sv/server dspace.ui.url = https://rd.udb.edu.sv:4000 and in config.prod.yml ui: ssl:true host: 0.0.0.0 port: 4000 nameSpace: / rest: ssl:true host: rd.udb.edu.sv port: 443 I am doing something wrong ? -- *AVISO DE CONFIDENCIALIDAD:* Este mensaje y cualquier archivo adjunto al mismo, se dirige exclusivamente a su(s) destinatario(s), y no puede ser compartido o reenviado a un tercero sin autorización del remitente. Solo puede ser utilizado por las personas o entidades a las cuales está dirigido. Si usted no es el destinatario al que ha sido remitida esta información, queda prohibida, cualquier modificación, retención, difusión o copia total o parcial, y no puede emprender con ella ningún tipo de acción. Le rogamos que lo comunique inmediatamente por esta misma vía y proceda a su eliminación. Si es miembro de la Comunidad Educativa de la UDB y viola lo anterior será sujeto a sanción disciplinaria conforme al Art.134, literales “r”, “s”, y “t” del Reglamento General Administrativo-Académico. *CONFIDENTIALITY NOTICE:* The content of this email and any attachments are intended solely for the addressee(s). The information cannot be shared without the authorization of the sender. It can only be used by the intended recipients. If you are not the intended recipient, you are hereby notified that any modification, dissemination, full or partial copy of this email is forbidden. You must not take any kind of action in reliance on it. Please, notify the sender by replying to this email and delete the message without copying or disclosing it. If you are a member of the UDB community and were to violate the foregoing, you will be subject to disciplinary actions in accordance to Article 134, literal “r”, “s”, and “t” of the General Administrative-Academic Regulations. -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/b9de7333-9161-498c-b311-db479946df75n%40googlegroups.com.
[dspace-tech] Formulas in the "Abstract" field
Dear all, I have a question: When registering a dissertation, in Dspace 6.2, is it possible to insert a chemistry/mathematics formula, like the ones below, in the summary field? [image: Sem título.png] Thanks. Att. Benedito -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/43f115bc-caec-4fed-a9ab-32137c13bf23n%40googlegroups.com.
[dspace-tech] Cant' get AJP to work on dspace 7 server
We are not having much success adding SSL to our dspace 7 server despite modelling out apache and tomcat configuration on our functioning dspace 5 production server. Our tomcat server.xml is configured with: and nmap confirms that port 8009 is open and listening. Our apache configuration reads: ProxyPass /server ajp://localhost:8009/server timeout=300 ProxyPassReverse /server ajp://localhost:8009/server timeout=300 The URL http://dspace7dev01.lib.uwaterloo.ca:8080/server gets to the HAL browser just fine. But using the URL: https://dspace7dev01.lib.uwaterloo.ca/server only gets an error response: 503 Service Unavailable Service Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. Apache/2.4.52 (Ubuntu) Server at dspace7dev01.lib.uwaterloo.ca Port 443 -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/99b84984-9c04-43f3-9cc2-21183a9a863bn%40googlegroups.com.
Re: [dspace-tech] error index-discovery
On Wed, Mar 22, 2023 at 11:18:04AM -0700, 'Matías Javier Saavedra Gajardo' via DSpace Technical Support wrote: > I was in the process of migrating from dspace 4 to dspace 7, but when it > came to indexing the database it gave me the following error. > > org.apache.commons.cli.ParseException: Unable to create a new DSpace > Context: null > at org.dspace.discovery.IndexClient.setup(IndexClient.java:157) > at org.dspace.scripts.DSpaceRunnable.parse(DSpaceRunnable.java:86) > at > org.dspace.scripts.DSpaceRunnable.initialize(DSpaceRunnable.java:75) > at > org.dspace.app.launcher.ScriptLauncher.executeScript(ScriptLauncher.java:148) > at > org.dspace.app.launcher.ScriptLauncher.handleScript(ScriptLauncher.java:131) > at > org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:98) > > this was produced by using the following command sudo /dspace/bin/dspace > index-discovery -b I would look backward in the log for a previous problem with connecting to the database. -- 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 -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/ZBxpa3FncVdMDJu2%40IUPUI.Edu. signature.asc Description: PGP signature
Re: [dspace-tech] Re: DSpace 7.5 intermittent errors with patch operations
On Thu, Mar 23, 2023 at 01:24:16AM -0700, Agustina Martinez wrote: > Thanks a lot for chipping in. All that you have described is exactly what > is happening. To give some more details: > >- There is the single big transaction being built up, and it does not >save until all the items in the collection have been processed. >- My task implementation is annotated with the "@Distributive" >annotation as I need for it to only report its status one it has iterated >over all of its items (the task implements a custom report method that >generates a csv file with items results and emails that to administrators) >- I couldn't come up with a better way of doing it. Not having that >annotation causes for the individual tasks to report their status, and >hence send an email each. >- In testing when / how commits happened, I was trying to get the >individual item task to commit its changes, but as you report, there is > the >single context and after the first task commit I was getting a > SQLException >concerning the resultset being closed. > > For the time being, until I come up with a better approach to this bulk > operation, the small change to the DOIConsumer (replace commit with > uncacheEntity) has helped with the lock issue, and the long task completes > successfully and all changes are committed to the DB as expected. Do you > see any issue with this change? > > Is there any way of solving the issue with the single context? Curation > tasks are a good framework for allowing bulk operations, but they should > allow for changes to be committed frequently in cases where there is no > dependency between single tasks being run. Although I can see this being > tricky. > > I did try the route of creating a Script using the DSpaceRunnable classes > which would use an iterator, but I was still facing the issue with the > transaction lock, and this script was much more innefficient in terms of > running times. I made a quick and dirty tool to fix a metadata problem that we had, which manages to get two Sessions and use them as I've suggested. I had to ignore the relevant DAO and build my own Query, so that I could use the second Session. Curator would have to be similarly hacked to do it this way. I would rather see a proper solution, but for illustration, my tool looks like this: diff --git a/dspace/modules/additions/src/main/java/edu/iupui/ulib/dspace/util/FixThumbnailPolicies.java b/dspace/modules/additions/src/main/java/edu/iupui/ulib/dspace/util/FixThumbnailPolicies.java new file mode 100644 index 00..6e7b475238 --- /dev/null +++ b/dspace/modules/additions/src/main/java/edu/iupui/ulib/dspace/util/FixThumbnailPolicies.java @@ -0,0 +1,130 @@ +/* + * Copyright 2023 Indiana University. + */ +package edu.iupui.ulib.dspace.util; + +import java.sql.SQLException; +import java.util.List; +import java.util.function.Consumer; +import java.util.stream.Stream; +import javax.persistence.criteria.CriteriaBuilder; +import javax.persistence.criteria.CriteriaQuery; +import javax.persistence.criteria.Root; + +import org.dspace.authorize.AuthorizeException; +import org.dspace.authorize.ResourcePolicy; +import org.dspace.authorize.factory.AuthorizeServiceFactory; +import org.dspace.authorize.service.ResourcePolicyService; +import org.dspace.content.Bitstream; +import org.dspace.content.Bundle; +import org.dspace.content.Item; +import org.dspace.core.Context; +import org.dspace.core.ContextHelper; +import org.hibernate.Session; +import org.hibernate.query.Query; + +/** + * Find and fix thumbnail bitstreams having no policies. Copy the Bundle's + * policies, or the Item's policies if none. + * + * @author mwood + */ +public class FixThumbnailPolicies { +static ResourcePolicyService resourcePolicyService; +static Context context; + +private FixThumbnailPolicies() {} + +/** + * Check all Items' thumbnail bitstreams for missing policies. + * + * @param argv unused. + */ +static public void main(String[] argv) { +resourcePolicyService = AuthorizeServiceFactory.getInstance() +.getResourcePolicyService(); +context = new Context(); + +try (Session driverSession = ContextHelper.getReadOnlySession(context)) { +CriteriaBuilder qBuilder = driverSession.getCriteriaBuilder(); +CriteriaQuery criteria = qBuilder.createQuery(Item.class); +Root root = criteria.from(Item.class); +criteria.select(root); +Query itemQuery = driverSession.createQuery(criteria); +try (Stream items = itemQuery.getResultStream()) { +items.forEachOrdered(new ItemConsumer()); +} +} catch (SQLException e) { +// TODO do something +} +} + +/** + * Update the policies of an Item's THUMBNAIL Bitstreams as needed. + */ +static private class ItemConsumer +
Re: [dspace-tech] Re: OCID Authentication and groups
On Wed, Mar 22, 2023 at 06:57:18PM -0700, Gabriela wrote: > I tried to to assign a fixed set of groups to *all* OIDC-authenticated > sessions. A few minutes of work, became hours, and I am going around in > circles. Any guidance would be very much appreciated. I don't have any way to test this, but it compiles: diff --git a/dspace-api/src/main/java/org/dspace/authenticate/OidcAuthenticationBean.java b/dspace-api/src/main/java/org/dspace/authenticate/OidcAuthenticationBean.java index 8a4ac190c8..53d47fac05 100644 --- a/dspace-api/src/main/java/org/dspace/authenticate/OidcAuthenticationBean.java +++ b/dspace-api/src/main/java/org/dspace/authenticate/OidcAuthenticationBean.java @@ -16,6 +16,8 @@ import static org.apache.commons.lang3.StringUtils.isBlank; import java.io.UnsupportedEncodingException; import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Map; @@ -23,13 +25,16 @@ import java.util.Map.Entry; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; import org.dspace.authenticate.oidc.OidcClient; import org.dspace.authenticate.oidc.model.OidcTokenResponseDTO; import org.dspace.core.Context; +import org.dspace.core.LogHelper; import org.dspace.eperson.EPerson; import org.dspace.eperson.Group; import org.dspace.eperson.service.EPersonService; +import org.dspace.eperson.service.GroupService; import org.dspace.services.ConfigurationService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -64,6 +69,9 @@ public class OidcAuthenticationBean implements AuthenticationMethod { @Autowired private EPersonService ePersonService; +@Autowired +private GroupService groupService; + @Override public boolean allowSetPassword(Context context, HttpServletRequest request, String username) throws SQLException { return false; @@ -84,8 +92,36 @@ public class OidcAuthenticationBean implements AuthenticationMethod { } @Override -public List getSpecialGroups(Context context, HttpServletRequest request) throws SQLException { -return List.of(); +public List getSpecialGroups(Context context, HttpServletRequest request) +throws SQLException { +if (request == null) { +return Collections.EMPTY_LIST; +} + +List groups = new ArrayList<>(); +StringBuilder groupIDs = new StringBuilder(); +for (String name : configurationService.getArrayProperty( +"authentication-oidc.login.specialgroup", +ArrayUtils.EMPTY_STRING_ARRAY)) { +Group group = groupService.findByName(context, name); +if (null != group) { +groups.add(group); +if (groupIDs.length() > 0) { +groupIDs.append(", "); +} +groupIDs.append(group.getID()); +} else { +LOGGER.warn(LogHelper.getHeader(context, "authenticated", +"Unknown special group {} not granted"), name); +} +} + +if (groupIDs.length() > 0) { +LOGGER.debug(LogHelper.getHeader(context, "authenticated", +"special_groups={}"), groupIDs.toString()); +} + +return groups; } @Override diff --git a/dspace/config/modules/authentication-oidc.cfg b/dspace/config/modules/authentication-oidc.cfg index bbb8489a77..4349df87f2 100644 --- a/dspace/config/modules/authentication-oidc.cfg +++ b/dspace/config/modules/authentication-oidc.cfg @@ -45,4 +45,8 @@ authentication-oidc.user-info.email = email authentication-oidc.user-info.first-name = given_name #Specify the attribute present in the user info json related to the user's last name -authentication-oidc.user-info.last-name = family_name \ No newline at end of file +authentication-oidc.user-info.last-name = family_name + +# Any session which is authenticated using OIDC will be granted membership in +# these groups. +#authentication-oidc.login.specialgroup = groupname -- 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 -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/ZBxVYbuB0YVJYtCA%40IUPUI.Edu. signature.asc Description: PGP signature
[dspace-tech] Add a new workflow step in 7.5
Hello, I need to add a new workflow step to a collection. In workflow.xml I added I restarted tomcat, went to the collection Assign roles tab. I saw the 3 default workflow steps. My new step was nowhere to be found. What I am doing wrong? Thanks, Hans -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/5246b5c3-5584-454a-aea4-19c3a9a65572n%40googlegroups.com.
[dspace-tech] We can not apply Access Conditions in Dspace 7
Please help on this subject! We upgraded to Dspace 7. After, we made editing on submission form. We excluded the adinistrator option from default access conditions section. Now we can not apply any access conditions type to sources. We see access conditions section on the submission form, but don't apply. For example we choose ambargo , and then date and send. Then, screen freezes, won't progress. We also don't see access conditions section when any item files editing. How we can solve this problem? Could you please share a troubleshooting guide on this subject? -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/2ef99b67-f482-458b-b06e-0cc2c6d6n%40googlegroups.com.
[dspace-tech] DSpace 7 Impersonation and Special Groups
In our DSpace 7.4 testing, it appears that the "Impersonate EPerson" functionality ignores any "special groups" that are normally assigned to the impersonated user as part of the authentication process. For example, we use the "org.dspace.authenticate.IPAuthentication" class to assign a "special group" to users, based on their IP address. When an administrator impersonates a user, the impersonated user is not assigned to any special groups (the "switchContextUser" method in the "org.dspace.core.Context" class simply resets the "special groups" to an empty set for the impersonated user). This seems to affect all the authentication methods (any "special group" handling they might have is not called when the impersonation is performed). In DSpace 6, impersonated users were assigned to "special groups" -- are there any plans to restore this functionality or any suggestions about how it might be done to provide a more accurate experience when impersonating users? Thanks, David -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/CA%2BmHiJZhCoP54needFEgBjQWfsVWbw2VUm%2BOz1THEP9%2Bk-mcWA%40mail.gmail.com.
[dspace-tech] Re: Enhancing Search for Google scholar on DSpace 7.4
Hey Lewatle, 1. Did you have this problem with Google Scholar indexing on a previous DSpace versions? 2. What exactly have you done? *google-metadata.enable* = *true *is default in DSpace 7. Thanks Andrew четвер, 23 березня 2023 р. о 10:44:09 UTC+2 Lewatle Johannes Phaladi пише: > Dear DSpace Tech Colleagues, > > This is confirmation that items from our DSpace site are now found on > Google Scholar. > > Regards, > Lewatle > > On Tuesday, 14 March 2023 at 13:10:15 UTC+2 Lewatle Johannes Phaladi wrote: > >> Dear DSpace Colleagues, >> >> On DSpace 7.4 when searching items by titles I am able to find few from >> Google Scholar https://scholar.google.com, others are not searchable, is >> there anyway to make Google Scholar to index our site for items to be >> visible, please see this links that I have followed: >> >> https://wiki.lyrasis.org/display/DSDOC6x/Google+Scholar+Metadata+Mappings >> https://wiki.lyrasis.org/display/DSDOC6x/Search+Engine+Optimization >> >> Regards, >> Lewatle >> >> >> -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/991368a3-063e-400a-8590-31e582f4e411n%40googlegroups.com.
[dspace-tech] DSpace 7 and page visible only for administators
Hi, Where do I add the html page to make it visible only after Administrator login? Thanks, Karol -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/b52b61a7-d152-412e-9947-c6cce4a290d5n%40googlegroups.com.
[dspace-tech] Re: Enhancing Search for Google scholar on DSpace 7.4
Dear DSpace Tech Colleagues, This is confirmation that items from our DSpace site are now found on Google Scholar. Regards, Lewatle On Tuesday, 14 March 2023 at 13:10:15 UTC+2 Lewatle Johannes Phaladi wrote: > Dear DSpace Colleagues, > > On DSpace 7.4 when searching items by titles I am able to find few from > Google Scholar https://scholar.google.com, others are not searchable, is > there anyway to make Google Scholar to index our site for items to be > visible, please see this links that I have followed: > > https://wiki.lyrasis.org/display/DSDOC6x/Google+Scholar+Metadata+Mappings > https://wiki.lyrasis.org/display/DSDOC6x/Search+Engine+Optimization > > Regards, > Lewatle > > > -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/58efa041-415a-4d06-92b1-4fb2b1d2a808n%40googlegroups.com.
Re: [dspace-tech] Re: DSpace 7.5 intermittent errors with patch operations
Hi Mark, Thanks a lot for chipping in. All that you have described is exactly what is happening. To give some more details: - There is the single big transaction being built up, and it does not save until all the items in the collection have been processed. - My task implementation is annotated with the "@Distributive" annotation as I need for it to only report its status one it has iterated over all of its items (the task implements a custom report method that generates a csv file with items results and emails that to administrators) - I couldn't come up with a better way of doing it. Not having that annotation causes for the individual tasks to report their status, and hence send an email each. - In testing when / how commits happened, I was trying to get the individual item task to commit its changes, but as you report, there is the single context and after the first task commit I was getting a SQLException concerning the resultset being closed. For the time being, until I come up with a better approach to this bulk operation, the small change to the DOIConsumer (replace commit with uncacheEntity) has helped with the lock issue, and the long task completes successfully and all changes are committed to the DB as expected. Do you see any issue with this change? Is there any way of solving the issue with the single context? Curation tasks are a good framework for allowing bulk operations, but they should allow for changes to be committed frequently in cases where there is no dependency between single tasks being run. Although I can see this being tricky. I did try the route of creating a Script using the DSpaceRunnable classes which would use an iterator, but I was still facing the issue with the transaction lock, and this script was much more innefficient in terms of running times. Best, Agustina On Wednesday, 22 March 2023 at 15:41:29 UTC Mark H. Wood wrote: Interesting. It sounds to me like there are two problems here, with a common source: o a (potentially) gigantic transaction is built up over a sequence of operations which should be unrelated; o a (potentially) gigantic queue of events which should be unrelated is built up within the curation run's Context. It sounds to me as though none of the tasks in the run is committing its work. The default curation scope is OPEN, so Curator is not committing. The event handler in question commits its own work, and in so doing, the first time it is called by the dispatcher, inadvertently commits all of the *other* curation work that should have been committed already. I can find no documentation for this, but it appears that event handlers should not commit work. The design of Context seems to depend on this. If true, we should document this requirement thoroughly. ++ It seems to me that a task designed to be run in OPEN scope must commit its own work. There is, however, a problem with this: Context contains only one Session. A bulk operation needs to keep a transaction open while it consumes the sequence of entities on which it is to operate, and also to be able to commit work (closing a transaction) whenever it modifies one of those entities. I suppose that one could work around this by draining the sequence into a List and then reloading them one at a time for processing, but how inefficient that is! -- 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 -- All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx --- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/d900ec6f-32bc-4ad1-bba1-573096e091f5n%40googlegroups.com.