Maven Archetype
  1. Maven Archetype
  2. ARCHETYPE-322

archetype:generate throws "Too many open files" error

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-alpha-5, 2.0
    • Fix Version/s: 2.0
    • Component/s: Plugin
    • Labels:
      None
    • Environment:
      Ubuntu GNU/Linux
    • Flags:
      Patch

      Description

      mvn archetype:generate throws java.io.FileNotFoundException (Too many open files) when I try to generate application from archetype containing more files than system limit.
      I've attached patch but I'm not sure if it's the best place to close files.

      [ERROR] java.io.FileNotFoundException: /tmp/testartifact/src/main/webapp/css/test146.css (Too many open files)
      org.apache.maven.archetype.exception.ArchetypeGenerationFailure: java.io.FileNotFoundException: /tmp/testartifact/src/main/webapp/css/test146.css (Too many open files)
              at org.apache.maven.archetype.generator.DefaultFilesetArchetypeGenerator.generateArchetype(DefaultFilesetArchetypeGenerator.java:215)
              at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.processFileSetArchetype(DefaultArchetypeGenerator.java:136)
              at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:106)
              at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:149)
              at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:209)
              at org.apache.maven.archetype.DefaultArchetypeManager.generateProjectFromArchetype(DefaultArchetypeManager.java:71)
              at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:190)
              at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
              at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
              at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
              at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
              at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:616)
              at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
              at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
              at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
              at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      1. DefaultFilesetArchetypeGenerator.java.patch
        2 kB
        Przemek Dyk
      2. run.sh
        0.3 kB
        Przemek Dyk
      3. test-archetype.zip
        531 kB
        Przemek Dyk

        Activity

        Przemek Dyk created issue -
        Hide
        Hervé Boutemy added a comment -

        fixed in r983491
        thank you

        Show
        Hervé Boutemy added a comment - fixed in r983491 thank you
        Hervé Boutemy made changes -
        Field Original Value New Value
        Fix Version/s 2.0-alpha-6 [ 14604 ]
        Assignee Herve Boutemy [ hboutemy ]
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Hervé Boutemy made changes -
        Description mvn archetype:generate throws java.io.FileNotFoundException (Too many open files) when I try to generate application from archetype containing more files than system limit.
        I've attached patch but I'm not sure if it's the best place to close files.

        [ERROR] java.io.FileNotFoundException: /tmp/testartifact/src/main/webapp/css/test146.css (Too many open files)
        org.apache.maven.archetype.exception.ArchetypeGenerationFailure: java.io.FileNotFoundException: /tmp/testartifact/src/main/webapp/css/test146.css (Too many open files)
                at org.apache.maven.archetype.generator.DefaultFilesetArchetypeGenerator.generateArchetype(DefaultFilesetArchetypeGenerator.java:215)
                at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.processFileSetArchetype(DefaultArchetypeGenerator.java:136)
                at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:106)
                at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:149)
                at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:209)
                at org.apache.maven.archetype.DefaultArchetypeManager.generateProjectFromArchetype(DefaultArchetypeManager.java:71)
                at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:190)
                at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
                at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
                at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
                at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
                at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
                at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
                at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
                at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
                at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
                at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
                at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:616)
                at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
                at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
                at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
                at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
        mvn archetype:generate throws java.io.FileNotFoundException (Too many open files) when I try to generate application from archetype containing more files than system limit.
        I've attached patch but I'm not sure if it's the best place to close files.

        {noformat}[ERROR] java.io.FileNotFoundException: /tmp/testartifact/src/main/webapp/css/test146.css (Too many open files)
        org.apache.maven.archetype.exception.ArchetypeGenerationFailure: java.io.FileNotFoundException: /tmp/testartifact/src/main/webapp/css/test146.css (Too many open files)
                at org.apache.maven.archetype.generator.DefaultFilesetArchetypeGenerator.generateArchetype(DefaultFilesetArchetypeGenerator.java:215)
                at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.processFileSetArchetype(DefaultArchetypeGenerator.java:136)
                at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:106)
                at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:149)
                at org.apache.maven.archetype.generator.DefaultArchetypeGenerator.generateArchetype(DefaultArchetypeGenerator.java:209)
                at org.apache.maven.archetype.DefaultArchetypeManager.generateProjectFromArchetype(DefaultArchetypeManager.java:71)
                at org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:190)
                at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
                at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
                at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
                at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
                at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
                at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
                at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
                at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
                at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
                at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
                at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:616)
                at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
                at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
                at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
                at org.codehaus.classworlds.Launcher.main(Launcher.java:375){noformat}
        Mark Thomas made changes -
        Project Import Sun Apr 05 09:05:55 UTC 2015 [ 1428224755734 ]
        Mark Thomas made changes -
        Workflow jira [ 12716760 ] Default workflow, editable Closed status [ 12748130 ]
        Mark Thomas made changes -
        Flags Patch [ 10430 ]
        Patch Submitted Yes [ 10763 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 22:17:37 UTC 2015 [ 1428272257260 ]
        Mark Thomas made changes -
        Workflow jira [ 12953870 ] Default workflow, editable Closed status [ 12990998 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        1d 9h 42m 1 Hervé Boutemy 08/Aug/10 18:41

          People

          • Assignee:
            Hervé Boutemy
            Reporter:
            Przemek Dyk
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development