title: OutofmemoryError: PermGen on play 2.2.2
body: <p>I created a simple play project (hello-play) using activator (Typesafe Activator 1.1.1). </p>
  
  <p>My <code>sbt</code> script looks like </p>
  
  <pre><code>SBT_OPTS="-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M" java $SBT_OPTS -jar `dirname $0`/sbt-launch.jar "$@"
  </code></pre>
  
  <p>When I run sbt play my server starts correctly on localhost:9000. However when I make a simple change to one of my scala sources and click on the page again, it gives me the following error. </p>
  
  <p>NOTE: I'm not sure if this is the correct way to run a play app from the command line when it was initially created using activator. </p>
  
  <pre><code>$sbt play
  [info] Loading project definition from /Users/ssimanta/hello-play/project
  [info] Set current project to hello-play (in build file:/Users/ssimanta/hello-play/)
         _
   _ __ | | __ _ _  _
  | '_ \| |/ _' | || |
  |  __/|_|\____|\__ /
  |_|            |__/
  
  play 2.2.2 built with Scala 2.10.3 (running Java 1.7.0_45), http://www.playframework.com
  
  &gt; Type "help play" or "license" for more information.
  &gt; Type "exit" or use Ctrl+D to leave this console.
  
  [hello-play] $ run
  
  --- (Running the application from SBT, auto-reloading is enabled) ---
  
  [info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
  
  (Server started, use Ctrl+D to stop and go back to the console...)
  
  [info] Compiling 1 Scala source to /Users/ssimanta/hello-play/target/scala-2.10/classes...
  [info] play - Application started (Dev)
  [info] Compiling 1 Scala source to /Users/ssimanta/hello-play/target/scala-2.10/classes...
  [error] application - 
  
  ! Internal server error, for (GET) [/message] -&gt;
  
  java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: PermGen space
      at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[na:1.7.0_45]
      at java.util.concurrent.FutureTask.get(FutureTask.java:188) ~[na:1.7.0_45]
      at sbt.ConcurrentRestrictions$$anon$4.take(ConcurrentRestrictions.scala:196) ~[na:na]
      at sbt.Execute.next$1(Execute.scala:88) ~[na:na]
      at sbt.Execute.processAll(Execute.scala:91) ~[na:na]
      at sbt.Execute.runKeep(Execute.scala:69) ~[na:na]
  java.lang.OutOfMemoryError: PermGen space
      at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.7.0_45]
      at java.lang.ClassLoader.defineClass(ClassLoader.java:800) ~[na:1.7.0_45]
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[na:1.7.0_45]
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) ~[na:1.7.0_45]
      at java.net.URLClassLoader.access$100(URLClassLoader.java:71) ~[na:1.7.0_45]
      at java.net.URLClassLoader$1.run(URLClassLoader.java:361) ~[na:1.7.0_45]
  </code></pre>