On 29.10.2015 09:09, simone.rodenbach....@devk.de wrote:
Hi Christopher,

I attachted some pictures of the threads.

Thx,
  Simone


Hi Simone.
Christopher is in the USA, so it will take some time before he responds.
For the sake of gaining some time however : your attachments did not make it to the list, which strips most attachments.
Better : use a text editor to cut and paste the stack trace right here :





-----Ursprüngliche Nachricht-----
Von: Christopher Schultz [mailto:ch...@christopherschultz.net]
Gesendet: Mittwoch, 28. Oktober 2015 15:30
An: Tomcat Users List
Betreff: Re: AW: Tomcat 6, DB2 Driver Problems

Simone,

On 10/28/15 4:02 AM, simone.rodenbach....@devk.de wrote:
I tried to google for the driver and classloader and found nothing that helped 
me :-(

I can only provide you with this information:

I configured the datasource in the context.xml

<Resource name="jdbc/xxx" auth="Container" type="javax.sql.DataSource"
factory="org.apache.commons.dbcp.BasicDataSourceFactory"

Why are you overriding Tomcat's default DataSourceFactory with another one?

maxActive="10" minIdle="2" maxIdle="10" maxWait="10000"
minEvictableIdleTimeMillis="120000" timeBetweenEvictionRunsMillis="60000"
username="xxx"
         password="xxx"
driverClassName="com.ibm.db2.jcc.DB2Driver"
url="xxx;"
validationQuery="select 1 from sysibm.sysdummy1" />


The spring bean

<jee:jndi-lookup id="dataSource" jndi-name="java:/comp/env/jdbc/xxx" 
expected-type="javax.sql.DataSource" />

I created a test project. Because oft hat I'm sure that I don't start a thread.

It doesn't have to be *your code* starting the thread directly. JDBC
drivers have a habit of launching their own cleanup threads and then not
offering any interface to stop them.

But the log says:

Okt 28, 2015 8:41:15 AM org.apache.catalina.loader.WebappClassLoader 
clearReferencesThreads
SCHWERWIEGEND: The web application [/test] appears to have started a thread 
named [Timer-0] but has failed to stop it. This is very likely to create a 
memory leak.

I think this thread is started from 
org.apache.commons.dbcp.BasicDataSourceFactory.

Nope, BasicDataSourceFactory doesn't have the word "thread" anywhere in
its code:
http://svn.apache.org/viewvc/commons/proper/dbcp/tags/DBCP_1_4/src/java/org/apache/commons/dbcp/BasicDataSourceFactory.java?view=markup

I removed the db2cc4.jar to get an exception to inspect from where the driver 
is loaded and got:

  Caused by: java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1858)
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1709)
at 
org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1420)

That only tells you where the driver is loaded. It doesn't tell you when
the thread was launched.

After shutting-down your web application (and getting the warning about
the Timer-0 thread), can you take a thread dump and show us the stack
trace for the Timer-0 thread?

-chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Bitte denken Sie an die Umwelt. Müssen Sie diese E-Mail ausdrucken?
Wichtiger Hinweis zum Schutz Ihrer Daten!

Der Schutz von Kundendaten ist uns ein wichtiges Anliegen. Aus diesem Grund hat sich die 
DEVK freiwillig verpflichtet, die "Verhaltensregeln für den Umgang mit 
personenbezogenen Daten durch die deutsche Versicherungswirtschaft" (Code of 
Conduct) einzuhalten. Sie regeln die Erhebung, Verarbeitung und Nutzung von 
personenbezogenen Daten. Den vollen Wortlaut des Code of Conduct finden Sie unter 
www.devk.de/datenschutz.




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to