Bonjour,

Je suis actuellement entrain de programmer un projet JEE avec une base de données Derby. Le projet fonctionne, mais à la compilation, NetBeans m'affiche une série d'erreurs ou l'on me parle de fuites de mémoires et des drivers de derby qui m'inquiètent quelque peu :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
16 mai 2011 10:51:20 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
GRAVE: The web application [/BeCatalog] registered the JDBC driver [org.apache.derby.jdbc.ClientDriver40] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
16 mai 2011 10:51:20 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
GRAVE: The web application [/BeCatalog] registered the JDBC driver [org.apache.derby.jdbc.AutoloadedDriver40] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
16 mai 2011 10:51:20 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
GRAVE: The web application [/BeCatalog] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@1dbb27d]) and a value of type [org.apache.derby.iapi.services.context.ContextManager] (value [org.apache.derby.iapi.services.context.ContextManager@1401d28]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
16 mai 2011 10:51:36 org.apache.catalina.core.StandardContext reload
INFO: Le rechargement du contexte [/BeCatalog] a démarré
16 mai 2011 10:51:36 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
GRAVE: The web application [/BeCatalog] registered the JDBC driver [org.apache.derby.jdbc.AutoloadedDriver40] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
16 mai 2011 10:51:36 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
GRAVE: The web application [/BeCatalog] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@edbca8]) and a value of type [org.apache.derby.iapi.services.context.ContextManager] (value [org.apache.derby.iapi.services.context.ContextManager@ae3da8]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
16 mai 2011 10:51:36 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
GRAVE: The web application [/BeCatalog] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@edbca8]) and a value of type [org.apache.derby.iapi.services.context.ContextManager] (value [org.apache.derby.iapi.services.context.ContextManager@ae3da8]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
16 mai 2011 10:51:48 org.apache.catalina.core.StandardContext reload
INFO: Le rechargement du contexte [/BeCatalog] a démarré
16 mai 2011 10:51:48 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
GRAVE: The web application [/BeCatalog] registered the JDBC driver [org.apache.derby.jdbc.AutoloadedDriver40] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
16 mai 2011 10:51:48 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
GRAVE: The web application [/BeCatalog] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@da8742]) and a value of type [org.apache.derby.iapi.services.context.ContextManager] (value [org.apache.derby.iapi.services.context.ContextManager@61a414]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
16 mai 2011 10:54:10 org.apache.catalina.core.StandardContext reload
INFO: Le rechargement du contexte [/BeCatalog] a démarré
16 mai 2011 10:54:10 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
GRAVE: The web application [/BeCatalog] registered the JDBC driver [org.apache.derby.jdbc.AutoloadedDriver40] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
16 mai 2011 10:54:10 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
GRAVE: The web application [/BeCatalog] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6dcfde]) and a value of type [org.apache.derby.iapi.services.context.ContextManager] (value [org.apache.derby.iapi.services.context.ContextManager@7ba849]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
16 mai 2011 10:55:32 org.apache.catalina.core.StandardContext reload
INFO: Le rechargement du contexte [/BeCatalog] a démarré
16 mai 2011 10:55:32 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
GRAVE: The web application [/BeCatalog] registered the JDBC driver [org.apache.derby.jdbc.AutoloadedDriver40] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
16 mai 2011 10:55:32 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
GRAVE: The web application [/BeCatalog] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@456a0c]) and a value of type [org.apache.derby.iapi.services.context.ContextManager] (value [org.apache.derby.iapi.services.context.ContextManager@17efd36]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
Je précise également que NetBeans plante régulièrement.

Quelqu'un aurait une solution à ce problème?

Je précise que je me connecte à la base de données Derby avec ce bout de code dans l'init d'un de mes servlets :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
connection = DriverManager.getConnection("jdbc:derby:"+getServletContext().getRealPath("maBase")+";create=true");
Et que je quitte la base de données dans le destroy du même servlet :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
connection = DriverManager.getConnection("jdbc:derby:"+getServletContext().getRealPath("maBase")+";shutdown=true");
Voila,
Merci d'avance!