1. Tapestry
  2. TAPESTRY-2384

OutOfMemoryError exception if a regular file with no extension exists in a known component package


    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.0.14
    • Component/s: tapestry-ioc
    • Labels:


      The issue has to do with a temporary queue used to hold package
      names to be scanned for class files, in
      org.apache.tapestry.ioc.internal.services.ClassNameLocatorImpl. For more
      detail see the original bug report with our findings here:


      What it comes down to is this: if you have a file in a components
      package without a file extension (such as MIT-LICENSE), Tapestry will
      fail to start because it will have exhausted it's available memory and
      have thrown a java.lang.OutOfMemoryError exception. It assumes such
      files are directory names, and then tacks on a '/' and pushes it on to
      the queue to be searched. This results in a loop that fills the queue
      with bogus package names until the memory is gone.

      Clearly this is an issue and I wanted to provide a patch, but having
      looked a bit at the code, I'm not sure how one can determine if the
      simple strings represent actual directories (as opposed to files with no
      extensions). A new file object could be created, but doing that for each
      iteration seems like it might be slow, as does querying the queue each
      time to see if that package is already contained.


        Chris Lewis created issue -
        Howard M. Lewis Ship made changes -
        Field Original Value New Value
        Assignee Howard M. Lewis Ship [ hlship ]
        Fix Version/s 5.0.14 [ 12313214 ]
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 5.0.11 [ 12312968 ]
        Mark Thomas made changes -
        Workflow jira [ 12429682 ] Default workflow, editable Closed status [ 12567039 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12567039 ] jira [ 12589784 ]


          • Assignee:
            Howard M. Lewis Ship
            Chris Lewis
          • Votes:
            1 Vote for this issue
            1 Start watching this issue


            • Created: