I am getting following memory leak warning if using Oval library in my java project for json input validation:
org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [rision] created a ThreadLocal with
key of type [net.sf.oval.internal.util.ThreadLocalLinkedList] (value [net.sf.oval.internal.util.ThreadLocalLinkedList@2c215899])
and a value of type [java.util.LinkedList] (value [[]]) 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.
I am using following code snippet to vaildate my json input:
Validator validator = new Validator();
violations = validator.validate(object);
if (violations.size() > 0) {
String message = violations.get(0).getMessage();
throw new InvalidInputException(message);
}
How to resolve memory leak for oval references? I am using tomcat server.