Hi Simon,
I tried to make the ThreadLocal cleanups more explicit in our code. Thread-specific caches should now be invalidated after query evaluation, even if a servlet request may reside in a thread pool (which may be the case in Tomcat).
It would be marvellous if you could test the latest stable snapshot [1] and come back to us with an updated report. If the problem persists, I’ll be glad to have a look at the full Tomcat error list.
Cheers Christian
[1] http://files.basex.org/releases/latest/
On Tue, Aug 28, 2018 at 10:14 AM Simon Chatelain schatela@gmail.com wrote:
Hello all,
I am currently using BaseX in embedded mode as a XQuery processor in a tomcat webapplication. I am receiving some XML, create a BaseX in memory database, execute some XQuery, then close the context.
But when I stop tomcat or reload the web application, I have a lot of errors saying:
SEVERE [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [webap] created a ThreadLocal with key of type [java.lang.ThreadLocal.SuppliedThreadLocal] (value [java.lang.ThreadLocal$SuppliedThreadLocal@60506a99]) and a value of type [org.basex.query.expr.path.PathCache] (value [org.basex.query.expr.path.PathCache@665cfafa]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Is there a way to avoid that error, by forcibly clearing these cache or something ?
Thanks
Simon