On Wed, Feb 3, 2010 at 11:33 PM, aw <[email protected]> wrote: > I just noticed this: > > Feb 3, 2010 10:49:23 PM org.apache.coyote.http11.Http11NioProtocol > destroy > INFO: Stopping Coyote HTTP/1.1 on http-8080 > Feb 3, 2010 11:19:20 PM org.apache.catalina.loader.WebappClassLoader > loadClass > INFO: Illegal access: this web application instance has been stopped > already. Could not load net.liftweb.http.SessionMaster$$anonfun$1$ > $anonfun$apply$11$$anonfun$apply$12. The eventual following stack > trace is caused by an error thrown for debugging purposes as well as > to attempt to terminate the thread which caused the illegal access, > and has no functional impact. > java.lang.IllegalStateException > at > > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java: > 1370) > at > > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java: > 1329) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java: > 319) > at net.liftweb.http.SessionMaster$$anonfun$1$$anonfun$apply > $11.apply(LiftSession.scala:162) > at net.liftweb.http.SessionMaster$$anonfun$1$$anonfun$apply > $11.apply(LiftSession.scala:159) > at scala.Iterator$class.foreach(Iterator.scala:414) > at scala.Iterator$$anon$7.foreach(Iterator.scala:36) > at net.liftweb.http.SessionMaster$$anonfun > $1.apply(LiftSession.scala:159) > at net.liftweb.http.SessionMaster$$anonfun > $1.apply(LiftSession.scala:136) > at net.liftweb.actor.LiftActor > $class.execTranslate(LiftActor.scala:252) > at net.liftweb.http.SessionMaster > $.execTranslate(LiftSession.scala:91) > at net.liftweb.actor.SpecializedLiftActor$class.net$liftweb > $actor$SpecializedLiftActor$$processMailbox(LiftActor.scala:147) > at net.liftweb.actor.SpecializedLiftActor$$anonfun$3$$anonfun > $apply$1.apply(LiftActor.scala:114) > at net.liftweb.actor.SpecializedLiftActor$$anonfun$3$$anonfun > $apply$1.apply(LiftActor.scala:114) > at net.liftweb.actor.LAScheduler$$anonfun$1$$anon$1$$anon > $2.run(LiftActor.scala:42) > at java.util.concurrent.ThreadPoolExecutor > $Worker.runTask(ThreadPoolExecutor.java:885) > at java.util.concurrent.ThreadPoolExecutor > $Worker.run(ThreadPoolExecutor.java:907) > at java.lang.Thread.run(Thread.java:619) > Exception in thread "pool-2-thread-4" java.lang.NoClassDefFoundError: > net/liftweb/http/SessionMaster$$anonfun$1$$anonfun$apply$11$$anonfun > $apply$12 > at net.liftweb.http.SessionMaster$$anonfun$1$$anonfun$apply > $11.apply(LiftSession.scala:162) > at net.liftweb.http.SessionMaster$$anonfun$1$$anonfun$apply > $11.apply(LiftSession.scala:159) > at scala.Iterator$class.foreach(Iterator.scala:414) > at scala.Iterator$$anon$7.foreach(Iterator.scala:36) > at net.liftweb.http.SessionMaster$$anonfun > $1.apply(LiftSession.scala:159) > at net.liftweb.http.SessionMaster$$anonfun > $1.apply(LiftSession.scala:136) > at net.liftweb.actor.LiftActor > $class.execTranslate(LiftActor.scala:252) > at net.liftweb.http.SessionMaster > $.execTranslate(LiftSession.scala:91) > at net.liftweb.actor.SpecializedLiftActor$class.net$liftweb > $actor$SpecializedLiftActor$$processMailbox(LiftActor.scala:147) > at net.liftweb.actor.SpecializedLiftActor$$anonfun$3$$anonfun > $apply$1.apply(LiftActor.scala:114) > at net.liftweb.actor.SpecializedLiftActor$$anonfun$3$$anonfun > $apply$1.apply(LiftActor.scala:114) > at net.liftweb.actor.LAScheduler$$anonfun$1$$anon$1$$anon > $2.run(LiftActor.scala:42) > at java.util.concurrent.ThreadPoolExecutor > $Worker.runTask(ThreadPoolExecutor.java:885) > at java.util.concurrent.ThreadPoolExecutor > $Worker.run(ThreadPoolExecutor.java:907) > at java.lang.Thread.run(Thread.java:619) > Caused by: java.lang.ClassNotFoundException: > net.liftweb.http.SessionMaster$$anonfun$1$$anonfun$apply$11$$anonfun > $apply$12 > at > > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java: > 1484) > at > > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java: > 1329) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java: > 319) > ... 15 more > > Maybe there is a shutdown order issue? >
Interesting. I think what's happening is that during the execution of the shutdown hook, a new class is attempting to be loaded. Why? Because every function in Scala is represented by a JVM class... and functions are very, very common to define in code (e.g., a for comprehension, etc.) So, I think that the shutdown hook is trying to instantiate an "anonymous inner class" (in Java parlance), the class is not loaded, so the Classloader attempts to load the class, but the servlet is supposed to be shutting down, so Tomcat's classloader isn't allowing the class to be loaded. That's just my guess. > > -- > You received this message because you are subscribed to the Google Groups > "Lift" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<liftweb%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/liftweb?hl=en. > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
