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

IllegalArgumentException using MCR.URIResolver.Classification.Format.textDescription

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 2017.06.0
    • Fix Version/s: 2018.05, 2017.06.0.1
    • Component/s: None
    • Labels:
      None

      Description

      Using URI resolver property "textDescription" in this way:

      MCR.URIResolver.Classification.Format.textDescription={text} - {description}
      
      <xed:include uri="xslStyle:items2options:classification:editor[textDescription]:-1:children:MSC2010" />
      

      Leeds to the following exception (classification attached):

      Caused by: java.lang.IllegalArgumentException: named capturing group has 0 length name
              at java.util.regex.Matcher.appendReplacement(Matcher.java:838)
              at java.util.regex.Matcher.replaceAll(Matcher.java:955)
              at org.mycore.datamodel.classifications2.utils.MCRCategoryTransformer$ItemElementFactory.addLabel(MCRCategoryTransformer.java:280)
              at org.mycore.datamodel.classifications2.utils.MCRCategoryTransformer$ItemElementFactory.addChildren(MCRCategoryTransformer.java:257)
              at org.mycore.datamodel.classifications2.utils.MCRCategoryTransformer$ItemElementFactory.addChildren(MCRCategoryTransformer.java:260)
              at org.mycore.datamodel.classifications2.utils.MCRCategoryTransformer$ItemElementFactory.addChildren(MCRCategoryTransformer.java:260)
              at org.mycore.datamodel.classifications2.utils.MCRCategoryTransformer$ItemElementFactory.<init>(MCRCategoryTransformer.java:235)
              at org.mycore.datamodel.classifications2.utils.MCRCategoryTransformer.getEditorItems(MCRCategoryTransformer.java:131)
              at org.mycore.common.xml.MCRURIResolver$MCRClassificationResolver.getClassElement(MCRURIResolver.java:1055)
              at org.mycore.common.xml.MCRURIResolver$MCRClassificationResolver.resolve(MCRURIResolver.java:971)
              at org.mycore.common.xml.MCRURIResolver.resolve(MCRURIResolver.java:275)
              at org.mycore.common.xml.MCRURIResolver$MCRXslStyleResolver.resolve(MCRURIResolver.java:1181)
              at org.mycore.common.xml.MCRURIResolver.resolve(MCRURIResolver.java:275)
              at org.mycore.frontend.xeditor.MCRIncludeHandler.resolve(MCRIncludeHandler.java:39)
              at sun.reflect.GeneratedMethodAccessor209.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.apache.xalan.extensions.ExtensionHandlerJavaClass.callFunction(ExtensionHandlerJavaClass.java:292)
              ... 130 more
      

        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: