NativeResourceCollector thread

5 views
Skip to first unread message

ludovi...@gmail.com

unread,
May 15, 2018, 1:02:46 PM5/15/18
to JExcel Forum
Hello

In a javax.servlet.ServletContextListener, each time the server is starting:

I start the com.jniwrapper.win32.jexcel.Application to get the Major Version Number of Excel


Application application = null;


try {
 application
= new Application();
 
 
if (application.getMajorVersionNumber() <= 9)
 logger
.error("The actual version of the library doesn't support MS Excel 2000");


} catch (com.jniwrapper.win32.jexcel.ExcelException e) {
 logger
.error(e);
} catch (UnsatisfiedLinkError e){
 logger
.error(e);
}
catch (Exception e) {
 logger
.error(e);
}
finally {
 
try {
 
if (application != null) {
 application
.close(true);
 
}


 
} catch (Exception e) {
 logger
.trace("Exception while closing excel", e);
 
}
}


This is starting 2 threads that doesn't close :
com.jniwrapper.NativeResourceCollector
Timer-2

When the server stop, it always display in catalina :

12:35:25 [localhost-startStop-2] ERROR org.apache.catalina.loader.WebappClassLoaderBase() - The web application appears to have started a thread named [com.jniwrapper.NativeResourceCollector] but has failed to stop it. This is very likely to create a memory leak.
12:35:25 [localhost-startStop-2] ERROR org.apache.catalina.loader.WebappClassLoaderBase() - The web application  appears to have started a thread named [Timer-2] but has failed to stop it. This is very likely to create a memory leak.

When the server stop, I am able to stop manually the NativeResourceCollector thread :

com.jniwrapper.NativeResourceCollector.getInstance().stop();

But I can't find a way for the Timer-2 thread.

Is it something I should care ?

Thanks


Natasha Dmitrieva

unread,
May 16, 2018, 5:37:51 AM5/16/18
to Ludovic Goix, JExcel Forum
Hi Ludovic,
Thank you for your question.

The Timer thread you have noticed is a daemon thread related to a java util.Timer instance that is used by the Application class.
This thread will likely not become the cause of the memory leak, so you can safely ignore it.

By the way, I'd like to remind the JExcel Support period ended. If you would like to continue receiving a technical support, we recommend you to prolong the Subscription.

Regards,
Natasha

--
You received this message because you are subscribed to the Google Groups "JExcel Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jexcel-forum...@teamdev.com.
To view this discussion on the web visit https://groups.google.com/a/teamdev.com/d/msgid/jexcel-forum/1ea2096e-16fc-4dc9-a2c6-69f6017c27c4%40teamdev.com.
Reply all
Reply to author
Forward
0 new messages