Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-3264

METS Rights / Role disseminators incorrectly translate group names

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 6.0
    • Fix Version/s: 6.0
    • Component/s: DSpace API
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      1
    • Documentation Status:
      Not Required

      Description

      Originally described by Ari on dspace-tech: https://groups.google.com/d/msg/dspace-tech/fwYVvXhV3ik/v8K5ulVKBAAJ

      The problem is that query with ?rightsMDTypes=METSRIGHTS crashes some cases. I tried to pin point it and it seems that if I have a bitstream policy with a group that I've created myself, the error happens. In other words, I can use Anonymous or Administrator groups, but if I create group myself and use that in policy, the following error pops up.

      java.lang.UnsupportedOperationException: Unknown DSpace type: -1
      

      There is a condition in common.xsl (Mirage2) to prevent this:

          <xsl:variable name='METSRIGHTS-enabled' select="contains(confman:getProperty('plugin.named.org.dspace.content.crosswalk.DisseminationCrosswalk'), 'METSRIGHTS')" />
          <xsl:variable name="externalMetadataURL">
              <xsl:text>cocoon:/</xsl:text>
              <xsl:value-of select="@url"/>
              <!-- If this is an Item, display the METSRIGHTS section, so we
                   know which files have access restrictions.
                   This requires the METSRightsCrosswalk to be enabled! -->
              <xsl:if test="@type='DSpace Item' and $METSRIGHTS-enabled">
                  <xsl:text>?rightsMDTypes=METSRIGHTS</xsl:text>
              </xsl:if>
          </xsl:variable>
      

      However, it seem that the condition is never met (or I have misunderstood something). When I removed the and $METSRIGHTS-enabled, I got the date and could show it in the UI. But this then result a blank screen for items with bitstream policy with user defined groups (i believe)

      Here the stactraces from the error:

       Cocoon stacktrace [hide]
      Failed to process pipeline
      context:/jndi:/localhost/xmlui/sitemap.xmap - 508:60     <map:serialize type="xml">
      context:/jndi:/localhost/xmlui/sitemap.xmap - 504:74     <map:generate type="DSpaceMETSGenerator">
      context:/jndi:/localhost/xmlui/sitemap.xmap - 503:75     <map:match>
      context:/jndi:/localhost/xmlui/sitemap.xmap - 502:54     <map:match>
      
      Java stactrace:
      java.lang.UnsupportedOperationException: Unknown DSpace type: -1
          at org.dspace.content.factory.ContentServiceFactory.getDSpaceLegacyObjectService(ContentServiceFactory.java:98)
          at org.dspace.content.packager.PackageUtils.translateGroupNameForExport(PackageUtils.java:832)
          at org.dspace.content.crosswalk.METSRightsCrosswalk.disseminateElement(METSRightsCrosswalk.java:238)
          at org.dspace.app.xmlui.objectmanager.ItemAdapter.renderAmdSubSection(ItemAdapter.java:671)
          at org.dspace.app.xmlui.objectmanager.ItemAdapter.renderAdministrativeSection(ItemAdapter.java:571)
          at org.dspace.app.xmlui.objectmanager.AbstractAdapter.renderMETS(AbstractAdapter.java:362)
          at org.dspace.app.xmlui.cocoon.DSpaceMETSGenerator.generate(DSpaceMETSGenerator.java:115)
          at sun.reflect.GeneratedMethodAccessor115.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invoke(PoolableProxyHandler.java:71)
          at com.sun.proxy.$Proxy214.generate(Unknown Source)
          at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:544)
          at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:273)
          at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:439)
          at sun.reflect.GeneratedMethodAccessor119.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invoke(PoolableProxyHandler.java:71)
          at com.sun.proxy.$Proxy202.process(Unknown Source)
          at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:147)
          at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:55)
          at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:87)
          at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:55)
          at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:87)
          at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:78)
          at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
          at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:78)
          at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:81)
          at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:239)
          at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:171)
          at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:247)
          at org.apache.cocoon.servlet.RequestProcessor.process(RequestProcessor.java:351)
          at org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:169)
          at org.apache.cocoon.sitemap.SitemapServlet.service(SitemapServlet.java:84)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
          at org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:468)
          at org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:443)
          at org.apache.cocoon.servletservice.spring.ServletFactoryBean$ServiceInterceptor.invoke(ServletFactoryBean.java:264)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
          at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
          at com.sun.proxy.$Proxy199.service(Unknown Source)
          at org.dspace.springmvc.CocoonView.render(CocoonView.java:113)
          at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1216)
          at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1001)
          at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:945)
          at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:867)
          at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:951)
          at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:842)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
          at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:827)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at org.dspace.app.xmlui.cocoon.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:113)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at org.dspace.app.xmlui.cocoon.DSpaceCocoonServletFilter.doFilter(DSpaceCocoonServletFilter.java:160)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at org.dspace.app.xmlui.cocoon.servlet.multipart.DSpaceMultipartFilter.doFilter(DSpaceMultipartFilter.java:119)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
          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.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:220)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
          at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
          at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
          at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
          at java.lang.Thread.run(Thread.java:745)
      

        Attachments

          Activity

            People

            • Assignee:
              schweer Andrea Schweer
              Reporter:
              schweer Andrea Schweer
              Reviewer:
              Tim Donohue
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: