Uploaded image for project: 'MyCoRe'
  1. MCR-1503

DOI registration ends inconsistent if media url is longer than 255 chars

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 2016.12, 2016.06.0.1
    • Fix Version/s: 2016.06.0.2, 2017.05
    • Component/s: mycore-pi
    • Labels:
      None
    • Sprint:

      Description

      media url for doi entries are limited to 255 characters (see https://github.com/datacite/mds/issues/297). If URL is longer we get an Internal Server error. At datacite the DOI entry exists, but mycore has no entry in database. We should leave the media entry empty and add DOI information nevertheless into our database. User should get an information about this problem, so that he can rename the file.

      Alternatively we could check the URL and if it is to long user get this information and can not register DOI until he renamed the file ...

      StackTrace:

      2017-01-05T16:45:24,629 INFO  administrator MCRDataciteClient: application/pdf=http://intr2dok.vifa-recht.de/servlets/MCRFileNodeServlet/mir_derivate_00000604/Rauber_Der%20Turn%20to%20Principles%20im%20Völkerrecht%20-Theoretische%20und%20methodische%20Perspektiven%20auf%20die%20Zukunft%20von%20Völkerrecht%20und%20Völkerrechtswissenschaft.pdf
      2017-01-05T16:45:24,878 ERROR administrator MCRDOICommands: Error occurred for DOI: org.mycore.pi.doi.MCRDigitalObjectIdentifier@53a296e6
      MyCoRe Exception: org.mycore.pi.exceptions.MCRDatacenterException
      
      Message:
      Datacenter-Error while set media-list for doi: "10.17176/20170104-162245" : 500 - Internal Server Error - uncaught exception (org.hibernate.exception.DataException: could not insert: [org.datacite.mds.domain.Media]; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.DataException: could not insert: [org.datacite.mds.domain.Media])
      
      Stack trace:
      org.mycore.pi.exceptions.MCRDatacenterException: Datacenter-Error while set media-list for doi: "10.17176/20170104-162245" : 500 - Internal Server Error - uncaught exception (org.hibernate.exception.DataException: could not insert: [org.datacite.mds.domain.Media]; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.DataException: could not insert: [org.datacite.mds.domain.Media])
              at org.mycore.pi.doi.MCRDataciteClient.setMediaList(MCRDataciteClient.java:189)
              at org.mycore.pi.doi.cli.MCRDOICommands.updateMediaListForDOI(MCRDOICommands.java:195)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.mycore.frontend.cli.MCRCommand.invoke(MCRCommand.java:252)
              at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.runCommand(MCRWebCLIContainer.java:307)
              at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.processCommand(MCRWebCLIContainer.java:275)
              at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.processCommands(MCRWebCLIContainer.java:369)
              at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.call(MCRWebCLIContainer.java:254)
              at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.call(MCRWebCLIContainer.java:185)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:745)
      
              at org.mycore.pi.doi.MCRDataciteClient.setMediaList(MCRDataciteClient.java:189)
              at org.mycore.pi.doi.cli.MCRDOICommands.updateMediaListForDOI(MCRDOICommands.java:195)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.mycore.frontend.cli.MCRCommand.invoke(MCRCommand.java:252)
              at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.runCommand(MCRWebCLIContainer.java:307)
              at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.processCommand(MCRWebCLIContainer.java:275)
              at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.processCommands(MCRWebCLIContainer.java:369)
              at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.call(MCRWebCLIContainer.java:254)
              at org.mycore.webcli.container.MCRWebCLIContainer$ProcessCallable.call(MCRWebCLIContainer.java:185)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:745)
      

        Attachments

          Activity

            People

            • Assignee:
              mcrshofm Sebastian Hofmann
              Reporter:
              mcrkrebs Kathleen Neumann
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: