java - Spray Client (i.e. AKKA) within Tomcat, cause Threading issue -


i using spray client i.e. akka within tomcat webapp.

while destroy actor system on tomcat shutdown via spring, i'm nevertheless still facing threading issue.

i found issue reported few years ago tomcat complaints when re-deploying servlet akka inside, not find solution it

i'm using default spray-client configuration.

here error when stop tomcat. (sorry amount of information try give clue possible)

10-jun-2015 12:54:22.516 warning [localhost-startstop-1] org.apache.catalina.loader.webappclassloaderbase.clearreferencesthreads web application [root] appears have started thread named [poolpartyconnector-actorsystem-scheduler-1] has failed stop it. create memory leak.

stack trace of thread: java.lang.thread.sleep(native method) akka.actor.lightarrayrevolverscheduler.waitnanos(scheduler.scala:226) akka.actor.lightarrayrevolverscheduler$$anon$8.nexttick(scheduler.scala:405) akka.actor.lightarrayrevolverscheduler$$anon$8.run(scheduler.scala:375) java.lang.thread.run(thread.java:745)

10-jun-2015 12:54:22.516 warning [localhost-startstop-1] org.apache.catalina.loader.webappclassloaderbase.clearreferencesthreads web application [root] appears have started thread named [poolpartyconnector-actorsystem-akka.actor.default-dispatcher-2] has failed stop it. create memory leak. stack trace of thread: sun.misc.unsafe.park(native method) scala.concurrent.forkjoin.forkjoinpool.scan(forkjoinpool.java:2075) scala.concurrent.forkjoin.forkjoinpool.runworker(forkjoinpool.java:1979) scala.concurrent.forkjoin.forkjoinworkerthread.run(forkjoinworkerthread.java:107)

10-jun-2015 12:54:22.516 warning [localhost-startstop-1] org.apache.catalina.loader.webappclassloaderbase.clearreferencesthreads web application [root] appears have started thread named [poolpartyconnector-actorsystem-akka.actor.default-dispatcher-3] has failed stop it. create memory leak. stack trace of thread: akka.actor.dungeon.deathwatch$class.watchingcontains(deathwatch.scala:73) akka.actor.dungeon.deathwatch$class.watchedactorterminated(deathwatch.scala:54) akka.actor.actorcell.watchedactorterminated(actorcell.scala:369) akka.actor.actorcell.invokeall$1(actorcell.scala:455) akka.actor.actorcell.systeminvoke(actorcell.scala:478) akka.dispatch.mailbox.processallsystemmessages(mailbox.scala:263) akka.dispatch.mailbox.processmailbox(mailbox.scala:241) akka.dispatch.mailbox.run(mailbox.scala:220) akka.dispatch.forkjoinexecutorconfigurator$akkaforkjointask.exec(abstractdispatcher.scala:397) scala.concurrent.forkjoin.forkjointask.doexec(forkjointask.java:260) scala.concurrent.forkjoin.forkjoinpool$workqueue.runtask(forkjoinpool.java:1339) scala.concurrent.forkjoin.forkjoinpool.runworker(forkjoinpool.java:1979) scala.concurrent.forkjoin.forkjoinworkerthread.run(forkjoinworkerthread.java:107)

10-jun-2015 12:54:22.517 warning [localhost-startstop-1] org.apache.catalina.loader.webappclassloaderbase.clearreferencesthreads web application [root] appears have started thread named [poolpartyconnector-actorsystem-akka.actor.default-dispatcher-4] has failed stop it. create memory leak. stack trace of thread: sun.misc.unsafe.park(native method) scala.concurrent.forkjoin.forkjoinpool.scan(forkjoinpool.java:2075) scala.concurrent.forkjoin.forkjoinpool.runworker(forkjoinpool.java:1979) scala.concurrent.forkjoin.forkjoinworkerthread.run(forkjoinworkerthread.java:107)

another part of trace says:

10-jun-2015 12:54:22.571 severe [localhost-startstop-1] org.apache.catalina.loader.webappclassloaderbase.checkthreadlocalmapforleaks web application [oai] created threadlocal key of type [java.lang.threadlocal] (value [java.lang.threadlocal@14483049]) , value of type [scala.concurrent.forkjoin.forkjoinpool.submitter] (value [scala.concurrent.forkjoin.forkjoinpool$submitter@752622d4]) failed remove when web application stopped. threads going renewed on time try , avoid probable memory leak.

10-jun-2015 12:54:22.571 severe [localhost-startstop-1]

org.apache.catalina.loader.webappclassloaderbase.checkthreadlocalmapforleaks web application [oai] created threadlocal key of type [scala.concurrent.forkjoin.threadlocalrandom$1] (value [scala.concurrent.forkjoin.threadlocalrandom$1@20399e41]) , value of type [scala.concurrent.forkjoin.threadlocalrandom] (value [scala.concurrent.forkjoin.threadlocalrandom@1286565]) failed remove when web application stopped. threads going renewed on time try , avoid probable memory leak.

10-jun-2015 12:54:22.571 severe [localhost-startstop-1] org.apache.catalina.loader.webappclassloaderbase.checkthreadlocalmapforleaks web application [oai] created threadlocal key of type [scala.util.dynamicvariable$$anon$1] (value [scala.util.dynamicvariable$$anon$1@64b67887]) , value of type [org.apache.tomcat.util.log.systemloghandler] (value [org.apache.tomcat.util.log.systemloghandler@523e426f]) failed remove when web application stopped. threads going renewed on time try , avoid probable memory leak.

10-jun-2015 12:54:22.571 severe [localhost-startstop-1] org.apache.catalina.loader.webappclassloaderbase.checkthreadlocalmapforleaks web application [oai] created threadlocal key of type [java.lang.threadlocal] (value [java.lang.threadlocal@14483049]) , value of type [scala.concurrent.forkjoin.forkjoinpool.submitter] (value [scala.concurrent.forkjoin.forkjoinpool$submitter@20c2d647]) failed remove when web application stopped. threads going renewed on time try , avoid probable memory leak.

finally toward end following

10-jun-2015 12:54:22.574 info [poolpartyconnector-actorsystem-akka.actor.default-dispatcher-2] org.apache.catalina.loader.webappclassloaderbase.checkstateforresourceloading illegal access: web application instance has been stopped already. not load [scala.util.control.nonfatal$]. following stack trace thrown debugging purposes attempt terminate thread caused illegal access. java.lang.illegalstateexception: illegal access: web application instance has been stopped already. not load [scala.util.control.nonfatal$]. following stack trace thrown debugging purposes attempt terminate thread caused illegal access. @ org.apache.catalina.loader.webappclassloaderbase.checkstateforresourceloading(webappclassloaderbase.java:1327) @ org.apache.catalina.loader.webappclassloaderbase.checkstateforclassloading(webappclassloaderbase.java:1313) @ org.apache.catalina.loader.webappclassloaderbase.loadclass(webappclassloaderbase.java:1196) @ org.apache.catalina.loader.webappclassloaderbase.loadclass(webappclassloaderbase.java:1157) @ akka.actor.actorsystemimpl$$anon$2.uncaughtexception(actorsystem.scala:511) @ akka.dispatch.forkjoinexecutorconfigurator$akkaforkjointask.exec(abstractdispatcher.scala:405) @ scala.concurrent.forkjoin.forkjointask.doexec(forkjointask.java:260) @ scala.concurrent.forkjoin.forkjoinpool$workqueue.runtask(forkjoinpool.java:1339) @ scala.concurrent.forkjoin.forkjoinpool.runworker(forkjoinpool.java:1979) @ scala.concurrent.forkjoin.forkjoinworkerthread.run(forkjoinworkerthread.java:107)

ps:

this causing issue in intellij. indeed, can still start , stop terminal tomcat. however, within intellij following on restart:

error: exception thrown agent : java.rmi.server.exportexception: port in use: 1099; nested exception is: java.net.bindexception: address in use

i have kill process on 1099 every time restart within intellij.


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -