Uploaded image for project: 'Metadata Aggregator'
  1. Metadata Aggregator
  2. MDA-53

Setting recurseDirectories = true for DomFilesystemSourceStage causes recursive loop

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.6.1
    • Fix Version/s: 0.7.0
    • Component/s: Pipeline
    • Labels:
      None
    • Environment:

      Mac OS X Lion 10.7.2 (11C74), java full version "1.6.0_26-b03-383"

      Description

      If I create the following bean and point it to a directory with subdirectories containing my entity metadata, the DomFilesystemSourceStage gets stuck in a recursive loop.

      <bean id="source" class="net.shibboleth.metadata.dom.DomFilesystemSourceStage" p:id="source">
      <property name="parserPool">
      <bean class="org.opensaml.util.xml.BasicParserPool"/>
      </property>
      <property name="source">
      <bean class="java.io.File">
      <constructor-arg value="/tmp/mda/entities"/>
      </bean>
      </property>
      <property name="recurseDirectories" value="true"/>
      </bean>

      mda.sh /tmp/mda/my-federation-config.xml main

      Exception in thread "main" java.lang.StackOverflowError
      at sun.nio.cs.UTF_8$Encoder.encodeLoop(UTF_8.java:447)
      at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:544)
      at java.lang.StringCoding$StringEncoder.encode(StringCoding.java:240)
      at java.lang.StringCoding.encode(StringCoding.java:272)
      at java.lang.String.getBytes(String.java:946)
      at java.io.UnixFileSystem.list(Native Method)
      at java.io.File.list(File.java:973)
      at java.io.File.listFiles(File.java:1051)
      at net.shibboleth.metadata.dom.DomFilesystemSourceStage.getSourceFiles(DomFilesystemSourceStage.java:250)
      at net.shibboleth.metadata.dom.DomFilesystemSourceStage.getSourceFiles(DomFilesystemSourceStage.java:254)
      at net.shibboleth.metadata.dom.DomFilesystemSourceStage.getSourceFiles(DomFilesystemSourceStage.java:254)
      at net.shibboleth.metadata.dom.DomFilesystemSourceStage.getSourceFiles(DomFilesystemSourceStage.java:254)
      at net.shibboleth.metadata.dom.DomFilesystemSourceStage.getSourceFiles(DomFilesystemSourceStage.java:254)
      at net.shibboleth.metadata.dom.DomFilesystemSourceStage.getSourceFiles(DomFilesystemSourceStage.java:254)
      at net.shibboleth.metadata.dom.DomFilesystemSourceStage.getSourceFiles(DomFilesystemSourceStage.java:254)
      at net.shibboleth.metadata.dom.DomFilesystemSourceStage.getSourceFiles(DomFilesystemSourceStage.java:254)
      at net.shibboleth.metadata.dom.DomFilesystemSourceStage.getSourceFiles(DomFilesystemSourceStage.java:254)
      at net.shibboleth.metadata.dom.DomFilesystemSourceStage.getSourceFiles(DomFilesystemSourceStage.java:254)
      at net.shibboleth.metadata.dom.DomFilesystemSourceStage.getSourceFiles(DomFilesystemSourceStage.java:254)
      at net.shibboleth.metadata.dom.DomFilesystemSourceStage.getSourceFiles(DomFilesystemSourceStage.java:254)
      at net.shibboleth.metadata.dom.DomFilesystemSourceStage.getSourceFiles(DomFilesystemSourceStage.java:254)
      at net.shibboleth.metadata.dom.DomFilesystemSourceStage.getSourceFiles(DomFilesystemSourceStage.java:254)
      at net.shibboleth.metadata.dom.DomFilesystemSourceStage.getSourceFiles(DomFilesystemSourceStage.java:254)
      at net.shibboleth.metadata.dom.DomFilesystemSourceStage.getSourceFiles(DomFilesystemSourceStage.java:254)
      at net.shibboleth.metadata.dom.DomFilesystemSourceStage.getSourceFiles(DomFilesystemSourceStage.java:254)
      at net.shibboleth.metadata.dom.DomFilesystemSourceStage.getSourceFiles(DomFilesystemSourceStage.java:254)
      at net.shibboleth.metadata.dom.DomFilesystemSourceStage.getSourceFiles(DomFilesystemSourceStage.java:254)
      at net.shibboleth.metadata.dom.DomFilesystemSourceStage.getSourceFiles(DomFilesystemSourceStage.java:254)
      at net.shibboleth.metadata.dom.DomFilesystemSourceStage.getSourceFiles(DomFilesystemSourceStage.java:254)
      at net.shibboleth.metadata.dom.DomFilesystemSourceStage.getSourceFiles(DomFilesystemSourceStage.java:254)
      at net.shibboleth.metadata.dom.DomFilesystemSourceStage.getSourceFiles(DomFilesystemSourceStage.java:254)
      at net.shibboleth.metadata.dom.DomFilesystemSourceStage.getSourceFiles(DomFilesystemSourceStage.java:254)
      at net.shibboleth.metadata.dom.DomFilesystemSourceStage.getSourceFiles(DomFilesystemSourceStage.java:254)
      ...

        Attachments

        1. recursion_fix.patch
          0.7 kB
          james.webb@idp.protectnetwork.org

          Activity

            People

            Assignee:
            lajoie@shibboleth.net Chad La Joie
            Reporter:
            dantech@idp.protectnetwork.org dantech@idp.protectnetwork.org
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 minutes
                5m