title: "Too many open files" exception while running mvn org.mortbay.jetty:jetty-maven-plugin:run
body: <p>In one of my project , I have used Lift 2.5 M4 and Scala 2.10.0 .  In this project , I am using  Jetty 8.1.10.v20130312 .
  But while running project through mvn jetty  , I am getting unexpected exception  . </p>
  
  <p>I have configured jetty plugin in pom.xml in below way :</p>
  
  <pre><code>&lt;plugin&gt;
              &lt;groupId&gt;org.mortbay.jetty&lt;/groupId&gt;
              &lt;artifactId&gt;jetty-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;8.1.10.v20130312&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;systemProperties&gt;
                      &lt;systemProperty&gt;
                          &lt;name&gt;org.apache.cocoon.log4j.loglevel&lt;/name&gt;
                          &lt;value&gt;WARN&lt;/value&gt;
                      &lt;/systemProperty&gt;
                  &lt;/systemProperties&gt;
                  &lt;connectors&gt;
                      &lt;connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector"&gt;
                          &lt;port&gt;9090&lt;/port&gt;
                          &lt;maxIdleTime&gt;30000&lt;/maxIdleTime&gt;
                      &lt;/connector&gt;
                  &lt;/connectors&gt;
                  &lt;webApp&gt;
                      &lt;contextPath&gt;/&lt;/contextPath&gt;
                  &lt;/webApp&gt;
                  &lt;scanIntervalSeconds&gt;0&lt;/scanIntervalSeconds&gt;
                  &lt;stopKey&gt;stop&lt;/stopKey&gt;
                  &lt;stopPort&gt;9999&lt;/stopPort&gt;
              &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>I am getting below exception while running command :- mvn org.mortbay.jetty:jetty-maven-plugin:run</p>
  
  <p>2013-04-24 06:49:39.216:WARN:oeja.AnnotationParser:EXCEPTION 
  java.io.FileNotFoundException: /home/ayush/scala-lift/knolgame/target/classes/com/knolgame/lib/TransactionStatus$$anonfun$find$1.class (Too many open files)
      at java.io.FileInputStream.open(Native Method)
      at java.io.FileInputStream.(FileInputStream.java:106)
      at org.eclipse.jetty.util.resource.FileResource.getInputStream(FileResource.java:286)
      at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:754)
      at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:747)
      at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:747)
      at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:747)
      at org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:747)</p>
  
  <p>But When I am using jetty 6.1.25 , It works fine . </p>
  
  <pre><code>&lt;plugin&gt;
              &lt;groupId&gt;org.mortbay.jetty&lt;/groupId&gt;
              &lt;artifactId&gt;maven-jetty-plugin&lt;/artifactId&gt;
              &lt;version&gt;6.1.25&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;systemProperties&gt;
                      &lt;systemProperty&gt;
                          &lt;name&gt;org.apache.cocoon.log4j.loglevel&lt;/name&gt;
                          &lt;value&gt;WARN&lt;/value&gt;
                      &lt;/systemProperty&gt;
                  &lt;/systemProperties&gt;
                  &lt;connectors&gt;
                      &lt;connector implementation="org.mortbay.jetty.nio.SelectChannelConnector"&gt;
                          &lt;port&gt;9090&lt;/port&gt;
                          &lt;maxIdleTime&gt;30000&lt;/maxIdleTime&gt;
                      &lt;/connector&gt;
                  &lt;/connectors&gt;
                  &lt;contextPath&gt;/&lt;/contextPath&gt;
                  &lt;scanIntervalSeconds&gt;0&lt;/scanIntervalSeconds&gt;
                  &lt;stopKey&gt;stop&lt;/stopKey&gt;
                  &lt;stopPort&gt;9999&lt;/stopPort&gt;
              &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>Can anyone help me to resolve this ?  I have to use latest Lift , Scala and jetty version in my application . </p>
  
  <p>Thanks in advance .</p>
  
  <p>Regards,
  Ayush</p>