You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Wirth, Kevin" <KW...@astoriabank.com> on 2015/02/12 15:06:25 UTC

tomcat severe error when shutting down service but startup is clean

I keep getting these weird tomcat errors on shutdown on a newly built system using tomcat 7.0.57 on  a windows 2012 server with jdk 1.7 that I can't figure out.  This is the catalina log:
Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/identityiq] registered the JDBC driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/identityiq] appears to have started a thread named [Thread-3] but has failed to stop it. This is very likely to create a memory leak.

The jdbc driver I am using is in the folder identityiq under the webapps directory in tomcat.  It is the sqljdbc4.jar driver.  This driver is not in the tomcat\lib directory.  Please help because I am getting no help from the vender.  Thank you.

Kevin Wirth
Sr. Systems Engineer
Information Services
Astoria Bank
* (516) 327-7762  |   *  kwirth@astoriabank.com<ma...@astoriabank.com>

Astoria Federal Savings is now Astoria Bank.  We can now be contacted at our new email addresses @astoriabank.com.


This e-mail and any attachments that accompany it are confidential and may be legally privileged. It is intended solely for the use of the individual(s) to whom it was intended to be addressed. Access to this e-mail by anyone else is unauthorized. If you are not the intended recipient, please immediately return the e-mail to the sender and delete the original and any copy from your computer. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to its intended recipient, you are herewith notified that any dissemination, distribution, copying or retention of this communication or the information contained herein is strictly prohibited.

Re: tomcat severe error when shutting down service but startup is clean

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

JB,

On 2/12/15 1:06 PM, JB MORLA wrote:
> Unsubscribe

FYI:

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

- -chris

> Le 12 févr. 2015 15:06, "Wirth, Kevin" <KW...@astoriabank.com> a
> écrit :
> 
>> I keep getting these weird tomcat errors on shutdown on a newly
>> built system using tomcat 7.0.57 on  a windows 2012 server with
>> jdk 1.7 that I can't figure out.  This is the catalina log: Feb
>> 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader 
>> clearReferencesJdbc SEVERE: The web application [/identityiq]
>> registered the JDBC driver 
>> [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to
>> unregister it when the web application was stopped. To prevent a
>> memory leak, the JDBC Driver has been forcibly unregistered. Feb
>> 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader 
>> clearReferencesThreads SEVERE: The web application [/identityiq]
>> appears to have started a thread named [Thread-3] but has failed
>> to stop it. This is very likely to create a memory leak.
>> 
>> The jdbc driver I am using is in the folder identityiq under the
>> webapps directory in tomcat.  It is the sqljdbc4.jar driver.
>> This driver is not in the tomcat\lib directory.  Please help
>> because I am getting no help from the vender.  Thank you.
>> 
>> Kevin Wirth Sr. Systems Engineer Information Services Astoria
>> Bank * (516) 327-7762  |   *  kwirth@astoriabank.com<mailto: 
>> kwirth@astoriabank.com>
>> 
>> Astoria Federal Savings is now Astoria Bank.  We can now be
>> contacted at our new email addresses @astoriabank.com.
>> 
>> 
>> This e-mail and any attachments that accompany it are
>> confidential and may be legally privileged. It is intended solely
>> for the use of the individual(s) to whom it was intended to be
>> addressed. Access to this e-mail by anyone else is unauthorized.
>> If you are not the intended recipient, please immediately return
>> the e-mail to the sender and delete the original and any copy
>> from your computer. If the reader of this message is not the
>> intended recipient, or an employee or agent responsible for 
>> delivering this message to its intended recipient, you are
>> herewith notified that any dissemination, distribution, copying
>> or retention of this communication or the information contained
>> herein is strictly prohibited.
>> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJU3iWKAAoJEBzwKT+lPKRYp2AP+wZq30z2A+Mp+0gbk2mk38t2
f78zfkEiTgkDErhrpv1ct5l+35AP7bIsNo/lcLa+LhI2te8fDBGSqcSWVIau8OjT
/0IkwE7QeTUyJkMUxmS/VW5gG7JT0Bz2hXIPlLwOZZWb1mHzV0DALu9ZIn4agkFN
hP88xiFm9VrvGXN7KrG/Ts2bUZnZr91pbk2dbx5/buIBmMm7sYiLBqItFwx6g+5M
j3fh9Op6O2IXLjeBfuzVWkpDzCeCrOR8WO64xJEuMHj77VrRtrEyZOKYjZNihFbR
/F9NDRy2IpXJr+ETIffGge34Ty/3jgi0kN4GfVfqUJZOmLZBnoxWCNJJW1U6okK/
PqCd+hjw8JdzuFLeRIfGZ6/Tapq+OFAPNJTcT/5/cwl0gFoDiPMvF2+1ksyKjQUh
4iLeqRJgur2ZQ7HkfRIWDW+C2ngT3bUJQSEHkSdeAoirUD97gY9DOAC5UaWBGI7r
rzHm0LSA9MGZ16D0g05xSwH3h7sABRuy2A0iydyrPoT/93BDHGSCGLQB9fK8cZge
qyDR0L7AC4uipVmKnrXoYrmqdcMlbS6MJOnDT/gMZ87LSzT32Vym3Vr5kRk2cowb
ZGJhjWe4GC+OKnfVs2jYenhw5GJEt4GePOKTaHZ/rhpU3a7fZjw6dsntmxBcelko
WGYC2KLJMDaUVKpnm2YX
=wSD1
-----END PGP SIGNATURE-----

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


Re: tomcat severe error when shutting down service but startup is clean

Posted by JB MORLA <jb...@gmail.com>.
Unsubscribe
Le 12 févr. 2015 15:06, "Wirth, Kevin" <KW...@astoriabank.com> a écrit :

> I keep getting these weird tomcat errors on shutdown on a newly built
> system using tomcat 7.0.57 on  a windows 2012 server with jdk 1.7 that I
> can't figure out.  This is the catalina log:
> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
> clearReferencesJdbc
> SEVERE: The web application [/identityiq] registered the JDBC driver
> [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to unregister it
> when the web application was stopped. To prevent a memory leak, the JDBC
> Driver has been forcibly unregistered.
> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/identityiq] appears to have started a thread
> named [Thread-3] but has failed to stop it. This is very likely to create a
> memory leak.
>
> The jdbc driver I am using is in the folder identityiq under the webapps
> directory in tomcat.  It is the sqljdbc4.jar driver.  This driver is not in
> the tomcat\lib directory.  Please help because I am getting no help from
> the vender.  Thank you.
>
> Kevin Wirth
> Sr. Systems Engineer
> Information Services
> Astoria Bank
> * (516) 327-7762  |   *  kwirth@astoriabank.com<mailto:
> kwirth@astoriabank.com>
>
> Astoria Federal Savings is now Astoria Bank.  We can now be contacted at
> our new email addresses @astoriabank.com.
>
>
> This e-mail and any attachments that accompany it are confidential and may
> be legally privileged. It is intended solely for the use of the
> individual(s) to whom it was intended to be addressed. Access to this
> e-mail by anyone else is unauthorized. If you are not the intended
> recipient, please immediately return the e-mail to the sender and delete
> the original and any copy from your computer. If the reader of this message
> is not the intended recipient, or an employee or agent responsible for
> delivering this message to its intended recipient, you are herewith
> notified that any dissemination, distribution, copying or retention of this
> communication or the information contained herein is strictly prohibited.
>

Re: tomcat severe error when shutting down service but startup is clean

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Kevin,

On 2/12/15 11:58 AM, Wirth, Kevin wrote:
> -----Original Message----- From: Christopher Schultz
> [mailto:chris@christopherschultz.net] Sent: Thursday, February 12,
> 2015 11:54 AM To: Tomcat Users List Subject: Re: tomcat severe
> error when shutting down service but startup is clean
> 
> Kevin,
> 
> On 2/12/15 11:46 AM, Wirth, Kevin wrote:
>> It should be logging to stderrour correct? I don't see anything
>> extra in that file other than the same severe messages I have
>> been getting.
> 
> That depends upon how you tried to trigger the thread dump. Care to
> be specific?
> 
> Thanks, -chris
> 
> 
> I right clicked the tomcat manager and selected thread dump and
> then stopped the service

The Windows Service Manager? That will either cause a thread dump on
standard output (or standard error) and therefore be in whatever log
file you have configured to capture standard output (or stderr). The
default is service-stdout.YEAR-MONTH-DAY.log for stdout and
service-stderr.YEAR-MONTH-DAY.log for stderr.

The files should be in Tomcat's logs/ directory. If you have split
CATALINA_HOME and CATALINA_BASE, then they will be under
CATALINA_BASE/logs.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJU3iS8AAoJEBzwKT+lPKRY/PsQAJzzxk3Dt5hgIDtSk1/UX7hX
/qHbfLyNxP9qR1sTlQJL56eqY6LKKS8Lf+PofgglX4gIenkzQfem+K/l0qpCN8j/
1nSe7Tx3cjFv4uZpeH/RVZPym76fyARjBDH/CLMrlXhBE95f81C4jz25gsHG6QQw
pb/0xDcQENpkzX2BusE+H73Z5CXSW7y9AgF+TD+sdsgIxNTvSeX09EngXFJmSbed
GlN5RsDydrOEqFUiZoDTobePlC819tv1SoUmgE273uUU9ZElmU5IV96KvJj7vxfw
ojXNstplI3NsYzGDUXo4Uz24Zzfe3VPWLiXLgexmWt2Iatx9CowfUEwn8BqIND9R
WXSeRfNIg1FDgzbPXsVYRKZm5cxleO2SSP8OsN+xjdj/E2ZU7OfzVMFRwv01UHJC
gcA/jXbYWe3TBokZa7MczthC/OPsh1nzpFbTonJzO6w/VvBRkwV0ppcRmIKAF47L
4R4JM53sm2yz/fhQ1yaPTEsAOZWVzLw0OqZkGSuRMlEBRz/QpF3HEVd9XE524bNG
CulYs4kfsVCT1WbS4OQQLRDLpXeEP5rQjxyG5WTSypr7x1n+RkWmT6OtU98xKf66
zcdjCGDpPX41E3sZQxenEeND949qrlcHISjPPgIkcA+cFAlR74ArI2Rt9BsbyVOv
/N5pE2OhqgTl2Rd84UDF
=4WGJ
-----END PGP SIGNATURE-----

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


RE: tomcat severe error when shutting down service but startup is clean

Posted by "Wirth, Kevin" <KW...@astoriabank.com>.

-----Original Message-----
From: Christopher Schultz [mailto:chris@christopherschultz.net] 
Sent: Thursday, February 12, 2015 11:54 AM
To: Tomcat Users List
Subject: Re: tomcat severe error when shutting down service but startup is clean

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Kevin,

On 2/12/15 11:46 AM, Wirth, Kevin wrote:
> It should be logging to stderrour correct? I don't see anything extra 
> in that file other than the same severe messages I have been getting.

That depends upon how you tried to trigger the thread dump. Care to be specific?

Thanks,
- -chris


I right clicked the tomcat manager and selected thread dump and then stopped the service



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJU3NqeAAoJEBzwKT+lPKRYjC0P/is7MEVxBqMgeq9cFzzNeD2j
1nIB3/YGPOY06M+cs3YaOFIojtfoKsZirVL87o3gBtei9tadk7W+cvu3ESWqmlgH
rXz/WixXHagntX6rr/Kw8Emd1Z6BrP8s6Ey/vIRY1fwYy2yL5kjqgAyE+4vpjTdJ
FlWamf99e0yS13yhdY8cZAFD8Eu1Q/3Pn+JADNro9MKI+CrdvamO8QdzdVAb6U6w
o6M1Hk+e2Py9N9Jefy/WgSI2gKwetouWU8mBSpc43R155+0lx2O/Llancqp29AD+
y0aQin6Bg3Mkb334NtrmzdmpPBqeyi7aP9qBNhKxfsDdccBhokjxbwrNK+rodsMP
EI2d2L/g3eQ63+r8w4LKsZpzsBGgk0o36IMTGw8v13ydMgNFzERAG4qWNo4UeMKR
4dNEMcZXyXmFQIm1yEJ59PiDrPuQTQwa7HQKLgeyNkQHq5PGKCfCGc+KZf9A/fxR
Yx/5FyNcQbf4U/jnl/Y6Ea4mXX0UKcsWsXdrmQCzYZZMtHd8wxi+7Xdrpy9RXI00
dl3Cp5zkLObIIyQbKTHlSQb7TsCDCcQ8Hiu7gGVHLaigLDhU3WZtS7SAKb3tNeXq
YlB44fVHyfwiahU8sf0UsdUdBTKzNMrnuqcFL7pyuHC5fmz7A1ENDAkcJTXqn89T
eb9nqTBXUCJRXidj8wAH
=VZw+
-----END PGP SIGNATURE-----

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

Astoria Federal Savings is now Astoria Bank.  We can now be contacted at our new email addresses @astoriabank.com.


This e-mail and any attachments that accompany it are confidential and may be legally privileged. It is intended solely for the use of the individual(s) to whom it was intended to be addressed. Access to this e-mail by anyone else is unauthorized. If you are not the intended recipient, please immediately return the e-mail to the sender and delete the original and any copy from your computer. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to its intended recipient, you are herewith notified that any dissemination, distribution, copying or retention of this communication or the information contained herein is strictly prohibited.

Re: tomcat severe error when shutting down service but startup is clean

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Kevin,

On 2/12/15 11:46 AM, Wirth, Kevin wrote:
> It should be logging to stderrour correct? I don't see anything 
> extra in that file other than the same severe messages I have been 
> getting.

That depends upon how you tried to trigger the thread dump. Care to be
specific?

Thanks,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJU3NqeAAoJEBzwKT+lPKRYjC0P/is7MEVxBqMgeq9cFzzNeD2j
1nIB3/YGPOY06M+cs3YaOFIojtfoKsZirVL87o3gBtei9tadk7W+cvu3ESWqmlgH
rXz/WixXHagntX6rr/Kw8Emd1Z6BrP8s6Ey/vIRY1fwYy2yL5kjqgAyE+4vpjTdJ
FlWamf99e0yS13yhdY8cZAFD8Eu1Q/3Pn+JADNro9MKI+CrdvamO8QdzdVAb6U6w
o6M1Hk+e2Py9N9Jefy/WgSI2gKwetouWU8mBSpc43R155+0lx2O/Llancqp29AD+
y0aQin6Bg3Mkb334NtrmzdmpPBqeyi7aP9qBNhKxfsDdccBhokjxbwrNK+rodsMP
EI2d2L/g3eQ63+r8w4LKsZpzsBGgk0o36IMTGw8v13ydMgNFzERAG4qWNo4UeMKR
4dNEMcZXyXmFQIm1yEJ59PiDrPuQTQwa7HQKLgeyNkQHq5PGKCfCGc+KZf9A/fxR
Yx/5FyNcQbf4U/jnl/Y6Ea4mXX0UKcsWsXdrmQCzYZZMtHd8wxi+7Xdrpy9RXI00
dl3Cp5zkLObIIyQbKTHlSQb7TsCDCcQ8Hiu7gGVHLaigLDhU3WZtS7SAKb3tNeXq
YlB44fVHyfwiahU8sf0UsdUdBTKzNMrnuqcFL7pyuHC5fmz7A1ENDAkcJTXqn89T
eb9nqTBXUCJRXidj8wAH
=VZw+
-----END PGP SIGNATURE-----

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


RE: tomcat severe error when shutting down service but startup is clean

Posted by "Wirth, Kevin" <KW...@astoriabank.com>.

-----Original Message-----
From: Daniel Mikusa [mailto:dmikusa@pivotal.io] 
Sent: Thursday, February 12, 2015 11:34 AM
To: Tomcat Users List
Subject: Re: tomcat severe error when shutting down service but startup is clean

On Thu, Feb 12, 2015 at 11:20 AM, Wirth, Kevin <KW...@astoriabank.com>
wrote:

>
>
> -----Original Message-----
> From: Daniel Mikusa [mailto:dmikusa@pivotal.io]
> Sent: Thursday, February 12, 2015 9:52 AM
> To: Tomcat Users List
> Subject: Re: tomcat severe error when shutting down service but 
> startup is clean
>
> On Thu, Feb 12, 2015 at 9:43 AM, Wirth, Kevin <KW...@astoriabank.com>
> wrote:
>
> > If I move it won't the app break because it will look for the driver 
> > in the folder and not find it?
> >
>
> 1.) Please don't top post.  Reply inline like this or at the bottom.
>
> 2.) No.  The app doesn't look for the driver in that specific location.
> It looks on the classpath.  Since the lib directory is also on the 
> classpath, it will still be available.
>
> Dan
>         Update: I added this to the java tab 
> -Dsun.lang.ClassLoader.allowArraySyntax=true and all of the severe 
> errors are gone except one:
> Feb 12, 2015 11:14:17 AM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/identityiq] appears to have started a 
> thread named [Thread-3] but has failed to stop it. This is very likely 
> to create a memory leak.
>
> Any ideas?
>

Something in your app is starting a thread. Because the app starts the thread, it's responsible to cleaning it up. This message is telling you that the thread is not being cleaned up.  If you take a thread dump when your app is running and then stop the app, you should be able to get an idea as to what created this thread.

http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my_running_webapp_.3F

Dan

It should be logging to stderrour correct?  I don't see anything extra in that file other than the same severe messages I have been getting.

>
> >
> > -----Original Message-----
> > From: Konstantin Kolinko [mailto:knst.kolinko@gmail.com]
> > Sent: Thursday, February 12, 2015 9:37 AM
> > To: Tomcat Users List
> > Subject: Re: tomcat severe error when shutting down service but 
> > startup is clean
> >
> > You need to move, not copy.
> >
> > Copying is not enough, as webapp jars are preferred over Tomcat ones.
> > Also having the same class in two places may result in a behaviour 
> > that you do not expect.
> > http://tomcat.apache.org/tomcat-7.0-doc/class-loader-howto.html
> >
> >
> > 2015-02-12 17:33 GMT+03:00 Wirth, Kevin <KW...@astoriabank.com>:
> > > Ok, I will copy the driver into tomcat\lib and see what happens.
> > > Thank
> > you.
> > >
> > > -----Original Message-----
> > > From: Daniel Mikusa [mailto:dmikusa@pivotal.io]
> > > Sent: Thursday, February 12, 2015 9:31 AM
> > > To: Tomcat Users List
> > > Subject: Re: tomcat severe error when shutting down service but 
> > > startup is clean
> > >
> > > On Thu, Feb 12, 2015 at 9:06 AM, Wirth, Kevin 
> > > <KW...@astoriabank.com>
> > > wrote:
> > >
> > >> I keep getting these weird tomcat errors on shutdown on a newly 
> > >> built system using tomcat 7.0.57 on  a windows 2012 server with 
> > >> jdk
> > >> 1.7 that I can't figure out.  This is the catalina log:
> > >> Feb 12, 2015 8:54:31 AM
> > >> org.apache.catalina.loader.WebappClassLoader
> > >> clearReferencesJdbc
> > >> SEVERE: The web application [/identityiq] registered the JDBC 
> > >> driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed 
> > >> to unregister it when the web application was stopped. To prevent 
> > >> a memory leak, the JDBC Driver has been forcibly unregistered.
> > >>
> > >
> > > This is saying that there was a problem unregistering this JDBC driver.
> > > It's my understanding that this is common for JDBC drivers and why 
> > > it's
> > generally recommended that you put them in either $CATALINA_HOME/lib 
> > or $CATALINA_BASE/lib instead of bundled with the web app.  Can you 
> > give that a try and see if this message goes away?
> > >
> > >
> > >> Feb 12, 2015 8:54:31 AM
> > >> org.apache.catalina.loader.WebappClassLoader
> > >> clearReferencesThreads
> > >> SEVERE: The web application [/identityiq] appears to have started 
> > >> a thread named [Thread-3] but has failed to stop it. This is very 
> > >> likely to create a memory leak.
> > >>
> > >
> > > Something (possibly your JDBC driver) in your app is starting a thread.
> > > Because the app starts the thread, it's responsible to cleaning it up.
> > > This message is telling you that the thread is not being cleaned up.
> > > If
> > you take a thread dump when your app is running and then stop the 
> > app, you should be able to get an idea as to what created this thread.
> > >
> > >
> > >>
> > >> The jdbc driver I am using is in the folder identityiq under the 
> > >> webapps directory in tomcat.  It is the sqljdbc4.jar driver.  
> > >> This driver is not in the tomcat\lib directory.  Please help 
> > >> because I am getting no help from the vender.  Thank you.
> > >>
> > >
> > > Is there any reason it's bundled with the app and not in the lib
> > directory?  Usually you'd put JDBC drivers in the lib directory.
> > >
> > > Dan
> > >
> > > On Thu, Feb 12, 2015 at 9:06 AM, Wirth, Kevin 
> > > <KW...@astoriabank.com>
> > > wrote:
> > >
> > >> I keep getting these weird tomcat errors on shutdown on a newly 
> > >> built system using tomcat 7.0.57 on  a windows 2012 server with 
> > >> jdk
> > >> 1.7 that I can't figure out.  This is the catalina log:
> > >> Feb 12, 2015 8:54:31 AM
> > >> org.apache.catalina.loader.WebappClassLoader
> > >> clearReferencesJdbc
> > >> SEVERE: The web application [/identityiq] registered the JDBC 
> > >> driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed 
> > >> to unregister it when the web application was stopped. To prevent 
> > >> a memory leak, the JDBC Driver has been forcibly unregistered.
> > >> Feb 12, 2015 8:54:31 AM
> > >> org.apache.catalina.loader.WebappClassLoader
> > >> clearReferencesThreads
> > >> SEVERE: The web application [/identityiq] appears to have started 
> > >> a thread named [Thread-3] but has failed to stop it. This is very 
> > >> likely to create a memory leak.
> > >>
> > >> The jdbc driver I am using is in the folder identityiq under the 
> > >> webapps directory in tomcat.  It is the sqljdbc4.jar driver.  
> > >> This driver is not in the tomcat\lib directory.  Please help 
> > >> because I am getting no help from the vender.  Thank you.
> > >>
>
>
Astoria Federal Savings is now Astoria Bank.  We can now be contacted at our new email addresses @astoriabank.com.


This e-mail and any attachments that accompany it are confidential and may be legally privileged. It is intended solely for the use of the individual(s) to whom it was intended to be addressed. Access to this e-mail by anyone else is unauthorized. If you are not the intended recipient, please immediately return the e-mail to the sender and delete the original and any copy from your computer. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to its intended recipient, you are herewith notified that any dissemination, distribution, copying or retention of this communication or the information contained herein is strictly prohibited.

Re: tomcat severe error when shutting down service but startup is clean

Posted by Daniel Mikusa <dm...@pivotal.io>.
On Thu, Feb 12, 2015 at 11:20 AM, Wirth, Kevin <KW...@astoriabank.com>
wrote:

>
>
> -----Original Message-----
> From: Daniel Mikusa [mailto:dmikusa@pivotal.io]
> Sent: Thursday, February 12, 2015 9:52 AM
> To: Tomcat Users List
> Subject: Re: tomcat severe error when shutting down service but startup is
> clean
>
> On Thu, Feb 12, 2015 at 9:43 AM, Wirth, Kevin <KW...@astoriabank.com>
> wrote:
>
> > If I move it won't the app break because it will look for the driver
> > in the folder and not find it?
> >
>
> 1.) Please don't top post.  Reply inline like this or at the bottom.
>
> 2.) No.  The app doesn't look for the driver in that specific location.
> It looks on the classpath.  Since the lib directory is also on the
> classpath, it will still be available.
>
> Dan
>         Update: I added this to the java tab
> -Dsun.lang.ClassLoader.allowArraySyntax=true and all of the severe errors
> are gone except one:
> Feb 12, 2015 11:14:17 AM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/identityiq] appears to have started a thread
> named [Thread-3] but has failed to stop it. This is very likely to create a
> memory leak.
>
> Any ideas?
>

Something in your app is starting a thread. Because the app starts the
thread, it's responsible to cleaning it up. This message is telling you
that the thread is not being cleaned up.  If you take a thread dump when
your app is running and then stop the app, you should be able to get an
idea as to what created this thread.

http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my_running_webapp_.3F

Dan



>
> >
> > -----Original Message-----
> > From: Konstantin Kolinko [mailto:knst.kolinko@gmail.com]
> > Sent: Thursday, February 12, 2015 9:37 AM
> > To: Tomcat Users List
> > Subject: Re: tomcat severe error when shutting down service but
> > startup is clean
> >
> > You need to move, not copy.
> >
> > Copying is not enough, as webapp jars are preferred over Tomcat ones.
> > Also having the same class in two places may result in a behaviour
> > that you do not expect.
> > http://tomcat.apache.org/tomcat-7.0-doc/class-loader-howto.html
> >
> >
> > 2015-02-12 17:33 GMT+03:00 Wirth, Kevin <KW...@astoriabank.com>:
> > > Ok, I will copy the driver into tomcat\lib and see what happens.
> > > Thank
> > you.
> > >
> > > -----Original Message-----
> > > From: Daniel Mikusa [mailto:dmikusa@pivotal.io]
> > > Sent: Thursday, February 12, 2015 9:31 AM
> > > To: Tomcat Users List
> > > Subject: Re: tomcat severe error when shutting down service but
> > > startup is clean
> > >
> > > On Thu, Feb 12, 2015 at 9:06 AM, Wirth, Kevin
> > > <KW...@astoriabank.com>
> > > wrote:
> > >
> > >> I keep getting these weird tomcat errors on shutdown on a newly
> > >> built system using tomcat 7.0.57 on  a windows 2012 server with jdk
> > >> 1.7 that I can't figure out.  This is the catalina log:
> > >> Feb 12, 2015 8:54:31 AM
> > >> org.apache.catalina.loader.WebappClassLoader
> > >> clearReferencesJdbc
> > >> SEVERE: The web application [/identityiq] registered the JDBC
> > >> driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to
> > >> unregister it when the web application was stopped. To prevent a
> > >> memory leak, the JDBC Driver has been forcibly unregistered.
> > >>
> > >
> > > This is saying that there was a problem unregistering this JDBC driver.
> > > It's my understanding that this is common for JDBC drivers and why
> > > it's
> > generally recommended that you put them in either $CATALINA_HOME/lib
> > or $CATALINA_BASE/lib instead of bundled with the web app.  Can you
> > give that a try and see if this message goes away?
> > >
> > >
> > >> Feb 12, 2015 8:54:31 AM
> > >> org.apache.catalina.loader.WebappClassLoader
> > >> clearReferencesThreads
> > >> SEVERE: The web application [/identityiq] appears to have started a
> > >> thread named [Thread-3] but has failed to stop it. This is very
> > >> likely to create a memory leak.
> > >>
> > >
> > > Something (possibly your JDBC driver) in your app is starting a thread.
> > > Because the app starts the thread, it's responsible to cleaning it up.
> > > This message is telling you that the thread is not being cleaned up.
> > > If
> > you take a thread dump when your app is running and then stop the app,
> > you should be able to get an idea as to what created this thread.
> > >
> > >
> > >>
> > >> The jdbc driver I am using is in the folder identityiq under the
> > >> webapps directory in tomcat.  It is the sqljdbc4.jar driver.  This
> > >> driver is not in the tomcat\lib directory.  Please help because I
> > >> am getting no help from the vender.  Thank you.
> > >>
> > >
> > > Is there any reason it's bundled with the app and not in the lib
> > directory?  Usually you'd put JDBC drivers in the lib directory.
> > >
> > > Dan
> > >
> > > On Thu, Feb 12, 2015 at 9:06 AM, Wirth, Kevin
> > > <KW...@astoriabank.com>
> > > wrote:
> > >
> > >> I keep getting these weird tomcat errors on shutdown on a newly
> > >> built system using tomcat 7.0.57 on  a windows 2012 server with jdk
> > >> 1.7 that I can't figure out.  This is the catalina log:
> > >> Feb 12, 2015 8:54:31 AM
> > >> org.apache.catalina.loader.WebappClassLoader
> > >> clearReferencesJdbc
> > >> SEVERE: The web application [/identityiq] registered the JDBC
> > >> driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to
> > >> unregister it when the web application was stopped. To prevent a
> > >> memory leak, the JDBC Driver has been forcibly unregistered.
> > >> Feb 12, 2015 8:54:31 AM
> > >> org.apache.catalina.loader.WebappClassLoader
> > >> clearReferencesThreads
> > >> SEVERE: The web application [/identityiq] appears to have started a
> > >> thread named [Thread-3] but has failed to stop it. This is very
> > >> likely to create a memory leak.
> > >>
> > >> The jdbc driver I am using is in the folder identityiq under the
> > >> webapps directory in tomcat.  It is the sqljdbc4.jar driver.  This
> > >> driver is not in the tomcat\lib directory.  Please help because I
> > >> am getting no help from the vender.  Thank you.
> > >>
>
>

RE: tomcat severe error when shutting down service but startup is clean

Posted by "Wirth, Kevin" <KW...@astoriabank.com>.

-----Original Message-----
From: Daniel Mikusa [mailto:dmikusa@pivotal.io] 
Sent: Thursday, February 12, 2015 9:52 AM
To: Tomcat Users List
Subject: Re: tomcat severe error when shutting down service but startup is clean

On Thu, Feb 12, 2015 at 9:43 AM, Wirth, Kevin <KW...@astoriabank.com>
wrote:

> If I move it won't the app break because it will look for the driver 
> in the folder and not find it?
>

1.) Please don't top post.  Reply inline like this or at the bottom.

2.) No.  The app doesn't look for the driver in that specific location.  It looks on the classpath.  Since the lib directory is also on the classpath, it will still be available.

Dan
	Update: I added this to the java tab -Dsun.lang.ClassLoader.allowArraySyntax=true and all of the severe errors are gone except one: 
Feb 12, 2015 11:14:17 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/identityiq] appears to have started a thread named [Thread-3] but has failed to stop it. This is very likely to create a memory leak.

Any ideas?

>
> -----Original Message-----
> From: Konstantin Kolinko [mailto:knst.kolinko@gmail.com]
> Sent: Thursday, February 12, 2015 9:37 AM
> To: Tomcat Users List
> Subject: Re: tomcat severe error when shutting down service but 
> startup is clean
>
> You need to move, not copy.
>
> Copying is not enough, as webapp jars are preferred over Tomcat ones.
> Also having the same class in two places may result in a behaviour 
> that you do not expect.
> http://tomcat.apache.org/tomcat-7.0-doc/class-loader-howto.html
>
>
> 2015-02-12 17:33 GMT+03:00 Wirth, Kevin <KW...@astoriabank.com>:
> > Ok, I will copy the driver into tomcat\lib and see what happens.  
> > Thank
> you.
> >
> > -----Original Message-----
> > From: Daniel Mikusa [mailto:dmikusa@pivotal.io]
> > Sent: Thursday, February 12, 2015 9:31 AM
> > To: Tomcat Users List
> > Subject: Re: tomcat severe error when shutting down service but 
> > startup is clean
> >
> > On Thu, Feb 12, 2015 at 9:06 AM, Wirth, Kevin 
> > <KW...@astoriabank.com>
> > wrote:
> >
> >> I keep getting these weird tomcat errors on shutdown on a newly 
> >> built system using tomcat 7.0.57 on  a windows 2012 server with jdk 
> >> 1.7 that I can't figure out.  This is the catalina log:
> >> Feb 12, 2015 8:54:31 AM 
> >> org.apache.catalina.loader.WebappClassLoader
> >> clearReferencesJdbc
> >> SEVERE: The web application [/identityiq] registered the JDBC 
> >> driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to 
> >> unregister it when the web application was stopped. To prevent a 
> >> memory leak, the JDBC Driver has been forcibly unregistered.
> >>
> >
> > This is saying that there was a problem unregistering this JDBC driver.
> > It's my understanding that this is common for JDBC drivers and why 
> > it's
> generally recommended that you put them in either $CATALINA_HOME/lib 
> or $CATALINA_BASE/lib instead of bundled with the web app.  Can you 
> give that a try and see if this message goes away?
> >
> >
> >> Feb 12, 2015 8:54:31 AM 
> >> org.apache.catalina.loader.WebappClassLoader
> >> clearReferencesThreads
> >> SEVERE: The web application [/identityiq] appears to have started a 
> >> thread named [Thread-3] but has failed to stop it. This is very 
> >> likely to create a memory leak.
> >>
> >
> > Something (possibly your JDBC driver) in your app is starting a thread.
> > Because the app starts the thread, it's responsible to cleaning it up.
> > This message is telling you that the thread is not being cleaned up.  
> > If
> you take a thread dump when your app is running and then stop the app, 
> you should be able to get an idea as to what created this thread.
> >
> >
> >>
> >> The jdbc driver I am using is in the folder identityiq under the 
> >> webapps directory in tomcat.  It is the sqljdbc4.jar driver.  This 
> >> driver is not in the tomcat\lib directory.  Please help because I 
> >> am getting no help from the vender.  Thank you.
> >>
> >
> > Is there any reason it's bundled with the app and not in the lib
> directory?  Usually you'd put JDBC drivers in the lib directory.
> >
> > Dan
> >
> > On Thu, Feb 12, 2015 at 9:06 AM, Wirth, Kevin 
> > <KW...@astoriabank.com>
> > wrote:
> >
> >> I keep getting these weird tomcat errors on shutdown on a newly 
> >> built system using tomcat 7.0.57 on  a windows 2012 server with jdk 
> >> 1.7 that I can't figure out.  This is the catalina log:
> >> Feb 12, 2015 8:54:31 AM 
> >> org.apache.catalina.loader.WebappClassLoader
> >> clearReferencesJdbc
> >> SEVERE: The web application [/identityiq] registered the JDBC 
> >> driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to 
> >> unregister it when the web application was stopped. To prevent a 
> >> memory leak, the JDBC Driver has been forcibly unregistered.
> >> Feb 12, 2015 8:54:31 AM 
> >> org.apache.catalina.loader.WebappClassLoader
> >> clearReferencesThreads
> >> SEVERE: The web application [/identityiq] appears to have started a 
> >> thread named [Thread-3] but has failed to stop it. This is very 
> >> likely to create a memory leak.
> >>
> >> The jdbc driver I am using is in the folder identityiq under the 
> >> webapps directory in tomcat.  It is the sqljdbc4.jar driver.  This 
> >> driver is not in the tomcat\lib directory.  Please help because I 
> >> am getting no help from the vender.  Thank you.
> >>
> >> Kevin Wirth
> >> Sr. Systems Engineer
> >> Information Services
> >> Astoria Bank
> >> * (516) 327-7762  |   *  kwirth@astoriabank.com<mailto:
> >> kwirth@astoriabank.com>
> >>
> >> Astoria Federal Savings is now Astoria Bank.  We can now be 
> >> contacted at our new email addresses @astoriabank.com.
> >>
> >>
> >> This e-mail and any attachments that accompany it are confidential 
> >> and may be legally privileged. It is intended solely for the use of 
> >> the
> >> individual(s) to whom it was intended to be addressed. Access to 
> >> this e-mail by anyone else is unauthorized. If you are not the 
> >> intended recipient, please immediately return the e-mail to the 
> >> sender and delete the original and any copy from your computer. If 
> >> the reader of this message is not the intended recipient, or an 
> >> employee or agent responsible for delivering this message to its 
> >> intended recipient, you are herewith notified that any 
> >> dissemination, distribution, copying or retention of this 
> >> communication or the information contained
> herein is strictly prohibited.
> >>
> > Astoria Federal Savings is now Astoria Bank.  We can now be 
> > contacted at
> our new email addresses @astoriabank.com.
> >
> >
> > This e-mail and any attachments that accompany it are confidential 
> > and
> may be legally privileged. It is intended solely for the use of the
> individual(s) to whom it was intended to be addressed. Access to this 
> e-mail by anyone else is unauthorized. If you are not the intended 
> recipient, please immediately return the e-mail to the sender and 
> delete the original and any copy from your computer. If the reader of 
> this message is not the intended recipient, or an employee or agent 
> responsible for delivering this message to its intended recipient, you 
> are herewith notified that any dissemination, distribution, copying or 
> retention of this communication or the information contained herein is strictly prohibited.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> Astoria Federal Savings is now Astoria Bank.  We can now be contacted 
> at our new email addresses @astoriabank.com.
>
>
> This e-mail and any attachments that accompany it are confidential and 
> may be legally privileged. It is intended solely for the use of the
> individual(s) to whom it was intended to be addressed. Access to this 
> e-mail by anyone else is unauthorized. If you are not the intended 
> recipient, please immediately return the e-mail to the sender and 
> delete the original and any copy from your computer. If the reader of 
> this message is not the intended recipient, or an employee or agent 
> responsible for delivering this message to its intended recipient, you 
> are herewith notified that any dissemination, distribution, copying or 
> retention of this communication or the information contained herein is strictly prohibited.
>
Astoria Federal Savings is now Astoria Bank.  We can now be contacted at our new email addresses @astoriabank.com.


This e-mail and any attachments that accompany it are confidential and may be legally privileged. It is intended solely for the use of the individual(s) to whom it was intended to be addressed. Access to this e-mail by anyone else is unauthorized. If you are not the intended recipient, please immediately return the e-mail to the sender and delete the original and any copy from your computer. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to its intended recipient, you are herewith notified that any dissemination, distribution, copying or retention of this communication or the information contained herein is strictly prohibited.

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


RE: tomcat severe error when shutting down service but startup is clean

Posted by "Wirth, Kevin" <KW...@astoriabank.com>.

-----Original Message-----
From: Daniel Mikusa [mailto:dmikusa@pivotal.io] 
Sent: Thursday, February 12, 2015 9:52 AM
To: Tomcat Users List
Subject: Re: tomcat severe error when shutting down service but startup is clean

On Thu, Feb 12, 2015 at 9:43 AM, Wirth, Kevin <KW...@astoriabank.com>
wrote:

> If I move it won't the app break because it will look for the driver 
> in the folder and not find it?
>

1.) Please don't top post.  Reply inline like this or at the bottom.

2.) No.  The app doesn't look for the driver in that specific location.  It looks on the classpath.  Since the lib directory is also on the classpath, it will still be available.


Dan

Sorry about that.  Ok I moved the driver and that message cleared up but now I get these at shutdown: Feb 12, 2015 9:57:01 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/identityiq] appears to have started a thread named [Thread-3] but has failed to stop it. This is very likely to create a memory leak.
Feb 12, 2015 9:57:01 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/identityiq] appears to have started a thread named [com.google.inject.internal.util.$Finalizer] but has failed to stop it. This is very likely to create a memory leak.
Feb 12, 2015 9:57:01 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/identityiq] appears to have started a thread named [Thread-7] but has failed to stop it. This is very likely to create a memory leak.
Feb 12, 2015 9:57:01 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/identityiq] appears to have started a thread named [Thread-8] but has failed to stop it. This is very likely to create a memory leak.
Feb 12, 2015 9:57:01 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/identityiq] appears to have started a thread named [Thread-9] but has failed to stop it. This is very likely to create a memory leak.
Feb 12, 2015 9:57:01 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/identityiq] appears to have started a thread named [Thread-10] but has failed to stop it. This is very likely to create a memory leak.
Feb 12, 2015 9:57:01 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/identityiq] appears to have started a thread named [Thread-11] but has failed to stop it. This is very likely to create a memory leak.
Feb 12, 2015 9:57:01 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/identityiq] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6dd89c3d]) and a value of type [sailpoint.api.Meter.MeterSet] (value [sailpoint.api.Meter$MeterSet@27f9a122]) 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.
Feb 12, 2015 9:57:01 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/identityiq] created a ThreadLocal with key of type [com.google.inject.internal.InjectorImpl$1] (value [com.google.inject.internal.InjectorImpl$1@83080e8]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@285f038b]) 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.
Feb 12, 2015 9:57:01 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/identityiq] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6dd89c3d]) and a value of type [sailpoint.api.Meter.MeterSet] (value [sailpoint.api.Meter$MeterSet@75e1af61]) 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.
Feb 12, 2015 9:57:01 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/identityiq] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6dd89c3d]) and a value of type [sailpoint.api.Meter.MeterSet] (value [sailpoint.api.Meter$MeterSet@33c145bd]) 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.
Feb 12, 2015 9:57:01 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/identityiq] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6dd89c3d]) and a value of type [sailpoint.api.Meter.MeterSet] (value [sailpoint.api.Meter$MeterSet@55c995d6]) 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.
Feb 12, 2015 9:57:01 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/identityiq] created a ThreadLocal with key of type [com.google.inject.internal.InjectorImpl$1] (value [com.google.inject.internal.InjectorImpl$1@83080e8]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@258c409a]) 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.
Feb 12, 2015 9:57:01 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/identityiq] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6dd89c3d]) and a value of type [sailpoint.api.Meter.MeterSet] (value [sailpoint.api.Meter$MeterSet@1ae551b8]) 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.
Feb 12, 2015 9:57:01 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/identityiq] created a ThreadLocal with key of type [com.google.inject.internal.InjectorImpl$1] (value [com.google.inject.internal.InjectorImpl$1@83080e8]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@455814d3]) 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.
Feb 12, 2015 9:57:01 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/identityiq] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6dd89c3d]) and a value of type [sailpoint.api.Meter.MeterSet] (value [sailpoint.api.Meter$MeterSet@19bf4c36]) 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.



>
> -----Original Message-----
> From: Konstantin Kolinko [mailto:knst.kolinko@gmail.com]
> Sent: Thursday, February 12, 2015 9:37 AM
> To: Tomcat Users List
> Subject: Re: tomcat severe error when shutting down service but 
> startup is clean
>
> You need to move, not copy.
>
> Copying is not enough, as webapp jars are preferred over Tomcat ones.
> Also having the same class in two places may result in a behaviour 
> that you do not expect.
> http://tomcat.apache.org/tomcat-7.0-doc/class-loader-howto.html
>
>
> 2015-02-12 17:33 GMT+03:00 Wirth, Kevin <KW...@astoriabank.com>:
> > Ok, I will copy the driver into tomcat\lib and see what happens.  
> > Thank
> you.
> >
> > -----Original Message-----
> > From: Daniel Mikusa [mailto:dmikusa@pivotal.io]
> > Sent: Thursday, February 12, 2015 9:31 AM
> > To: Tomcat Users List
> > Subject: Re: tomcat severe error when shutting down service but 
> > startup is clean
> >
> > On Thu, Feb 12, 2015 at 9:06 AM, Wirth, Kevin 
> > <KW...@astoriabank.com>
> > wrote:
> >
> >> I keep getting these weird tomcat errors on shutdown on a newly 
> >> built system using tomcat 7.0.57 on  a windows 2012 server with jdk 
> >> 1.7 that I can't figure out.  This is the catalina log:
> >> Feb 12, 2015 8:54:31 AM 
> >> org.apache.catalina.loader.WebappClassLoader
> >> clearReferencesJdbc
> >> SEVERE: The web application [/identityiq] registered the JDBC 
> >> driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to 
> >> unregister it when the web application was stopped. To prevent a 
> >> memory leak, the JDBC Driver has been forcibly unregistered.
> >>
> >
> > This is saying that there was a problem unregistering this JDBC driver.
> > It's my understanding that this is common for JDBC drivers and why 
> > it's
> generally recommended that you put them in either $CATALINA_HOME/lib 
> or $CATALINA_BASE/lib instead of bundled with the web app.  Can you 
> give that a try and see if this message goes away?
> >
> >
> >> Feb 12, 2015 8:54:31 AM 
> >> org.apache.catalina.loader.WebappClassLoader
> >> clearReferencesThreads
> >> SEVERE: The web application [/identityiq] appears to have started a 
> >> thread named [Thread-3] but has failed to stop it. This is very 
> >> likely to create a memory leak.
> >>
> >
> > Something (possibly your JDBC driver) in your app is starting a thread.
> > Because the app starts the thread, it's responsible to cleaning it up.
> > This message is telling you that the thread is not being cleaned up.  
> > If
> you take a thread dump when your app is running and then stop the app, 
> you should be able to get an idea as to what created this thread.
> >
> >
> >>
> >> The jdbc driver I am using is in the folder identityiq under the 
> >> webapps directory in tomcat.  It is the sqljdbc4.jar driver.  This 
> >> driver is not in the tomcat\lib directory.  Please help because I 
> >> am getting no help from the vender.  Thank you.
> >>
> >
> > Is there any reason it's bundled with the app and not in the lib
> directory?  Usually you'd put JDBC drivers in the lib directory.
> >
> > Dan
> >
> > On Thu, Feb 12, 2015 at 9:06 AM, Wirth, Kevin 
> > <KW...@astoriabank.com>
> > wrote:
> >
> >> I keep getting these weird tomcat errors on shutdown on a newly 
> >> built system using tomcat 7.0.57 on  a windows 2012 server with jdk 
> >> 1.7 that I can't figure out.  This is the catalina log:
> >> Feb 12, 2015 8:54:31 AM 
> >> org.apache.catalina.loader.WebappClassLoader
> >> clearReferencesJdbc
> >> SEVERE: The web application [/identityiq] registered the JDBC 
> >> driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to 
> >> unregister it when the web application was stopped. To prevent a 
> >> memory leak, the JDBC Driver has been forcibly unregistered.
> >> Feb 12, 2015 8:54:31 AM 
> >> org.apache.catalina.loader.WebappClassLoader
> >> clearReferencesThreads
> >> SEVERE: The web application [/identityiq] appears to have started a 
> >> thread named [Thread-3] but has failed to stop it. This is very 
> >> likely to create a memory leak.
> >>
> >> The jdbc driver I am using is in the folder identityiq under the 
> >> webapps directory in tomcat.  It is the sqljdbc4.jar driver.  This 
> >> driver is not in the tomcat\lib directory.  Please help because I 
> >> am getting no help from the vender.  Thank you.
> >>
> >> Kevin Wirth
> >> Sr. Systems Engineer
> >> Information Services
> >> Astoria Bank
> >> * (516) 327-7762  |   *  kwirth@astoriabank.com<mailto:
> >> kwirth@astoriabank.com>
> >>
> >> Astoria Federal Savings is now Astoria Bank.  We can now be 
> >> contacted at our new email addresses @astoriabank.com.
> >>
> >>
> >> This e-mail and any attachments that accompany it are confidential 
> >> and may be legally privileged. It is intended solely for the use of 
> >> the
> >> individual(s) to whom it was intended to be addressed. Access to 
> >> this e-mail by anyone else is unauthorized. If you are not the 
> >> intended recipient, please immediately return the e-mail to the 
> >> sender and delete the original and any copy from your computer. If 
> >> the reader of this message is not the intended recipient, or an 
> >> employee or agent responsible for delivering this message to its 
> >> intended recipient, you are herewith notified that any 
> >> dissemination, distribution, copying or retention of this 
> >> communication or the information contained
> herein is strictly prohibited.
> >>
> > Astoria Federal Savings is now Astoria Bank.  We can now be 
> > contacted at
> our new email addresses @astoriabank.com.
> >
> >
> > This e-mail and any attachments that accompany it are confidential 
> > and
> may be legally privileged. It is intended solely for the use of the
> individual(s) to whom it was intended to be addressed. Access to this 
> e-mail by anyone else is unauthorized. If you are not the intended 
> recipient, please immediately return the e-mail to the sender and 
> delete the original and any copy from your computer. If the reader of 
> this message is not the intended recipient, or an employee or agent 
> responsible for delivering this message to its intended recipient, you 
> are herewith notified that any dissemination, distribution, copying or 
> retention of this communication or the information contained herein is strictly prohibited.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> Astoria Federal Savings is now Astoria Bank.  We can now be contacted 
> at our new email addresses @astoriabank.com.
>
>
> This e-mail and any attachments that accompany it are confidential and 
> may be legally privileged. It is intended solely for the use of the
> individual(s) to whom it was intended to be addressed. Access to this 
> e-mail by anyone else is unauthorized. If you are not the intended 
> recipient, please immediately return the e-mail to the sender and 
> delete the original and any copy from your computer. If the reader of 
> this message is not the intended recipient, or an employee or agent 
> responsible for delivering this message to its intended recipient, you 
> are herewith notified that any dissemination, distribution, copying or 
> retention of this communication or the information contained herein is strictly prohibited.
>
Astoria Federal Savings is now Astoria Bank.  We can now be contacted at our new email addresses @astoriabank.com.


This e-mail and any attachments that accompany it are confidential and may be legally privileged. It is intended solely for the use of the individual(s) to whom it was intended to be addressed. Access to this e-mail by anyone else is unauthorized. If you are not the intended recipient, please immediately return the e-mail to the sender and delete the original and any copy from your computer. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to its intended recipient, you are herewith notified that any dissemination, distribution, copying or retention of this communication or the information contained herein is strictly prohibited.

Re: tomcat severe error when shutting down service but startup is clean

Posted by Daniel Mikusa <dm...@pivotal.io>.
On Thu, Feb 12, 2015 at 9:43 AM, Wirth, Kevin <KW...@astoriabank.com>
wrote:

> If I move it won't the app break because it will look for the driver in
> the folder and not find it?
>

1.) Please don't top post.  Reply inline like this or at the bottom.

2.) No.  The app doesn't look for the driver in that specific location.  It
looks on the classpath.  Since the lib directory is also on the classpath,
it will still be available.

Dan


>
> -----Original Message-----
> From: Konstantin Kolinko [mailto:knst.kolinko@gmail.com]
> Sent: Thursday, February 12, 2015 9:37 AM
> To: Tomcat Users List
> Subject: Re: tomcat severe error when shutting down service but startup is
> clean
>
> You need to move, not copy.
>
> Copying is not enough, as webapp jars are preferred over Tomcat ones.
> Also having the same class in two places may result in a behaviour that
> you do not expect.
> http://tomcat.apache.org/tomcat-7.0-doc/class-loader-howto.html
>
>
> 2015-02-12 17:33 GMT+03:00 Wirth, Kevin <KW...@astoriabank.com>:
> > Ok, I will copy the driver into tomcat\lib and see what happens.  Thank
> you.
> >
> > -----Original Message-----
> > From: Daniel Mikusa [mailto:dmikusa@pivotal.io]
> > Sent: Thursday, February 12, 2015 9:31 AM
> > To: Tomcat Users List
> > Subject: Re: tomcat severe error when shutting down service but
> > startup is clean
> >
> > On Thu, Feb 12, 2015 at 9:06 AM, Wirth, Kevin <KW...@astoriabank.com>
> > wrote:
> >
> >> I keep getting these weird tomcat errors on shutdown on a newly built
> >> system using tomcat 7.0.57 on  a windows 2012 server with jdk 1.7
> >> that I can't figure out.  This is the catalina log:
> >> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
> >> clearReferencesJdbc
> >> SEVERE: The web application [/identityiq] registered the JDBC driver
> >> [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to
> >> unregister it when the web application was stopped. To prevent a
> >> memory leak, the JDBC Driver has been forcibly unregistered.
> >>
> >
> > This is saying that there was a problem unregistering this JDBC driver.
> > It's my understanding that this is common for JDBC drivers and why it's
> generally recommended that you put them in either $CATALINA_HOME/lib or
> $CATALINA_BASE/lib instead of bundled with the web app.  Can you give that
> a try and see if this message goes away?
> >
> >
> >> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
> >> clearReferencesThreads
> >> SEVERE: The web application [/identityiq] appears to have started a
> >> thread named [Thread-3] but has failed to stop it. This is very
> >> likely to create a memory leak.
> >>
> >
> > Something (possibly your JDBC driver) in your app is starting a thread.
> > Because the app starts the thread, it's responsible to cleaning it up.
> > This message is telling you that the thread is not being cleaned up.  If
> you take a thread dump when your app is running and then stop the app, you
> should be able to get an idea as to what created this thread.
> >
> >
> >>
> >> The jdbc driver I am using is in the folder identityiq under the
> >> webapps directory in tomcat.  It is the sqljdbc4.jar driver.  This
> >> driver is not in the tomcat\lib directory.  Please help because I am
> >> getting no help from the vender.  Thank you.
> >>
> >
> > Is there any reason it's bundled with the app and not in the lib
> directory?  Usually you'd put JDBC drivers in the lib directory.
> >
> > Dan
> >
> > On Thu, Feb 12, 2015 at 9:06 AM, Wirth, Kevin <KW...@astoriabank.com>
> > wrote:
> >
> >> I keep getting these weird tomcat errors on shutdown on a newly built
> >> system using tomcat 7.0.57 on  a windows 2012 server with jdk 1.7
> >> that I can't figure out.  This is the catalina log:
> >> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
> >> clearReferencesJdbc
> >> SEVERE: The web application [/identityiq] registered the JDBC driver
> >> [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to
> >> unregister it when the web application was stopped. To prevent a
> >> memory leak, the JDBC Driver has been forcibly unregistered.
> >> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
> >> clearReferencesThreads
> >> SEVERE: The web application [/identityiq] appears to have started a
> >> thread named [Thread-3] but has failed to stop it. This is very
> >> likely to create a memory leak.
> >>
> >> The jdbc driver I am using is in the folder identityiq under the
> >> webapps directory in tomcat.  It is the sqljdbc4.jar driver.  This
> >> driver is not in the tomcat\lib directory.  Please help because I am
> >> getting no help from the vender.  Thank you.
> >>
> >> Kevin Wirth
> >> Sr. Systems Engineer
> >> Information Services
> >> Astoria Bank
> >> * (516) 327-7762  |   *  kwirth@astoriabank.com<mailto:
> >> kwirth@astoriabank.com>
> >>
> >> Astoria Federal Savings is now Astoria Bank.  We can now be contacted
> >> at our new email addresses @astoriabank.com.
> >>
> >>
> >> This e-mail and any attachments that accompany it are confidential
> >> and may be legally privileged. It is intended solely for the use of
> >> the
> >> individual(s) to whom it was intended to be addressed. Access to this
> >> e-mail by anyone else is unauthorized. If you are not the intended
> >> recipient, please immediately return the e-mail to the sender and
> >> delete the original and any copy from your computer. If the reader of
> >> this message is not the intended recipient, or an employee or agent
> >> responsible for delivering this message to its intended recipient,
> >> you are herewith notified that any dissemination, distribution,
> >> copying or retention of this communication or the information contained
> herein is strictly prohibited.
> >>
> > Astoria Federal Savings is now Astoria Bank.  We can now be contacted at
> our new email addresses @astoriabank.com.
> >
> >
> > This e-mail and any attachments that accompany it are confidential and
> may be legally privileged. It is intended solely for the use of the
> individual(s) to whom it was intended to be addressed. Access to this
> e-mail by anyone else is unauthorized. If you are not the intended
> recipient, please immediately return the e-mail to the sender and delete
> the original and any copy from your computer. If the reader of this message
> is not the intended recipient, or an employee or agent responsible for
> delivering this message to its intended recipient, you are herewith
> notified that any dissemination, distribution, copying or retention of this
> communication or the information contained herein is strictly prohibited.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> Astoria Federal Savings is now Astoria Bank.  We can now be contacted at
> our new email addresses @astoriabank.com.
>
>
> This e-mail and any attachments that accompany it are confidential and may
> be legally privileged. It is intended solely for the use of the
> individual(s) to whom it was intended to be addressed. Access to this
> e-mail by anyone else is unauthorized. If you are not the intended
> recipient, please immediately return the e-mail to the sender and delete
> the original and any copy from your computer. If the reader of this message
> is not the intended recipient, or an employee or agent responsible for
> delivering this message to its intended recipient, you are herewith
> notified that any dissemination, distribution, copying or retention of this
> communication or the information contained herein is strictly prohibited.
>

RE: tomcat severe error when shutting down service but startup is clean

Posted by "Wirth, Kevin" <KW...@astoriabank.com>.
If I move it won't the app break because it will look for the driver in the folder and not find it?

-----Original Message-----
From: Konstantin Kolinko [mailto:knst.kolinko@gmail.com] 
Sent: Thursday, February 12, 2015 9:37 AM
To: Tomcat Users List
Subject: Re: tomcat severe error when shutting down service but startup is clean

You need to move, not copy.

Copying is not enough, as webapp jars are preferred over Tomcat ones.
Also having the same class in two places may result in a behaviour that you do not expect.
http://tomcat.apache.org/tomcat-7.0-doc/class-loader-howto.html


2015-02-12 17:33 GMT+03:00 Wirth, Kevin <KW...@astoriabank.com>:
> Ok, I will copy the driver into tomcat\lib and see what happens.  Thank you.
>
> -----Original Message-----
> From: Daniel Mikusa [mailto:dmikusa@pivotal.io]
> Sent: Thursday, February 12, 2015 9:31 AM
> To: Tomcat Users List
> Subject: Re: tomcat severe error when shutting down service but 
> startup is clean
>
> On Thu, Feb 12, 2015 at 9:06 AM, Wirth, Kevin <KW...@astoriabank.com>
> wrote:
>
>> I keep getting these weird tomcat errors on shutdown on a newly built 
>> system using tomcat 7.0.57 on  a windows 2012 server with jdk 1.7 
>> that I can't figure out.  This is the catalina log:
>> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
>> clearReferencesJdbc
>> SEVERE: The web application [/identityiq] registered the JDBC driver 
>> [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to 
>> unregister it when the web application was stopped. To prevent a 
>> memory leak, the JDBC Driver has been forcibly unregistered.
>>
>
> This is saying that there was a problem unregistering this JDBC driver.
> It's my understanding that this is common for JDBC drivers and why it's generally recommended that you put them in either $CATALINA_HOME/lib or $CATALINA_BASE/lib instead of bundled with the web app.  Can you give that a try and see if this message goes away?
>
>
>> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
>> clearReferencesThreads
>> SEVERE: The web application [/identityiq] appears to have started a 
>> thread named [Thread-3] but has failed to stop it. This is very 
>> likely to create a memory leak.
>>
>
> Something (possibly your JDBC driver) in your app is starting a thread.
> Because the app starts the thread, it's responsible to cleaning it up.
> This message is telling you that the thread is not being cleaned up.  If you take a thread dump when your app is running and then stop the app, you should be able to get an idea as to what created this thread.
>
>
>>
>> The jdbc driver I am using is in the folder identityiq under the 
>> webapps directory in tomcat.  It is the sqljdbc4.jar driver.  This 
>> driver is not in the tomcat\lib directory.  Please help because I am 
>> getting no help from the vender.  Thank you.
>>
>
> Is there any reason it's bundled with the app and not in the lib directory?  Usually you'd put JDBC drivers in the lib directory.
>
> Dan
>
> On Thu, Feb 12, 2015 at 9:06 AM, Wirth, Kevin <KW...@astoriabank.com>
> wrote:
>
>> I keep getting these weird tomcat errors on shutdown on a newly built 
>> system using tomcat 7.0.57 on  a windows 2012 server with jdk 1.7 
>> that I can't figure out.  This is the catalina log:
>> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
>> clearReferencesJdbc
>> SEVERE: The web application [/identityiq] registered the JDBC driver 
>> [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to 
>> unregister it when the web application was stopped. To prevent a 
>> memory leak, the JDBC Driver has been forcibly unregistered.
>> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
>> clearReferencesThreads
>> SEVERE: The web application [/identityiq] appears to have started a 
>> thread named [Thread-3] but has failed to stop it. This is very 
>> likely to create a memory leak.
>>
>> The jdbc driver I am using is in the folder identityiq under the 
>> webapps directory in tomcat.  It is the sqljdbc4.jar driver.  This 
>> driver is not in the tomcat\lib directory.  Please help because I am 
>> getting no help from the vender.  Thank you.
>>
>> Kevin Wirth
>> Sr. Systems Engineer
>> Information Services
>> Astoria Bank
>> * (516) 327-7762  |   *  kwirth@astoriabank.com<mailto:
>> kwirth@astoriabank.com>
>>
>> Astoria Federal Savings is now Astoria Bank.  We can now be contacted 
>> at our new email addresses @astoriabank.com.
>>
>>
>> This e-mail and any attachments that accompany it are confidential 
>> and may be legally privileged. It is intended solely for the use of 
>> the
>> individual(s) to whom it was intended to be addressed. Access to this 
>> e-mail by anyone else is unauthorized. If you are not the intended 
>> recipient, please immediately return the e-mail to the sender and 
>> delete the original and any copy from your computer. If the reader of 
>> this message is not the intended recipient, or an employee or agent 
>> responsible for delivering this message to its intended recipient, 
>> you are herewith notified that any dissemination, distribution, 
>> copying or retention of this communication or the information contained herein is strictly prohibited.
>>
> Astoria Federal Savings is now Astoria Bank.  We can now be contacted at our new email addresses @astoriabank.com.
>
>
> This e-mail and any attachments that accompany it are confidential and may be legally privileged. It is intended solely for the use of the individual(s) to whom it was intended to be addressed. Access to this e-mail by anyone else is unauthorized. If you are not the intended recipient, please immediately return the e-mail to the sender and delete the original and any copy from your computer. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to its intended recipient, you are herewith notified that any dissemination, distribution, copying or retention of this communication or the information contained herein is strictly prohibited.

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

Astoria Federal Savings is now Astoria Bank.  We can now be contacted at our new email addresses @astoriabank.com.


This e-mail and any attachments that accompany it are confidential and may be legally privileged. It is intended solely for the use of the individual(s) to whom it was intended to be addressed. Access to this e-mail by anyone else is unauthorized. If you are not the intended recipient, please immediately return the e-mail to the sender and delete the original and any copy from your computer. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to its intended recipient, you are herewith notified that any dissemination, distribution, copying or retention of this communication or the information contained herein is strictly prohibited.

Re: tomcat severe error when shutting down service but startup is clean

Posted by Konstantin Kolinko <kn...@gmail.com>.
You need to move, not copy.

Copying is not enough, as webapp jars are preferred over Tomcat ones.
Also having the same class in two places may result in a behaviour
that you do not expect.
http://tomcat.apache.org/tomcat-7.0-doc/class-loader-howto.html


2015-02-12 17:33 GMT+03:00 Wirth, Kevin <KW...@astoriabank.com>:
> Ok, I will copy the driver into tomcat\lib and see what happens.  Thank you.
>
> -----Original Message-----
> From: Daniel Mikusa [mailto:dmikusa@pivotal.io]
> Sent: Thursday, February 12, 2015 9:31 AM
> To: Tomcat Users List
> Subject: Re: tomcat severe error when shutting down service but startup is clean
>
> On Thu, Feb 12, 2015 at 9:06 AM, Wirth, Kevin <KW...@astoriabank.com>
> wrote:
>
>> I keep getting these weird tomcat errors on shutdown on a newly built
>> system using tomcat 7.0.57 on  a windows 2012 server with jdk 1.7 that
>> I can't figure out.  This is the catalina log:
>> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
>> clearReferencesJdbc
>> SEVERE: The web application [/identityiq] registered the JDBC driver
>> [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to
>> unregister it when the web application was stopped. To prevent a
>> memory leak, the JDBC Driver has been forcibly unregistered.
>>
>
> This is saying that there was a problem unregistering this JDBC driver.
> It's my understanding that this is common for JDBC drivers and why it's generally recommended that you put them in either $CATALINA_HOME/lib or $CATALINA_BASE/lib instead of bundled with the web app.  Can you give that a try and see if this message goes away?
>
>
>> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
>> clearReferencesThreads
>> SEVERE: The web application [/identityiq] appears to have started a
>> thread named [Thread-3] but has failed to stop it. This is very likely
>> to create a memory leak.
>>
>
> Something (possibly your JDBC driver) in your app is starting a thread.
> Because the app starts the thread, it's responsible to cleaning it up.
> This message is telling you that the thread is not being cleaned up.  If you take a thread dump when your app is running and then stop the app, you should be able to get an idea as to what created this thread.
>
>
>>
>> The jdbc driver I am using is in the folder identityiq under the
>> webapps directory in tomcat.  It is the sqljdbc4.jar driver.  This
>> driver is not in the tomcat\lib directory.  Please help because I am
>> getting no help from the vender.  Thank you.
>>
>
> Is there any reason it's bundled with the app and not in the lib directory?  Usually you'd put JDBC drivers in the lib directory.
>
> Dan
>
> On Thu, Feb 12, 2015 at 9:06 AM, Wirth, Kevin <KW...@astoriabank.com>
> wrote:
>
>> I keep getting these weird tomcat errors on shutdown on a newly built
>> system using tomcat 7.0.57 on  a windows 2012 server with jdk 1.7 that
>> I can't figure out.  This is the catalina log:
>> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
>> clearReferencesJdbc
>> SEVERE: The web application [/identityiq] registered the JDBC driver
>> [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to
>> unregister it when the web application was stopped. To prevent a
>> memory leak, the JDBC Driver has been forcibly unregistered.
>> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
>> clearReferencesThreads
>> SEVERE: The web application [/identityiq] appears to have started a
>> thread named [Thread-3] but has failed to stop it. This is very likely
>> to create a memory leak.
>>
>> The jdbc driver I am using is in the folder identityiq under the
>> webapps directory in tomcat.  It is the sqljdbc4.jar driver.  This
>> driver is not in the tomcat\lib directory.  Please help because I am
>> getting no help from the vender.  Thank you.
>>
>> Kevin Wirth
>> Sr. Systems Engineer
>> Information Services
>> Astoria Bank
>> * (516) 327-7762  |   *  kwirth@astoriabank.com<mailto:
>> kwirth@astoriabank.com>
>>
>> Astoria Federal Savings is now Astoria Bank.  We can now be contacted
>> at our new email addresses @astoriabank.com.
>>
>>
>> This e-mail and any attachments that accompany it are confidential and
>> may be legally privileged. It is intended solely for the use of the
>> individual(s) to whom it was intended to be addressed. Access to this
>> e-mail by anyone else is unauthorized. If you are not the intended
>> recipient, please immediately return the e-mail to the sender and
>> delete the original and any copy from your computer. If the reader of
>> this message is not the intended recipient, or an employee or agent
>> responsible for delivering this message to its intended recipient, you
>> are herewith notified that any dissemination, distribution, copying or
>> retention of this communication or the information contained herein is strictly prohibited.
>>
> Astoria Federal Savings is now Astoria Bank.  We can now be contacted at our new email addresses @astoriabank.com.
>
>
> This e-mail and any attachments that accompany it are confidential and may be legally privileged. It is intended solely for the use of the individual(s) to whom it was intended to be addressed. Access to this e-mail by anyone else is unauthorized. If you are not the intended recipient, please immediately return the e-mail to the sender and delete the original and any copy from your computer. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to its intended recipient, you are herewith notified that any dissemination, distribution, copying or retention of this communication or the information contained herein is strictly prohibited.

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


RE: tomcat severe error when shutting down service but startup is clean

Posted by "Wirth, Kevin" <KW...@astoriabank.com>.
Ok, I will copy the driver into tomcat\lib and see what happens.  Thank you.  

-----Original Message-----
From: Daniel Mikusa [mailto:dmikusa@pivotal.io] 
Sent: Thursday, February 12, 2015 9:31 AM
To: Tomcat Users List
Subject: Re: tomcat severe error when shutting down service but startup is clean

On Thu, Feb 12, 2015 at 9:06 AM, Wirth, Kevin <KW...@astoriabank.com>
wrote:

> I keep getting these weird tomcat errors on shutdown on a newly built 
> system using tomcat 7.0.57 on  a windows 2012 server with jdk 1.7 that 
> I can't figure out.  This is the catalina log:
> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
> clearReferencesJdbc
> SEVERE: The web application [/identityiq] registered the JDBC driver 
> [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to 
> unregister it when the web application was stopped. To prevent a 
> memory leak, the JDBC Driver has been forcibly unregistered.
>

This is saying that there was a problem unregistering this JDBC driver.
It's my understanding that this is common for JDBC drivers and why it's generally recommended that you put them in either $CATALINA_HOME/lib or $CATALINA_BASE/lib instead of bundled with the web app.  Can you give that a try and see if this message goes away?


> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/identityiq] appears to have started a 
> thread named [Thread-3] but has failed to stop it. This is very likely 
> to create a memory leak.
>

Something (possibly your JDBC driver) in your app is starting a thread.
Because the app starts the thread, it's responsible to cleaning it up.
This message is telling you that the thread is not being cleaned up.  If you take a thread dump when your app is running and then stop the app, you should be able to get an idea as to what created this thread.


>
> The jdbc driver I am using is in the folder identityiq under the 
> webapps directory in tomcat.  It is the sqljdbc4.jar driver.  This 
> driver is not in the tomcat\lib directory.  Please help because I am 
> getting no help from the vender.  Thank you.
>

Is there any reason it's bundled with the app and not in the lib directory?  Usually you'd put JDBC drivers in the lib directory.

Dan

On Thu, Feb 12, 2015 at 9:06 AM, Wirth, Kevin <KW...@astoriabank.com>
wrote:

> I keep getting these weird tomcat errors on shutdown on a newly built 
> system using tomcat 7.0.57 on  a windows 2012 server with jdk 1.7 that 
> I can't figure out.  This is the catalina log:
> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
> clearReferencesJdbc
> SEVERE: The web application [/identityiq] registered the JDBC driver 
> [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to 
> unregister it when the web application was stopped. To prevent a 
> memory leak, the JDBC Driver has been forcibly unregistered.
> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/identityiq] appears to have started a 
> thread named [Thread-3] but has failed to stop it. This is very likely 
> to create a memory leak.
>
> The jdbc driver I am using is in the folder identityiq under the 
> webapps directory in tomcat.  It is the sqljdbc4.jar driver.  This 
> driver is not in the tomcat\lib directory.  Please help because I am 
> getting no help from the vender.  Thank you.
>
> Kevin Wirth
> Sr. Systems Engineer
> Information Services
> Astoria Bank
> * (516) 327-7762  |   *  kwirth@astoriabank.com<mailto:
> kwirth@astoriabank.com>
>
> Astoria Federal Savings is now Astoria Bank.  We can now be contacted 
> at our new email addresses @astoriabank.com.
>
>
> This e-mail and any attachments that accompany it are confidential and 
> may be legally privileged. It is intended solely for the use of the
> individual(s) to whom it was intended to be addressed. Access to this 
> e-mail by anyone else is unauthorized. If you are not the intended 
> recipient, please immediately return the e-mail to the sender and 
> delete the original and any copy from your computer. If the reader of 
> this message is not the intended recipient, or an employee or agent 
> responsible for delivering this message to its intended recipient, you 
> are herewith notified that any dissemination, distribution, copying or 
> retention of this communication or the information contained herein is strictly prohibited.
>
Astoria Federal Savings is now Astoria Bank.  We can now be contacted at our new email addresses @astoriabank.com.


This e-mail and any attachments that accompany it are confidential and may be legally privileged. It is intended solely for the use of the individual(s) to whom it was intended to be addressed. Access to this e-mail by anyone else is unauthorized. If you are not the intended recipient, please immediately return the e-mail to the sender and delete the original and any copy from your computer. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to its intended recipient, you are herewith notified that any dissemination, distribution, copying or retention of this communication or the information contained herein is strictly prohibited.

Re: tomcat severe error when shutting down service but startup is clean

Posted by Daniel Mikusa <dm...@pivotal.io>.
On Thu, Feb 12, 2015 at 9:06 AM, Wirth, Kevin <KW...@astoriabank.com>
wrote:

> I keep getting these weird tomcat errors on shutdown on a newly built
> system using tomcat 7.0.57 on  a windows 2012 server with jdk 1.7 that I
> can't figure out.  This is the catalina log:
> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
> clearReferencesJdbc
> SEVERE: The web application [/identityiq] registered the JDBC driver
> [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to unregister it
> when the web application was stopped. To prevent a memory leak, the JDBC
> Driver has been forcibly unregistered.
>

This is saying that there was a problem unregistering this JDBC driver.
It's my understanding that this is common for JDBC drivers and why it's
generally recommended that you put them in either $CATALINA_HOME/lib or
$CATALINA_BASE/lib instead of bundled with the web app.  Can you give that
a try and see if this message goes away?


> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/identityiq] appears to have started a thread
> named [Thread-3] but has failed to stop it. This is very likely to create a
> memory leak.
>

Something (possibly your JDBC driver) in your app is starting a thread.
Because the app starts the thread, it's responsible to cleaning it up.
This message is telling you that the thread is not being cleaned up.  If
you take a thread dump when your app is running and then stop the app, you
should be able to get an idea as to what created this thread.


>
> The jdbc driver I am using is in the folder identityiq under the webapps
> directory in tomcat.  It is the sqljdbc4.jar driver.  This driver is not in
> the tomcat\lib directory.  Please help because I am getting no help from
> the vender.  Thank you.
>

Is there any reason it's bundled with the app and not in the lib
directory?  Usually you'd put JDBC drivers in the lib directory.

Dan

On Thu, Feb 12, 2015 at 9:06 AM, Wirth, Kevin <KW...@astoriabank.com>
wrote:

> I keep getting these weird tomcat errors on shutdown on a newly built
> system using tomcat 7.0.57 on  a windows 2012 server with jdk 1.7 that I
> can't figure out.  This is the catalina log:
> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
> clearReferencesJdbc
> SEVERE: The web application [/identityiq] registered the JDBC driver
> [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to unregister it
> when the web application was stopped. To prevent a memory leak, the JDBC
> Driver has been forcibly unregistered.
> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: The web application [/identityiq] appears to have started a thread
> named [Thread-3] but has failed to stop it. This is very likely to create a
> memory leak.
>
> The jdbc driver I am using is in the folder identityiq under the webapps
> directory in tomcat.  It is the sqljdbc4.jar driver.  This driver is not in
> the tomcat\lib directory.  Please help because I am getting no help from
> the vender.  Thank you.
>
> Kevin Wirth
> Sr. Systems Engineer
> Information Services
> Astoria Bank
> * (516) 327-7762  |   *  kwirth@astoriabank.com<mailto:
> kwirth@astoriabank.com>
>
> Astoria Federal Savings is now Astoria Bank.  We can now be contacted at
> our new email addresses @astoriabank.com.
>
>
> This e-mail and any attachments that accompany it are confidential and may
> be legally privileged. It is intended solely for the use of the
> individual(s) to whom it was intended to be addressed. Access to this
> e-mail by anyone else is unauthorized. If you are not the intended
> recipient, please immediately return the e-mail to the sender and delete
> the original and any copy from your computer. If the reader of this message
> is not the intended recipient, or an employee or agent responsible for
> delivering this message to its intended recipient, you are herewith
> notified that any dissemination, distribution, copying or retention of this
> communication or the information contained herein is strictly prohibited.
>

RE: tomcat severe error when shutting down service but startup is clean

Posted by Cris Berneburg - US <cb...@caci.com>.
>
> -----Original Message-----
> From: David kerber [mailto:dckerber@verizon.net]
> Sent: Thursday, February 12, 2015 9:40 AM
> To: Tomcat Users List
> Subject: Re: tomcat severe error when shutting down service but 
> startup is clean
>
> On 2/12/2015 9:06 AM, Wirth, Kevin wrote:
>> I keep getting these weird tomcat errors on shutdown on a newly built system using tomcat 7.0.57 on  a windows 2012 server with jdk 1.7 that I can't figure out.  This is the catalina log:
>> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
>> clearReferencesJdbc
>> SEVERE: The web application [/identityiq] registered the JDBC driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
>> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
>> clearReferencesThreads
>> SEVERE: The web application [/identityiq] appears to have started a thread named [Thread-3] but has failed to stop it. This is very likely to create a memory leak.
>
DK> I ran into this a while back, and it means exactly what it says:  the db driver is being registered (loaded), but not being unloaded.  I fixed it by putting the db driver unload commands in a contextDestroyed method.

cb> David
cb>
cb> I have the same issue as Kevin.  What "unload commands" code did you call in the contextDestroyed method?  Are those methods "universal"?  The reason I ask is because we use different ODBC drivers for different environments.

DK> I call this code from my .contextDestroyed method (I didn't write it, I copied it from somewhere on the web):

DK> public static void unRegisterDrivers() {
DK>     try {
DK>        for ( Enumeration<Driver> drivers = DriverManager.getDrivers(); 
DK> drivers.hasMoreElements(); ) {
DK>           DriverManager.deregisterDriver( drivers.nextElement() );
DK>        }
DK>     } catch ( Exception e ) {
DK>        /* log the exception */
DK>     }
DK> }

Thanks David!  That solved this error message:

<message>
org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc

SEVERE: The web application [/irma] registered the JDBC driver
[com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to unregister it when the web application
was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
</message>

However, the one below still occurs, which I don't understand.  Is it saying that an instance of an object was created outside of java garbage collection control that is not being released?

<message>
org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks

SEVERE: The web application [/irma] created a ThreadLocal with key of type
[com.microsoft.sqlserver.jdbc.ActivityCorrelator$1] (value [com.microsoft.sqlserver.jdbc.ActivityCorrelator$1@dc160cb])
and a value of type [com.microsoft.sqlserver.jdbc.ActivityId] (value [de6bd261-6408-4336-86e2-375848be61b5-5])
but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
</message>

In the contextDestroyed listener method I added [System.out.println(String.valueOf(driver));] to try to get more info, but I'm not sure it provided anything meaningful:

<log>
sun.jdbc.odbc.JdbcOdbcDriver@49f4bcf7
SQLServerDriver:1
</log>

>
>>
>> The jdbc driver I am using is in the folder identityiq under the webapps directory in tomcat.  It is the sqljdbc4.jar driver.  This driver is not in the tomcat\lib directory.  Please help because I am getting no help from the vender.  Thank you.
>>
>> Kevin Wirth
>> [...]
>>

--
Cris Berneburg, Lead Software Engineer
CACI, IRMA Project, 703-679-5313


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


Re: tomcat severe error when shutting down service but startup is clean

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

David,

On 2/12/15 2:01 PM, David kerber wrote:
> On 2/12/2015 1:46 PM, Wirth, Kevin wrote:
>> 
>> 
>> -----Original Message----- From: David kerber
>> [mailto:dckerber@verizon.net] Sent: Thursday, February 12, 2015
>> 1:00 PM To: Tomcat Users List Subject: Re: tomcat severe error
>> when shutting down service but startup is clean
>> 
>> On 2/12/2015 12:48 PM, Cris Berneburg - US wrote:
>>> 
>>> -----Original Message----- From: David kerber
>>> [mailto:dckerber@verizon.net] Sent: Thursday, February 12, 2015
>>> 9:40 AM To: Tomcat Users List Subject: Re: tomcat severe error
>>> when shutting down service but startup is clean
>>> 
>>> On 2/12/2015 9:06 AM, Wirth, Kevin wrote:
>>>> I keep getting these weird tomcat errors on shutdown on a
>>>> newly built system using tomcat 7.0.57 on  a windows 2012
>>>> server with jdk 1.7 that I can't figure out.  This is the
>>>> catalina log: Feb 12, 2015 8:54:31 AM
>>>> org.apache.catalina.loader.WebappClassLoader 
>>>> clearReferencesJdbc SEVERE: The web application [/identityiq]
>>>> registered the JDBC driver 
>>>> [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to 
>>>> unregister it when the web application was stopped. To
>>>> prevent a memory leak, the JDBC Driver has been forcibly
>>>> unregistered. Feb 12, 2015 8:54:31 AM
>>>> org.apache.catalina.loader.WebappClassLoader 
>>>> clearReferencesThreads SEVERE: The web application
>>>> [/identityiq] appears to have started a thread named
>>>> [Thread-3] but has failed to stop it. This is very likely to
>>>> create a memory leak.
>>> 
>>>>>> I ran into this a while back, and it means exactly what
>>>>>> it says: the db driver is being registered (loaded), but
>>>>>> not being unloaded.  I fixed it by putting the db driver
>>>>>> unload commands in a contextDestroyed method.
>>> 
>>> David
>>> 
>>> I have the same issue as Kevin.  What "unload commands" code
>>> did you call in the contextDestroyed method?  Are those methods
>>> "universal"? The reason I ask is because we use different ODBC
>>> drivers for different environments.
>> 
>> I call this code from my .contextDestroyed method (I didn't write
>> it, I copied it from somewhere on the web):
>> 
>> 
>> public static void unRegisterDrivers() { try { for (
>> Enumeration<Driver> drivers = DriverManager.getDrivers(); 
>> drivers.hasMoreElements(); ) { DriverManager.deregisterDriver(
>> drivers.nextElement() ); } } catch ( Exception e ) { /* log the
>> exception */ } }
>> 
>> Thank you for your response.  Where do I put this code as I am
>> new to tomcat?  The application I am deploying is not written by
>> me so I don't know the code.
> 
> It needs to be called from the .contextDestroyed method of
> whatever class is defined as a listener in your application.  I
> don't know if it can be done without modifying existing classes or
> not.

Yes, you can write a new ServletContextListener and register it along
with any others you may have. There is no need to modify existing code
(but you will have to add new code).

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJU3iVhAAoJEBzwKT+lPKRYOLMP/1gTWvu2ejJ28PJRC8wXo83s
5ScuJ915aIYq3Rbf+UjguXswkw2M9KGu7Uoi1svHYoqBY9iGbGIo/vand8ifkUUU
Vpm2IbIkgZM/Epemu9xSTJu/0pZNSFiYD0zHdItNsBbSm0zDtxR8aUQWp2IwdBnN
nawH7ePTNbtF3WwM8raDEyij3rL+tKwEYOsy3mwEdpPAVwMBANS4XOzjae6TgrCJ
VUMS30y4/aF9VMJZh+HuuCqafJ9ApVBj0Rpjgt4b11GSpeTwHtSWkf5L2IQ8i6DL
1uuS7WTz02aqUgM1E4lGRvRxJcmb9G+EPMLLW+EFcBC8E4pE2YP6oA5+BolWVp1N
vH4GjUwnT2EqYCSxtpzpzZEDpUdh6mJ0JrKtT2VZ4GxSA1BH00rBIK0GPC4WMEvu
H6DE0K2f/iDvrcaAxqNrVzkVABQmoOdwesXLWH75tGTLoGVF7E+3UuKcYAnrizdn
4SihCHQOeMWfuHh1YlYEh2JoSpGx30djwG7xq72BJzUyr4+WpGEEGXtDIAqX3tBU
ZaurvkbF727Ps7KN2Zz0+VSp3o9D0taXjHOq9hpjBh2iJI8L8k/R8MdSl0fqJvsc
zTo5+z+cMUQ2dQguWpuM9NydoSaZTJS6CiIqmKBTGE5i9W1PaHoQKdaTO+w4KqEY
cfnw3Xk28pGQ1pQ4kqSk
=J7AW
-----END PGP SIGNATURE-----

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


Re: tomcat severe error when shutting down service but startup is clean

Posted by David kerber <dc...@verizon.net>.
On 2/12/2015 1:46 PM, Wirth, Kevin wrote:
>
>
> -----Original Message-----
> From: David kerber [mailto:dckerber@verizon.net]
> Sent: Thursday, February 12, 2015 1:00 PM
> To: Tomcat Users List
> Subject: Re: tomcat severe error when shutting down service but startup is clean
>
> On 2/12/2015 12:48 PM, Cris Berneburg - US wrote:
>>
>> -----Original Message-----
>> From: David kerber [mailto:dckerber@verizon.net]
>> Sent: Thursday, February 12, 2015 9:40 AM
>> To: Tomcat Users List
>> Subject: Re: tomcat severe error when shutting down service but
>> startup is clean
>>
>> On 2/12/2015 9:06 AM, Wirth, Kevin wrote:
>>> I keep getting these weird tomcat errors on shutdown on a newly built system using tomcat 7.0.57 on  a windows 2012 server with jdk 1.7 that I can't figure out.  This is the catalina log:
>>> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
>>> clearReferencesJdbc
>>> SEVERE: The web application [/identityiq] registered the JDBC driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
>>> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
>>> clearReferencesThreads
>>> SEVERE: The web application [/identityiq] appears to have started a thread named [Thread-3] but has failed to stop it. This is very likely to create a memory leak.
>>
>>>>> I ran into this a while back, and it means exactly what it says:  the db driver is being registered (loaded), but not being unloaded.  I fixed it by putting the db driver unload commands in a contextDestroyed method.
>>
>> David
>>
>> I have the same issue as Kevin.  What "unload commands" code did you call in the contextDestroyed method?  Are those methods "universal"?  The reason I ask is because we use different ODBC drivers for different environments.
>
> I call this code from my .contextDestroyed method (I didn't write it, I copied it from somewhere on the web):
>
>
> public static void unRegisterDrivers() {
>      try {
>         for ( Enumeration<Driver> drivers = DriverManager.getDrivers();
> drivers.hasMoreElements(); ) {
>            DriverManager.deregisterDriver( drivers.nextElement() );
>         }
>      } catch ( Exception e ) {
>         /* log the exception */
>      }
> }
>
> Thank you for your response.  Where do I put this code as I am new to tomcat?  The application I am deploying is not written by me so I don't know the code.

It needs to be called from the .contextDestroyed method of whatever 
class is defined as a listener in your application.  I don't know if it 
can be done without modifying existing classes or not.



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


RE: tomcat severe error when shutting down service but startup is clean

Posted by "Wirth, Kevin" <KW...@astoriabank.com>.

-----Original Message-----
From: David kerber [mailto:dckerber@verizon.net] 
Sent: Thursday, February 12, 2015 1:00 PM
To: Tomcat Users List
Subject: Re: tomcat severe error when shutting down service but startup is clean

On 2/12/2015 12:48 PM, Cris Berneburg - US wrote:
>
> -----Original Message-----
> From: David kerber [mailto:dckerber@verizon.net]
> Sent: Thursday, February 12, 2015 9:40 AM
> To: Tomcat Users List
> Subject: Re: tomcat severe error when shutting down service but 
> startup is clean
>
> On 2/12/2015 9:06 AM, Wirth, Kevin wrote:
>> I keep getting these weird tomcat errors on shutdown on a newly built system using tomcat 7.0.57 on  a windows 2012 server with jdk 1.7 that I can't figure out.  This is the catalina log:
>> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
>> clearReferencesJdbc
>> SEVERE: The web application [/identityiq] registered the JDBC driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
>> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
>> clearReferencesThreads
>> SEVERE: The web application [/identityiq] appears to have started a thread named [Thread-3] but has failed to stop it. This is very likely to create a memory leak.
>
>>>> I ran into this a while back, and it means exactly what it says:  the db driver is being registered (loaded), but not being unloaded.  I fixed it by putting the db driver unload commands in a contextDestroyed method.
>
> David
>
> I have the same issue as Kevin.  What "unload commands" code did you call in the contextDestroyed method?  Are those methods "universal"?  The reason I ask is because we use different ODBC drivers for different environments.

I call this code from my .contextDestroyed method (I didn't write it, I copied it from somewhere on the web):


public static void unRegisterDrivers() {
    try {
       for ( Enumeration<Driver> drivers = DriverManager.getDrivers(); 
drivers.hasMoreElements(); ) {
          DriverManager.deregisterDriver( drivers.nextElement() );
       }
    } catch ( Exception e ) {
       /* log the exception */
    }
}

Thank you for your response.  Where do I put this code as I am new to tomcat?  The application I am deploying is not written by me so I don't know the code.


>
>>
>> The jdbc driver I am using is in the folder identityiq under the webapps directory in tomcat.  It is the sqljdbc4.jar driver.  This driver is not in the tomcat\lib directory.  Please help because I am getting no help from the vender.  Thank you.
>>
>> Kevin Wirth
>> [...]
>>
>
>
> --
> Cris Berneburg, Lead Software Engineer
> CACI, IRMA Project, 703-679-5313
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


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

Astoria Federal Savings is now Astoria Bank.  We can now be contacted at our new email addresses @astoriabank.com.


This e-mail and any attachments that accompany it are confidential and may be legally privileged. It is intended solely for the use of the individual(s) to whom it was intended to be addressed. Access to this e-mail by anyone else is unauthorized. If you are not the intended recipient, please immediately return the e-mail to the sender and delete the original and any copy from your computer. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to its intended recipient, you are herewith notified that any dissemination, distribution, copying or retention of this communication or the information contained herein is strictly prohibited.


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


Re: tomcat severe error when shutting down service but startup is clean

Posted by "Terence M. Bandoian" <te...@tmbsw.com>.
On 2/13/2015 11:21 AM, David kerber wrote:
> On 2/13/2015 11:54 AM, Christopher Schultz wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA256
>>
>> David,
>
> ...
>
>>>>> public static void unRegisterDrivers() { try { for (
>>>>> Enumeration<Driver> drivers = DriverManager.getDrivers();
>>>>> drivers.hasMoreElements(); ) { DriverManager.deregisterDriver(
>>>>> drivers.nextElement() ); } } catch ( Exception e ) { /* log
>>>>> the exception */ } }
>>>>
>>>> This is likely to over-reach in many scenarios. YMMV.
>>>>
>>>> Also, Tomcat already de-registers drivers for you. So, this
>>>> probably isn't really changing anything.
>>>
>>> We manage the pooling in our application, and don't use any of
>>> TC's connection pooling.  This is largely because several years ago
>>> (long enough ago that the then-current version of TC was 5.5.25)
>>> the app was moved from another servlet container that either didn't
>>> have pooling, or it was harder to use than it was to write out own.
>>> I wasn't in on the initial development, but did the port to TC.
>>> And at the time I did the port, I had no idea about TC's connection
>>> pooling, so continued with our own pooling implementation.
>>>
>>> Until I did this, I could not get rid of the memory leak warnings.
>>> If there is another way, I couldn't find it at the time I was
>>> messing with it...
>>
>> I'm not sure at what point Tomcat started de-registering drivers. When
>> it de-registers a driver, it gives you a warning. By you doing it
>> yourself, you are avoiding the warning, of course.
>>
>> But if you de-register all drivers, you are also de-registering any
>> drivers that were registered by different web applications, Tomcat's
>> connection-pool, etc. It would be better to only de-register the
>> driver(s) you actually registered in the first place.
>>
>> I haven't researched such things, but a reasonable way might be to do
>> something like this:
>>
>> ClassLoader cl = Thread.currentThread().getContextClassLoader();
>> for(Driver driver : DriverManager.getDrivers())
>>    if(cl.equals(driver.getClass().getClassLoader()))
>>      DriverManager.deregisterDriver(driver);
>>
>> This way, you only remove drivers you load yourself. Alternatively,
>> you probably already know which drivers you have explicitly loaded, so
>> you could explicitly unload them instead of flushing the whole
>> DriverManager.
>>
>> Note: I have no idea if Driver objects get the proper ClassLoader
>> assigned, but it's worth a try to get a bit more safety.
>>
>> If your web application is the only one loaded, feel free to wipe-out
>> the DriverManager like that. But, if you need to operate in a shared
>> environment, your technique above might negatively impact other code
>> that relies on its driver not being forcibly un-loaded out from under 
>> it.
>
> Thanks for the suggestions, Chris!  The way we operate our environment 
> currently there's no danger of killing another app, but I'll look into 
> your suggestion for future reference.  I'm always open to suggestions 
> on ways to improve my coding.


Something similar to the following worked for me:

public class DbDriver
{
     private static Driver jdbcDriver = null;

     protected static void loadDriver()
         throws ClassNotFoundException, SQLException
     {
         if ( jdbcDriver == null )
         {
             synchronized ( DbDriver.class )
             {
                 if ( jdbcDriver == null )
                 {
                     Class.forName( "com.mysql.jdbc.Driver" );

                     jdbcDriver = DriverManager.getDriver(
                         "jdbc:mysql://127.0.0.1/" );
                 }
             }
         }
     }

     protected static synchronized void deregisterDriver()
         throws SQLException
     {
         if ( jdbcDriver != null )
         {
             DriverManager.deregisterDriver( jdbcDriver );

             jdbcDriver = null;
         }
     }
}

-Terence Bandoian



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


Re: tomcat severe error when shutting down service but startup is clean

Posted by David kerber <dc...@verizon.net>.
On 2/13/2015 11:54 AM, Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> David,

...

>>>> public static void unRegisterDrivers() { try { for (
>>>> Enumeration<Driver> drivers = DriverManager.getDrivers();
>>>> drivers.hasMoreElements(); ) { DriverManager.deregisterDriver(
>>>> drivers.nextElement() ); } } catch ( Exception e ) { /* log
>>>> the exception */ } }
>>>
>>> This is likely to over-reach in many scenarios. YMMV.
>>>
>>> Also, Tomcat already de-registers drivers for you. So, this
>>> probably isn't really changing anything.
>>
>> We manage the pooling in our application, and don't use any of
>> TC's connection pooling.  This is largely because several years ago
>> (long enough ago that the then-current version of TC was 5.5.25)
>> the app was moved from another servlet container that either didn't
>> have pooling, or it was harder to use than it was to write out own.
>> I wasn't in on the initial development, but did the port to TC.
>> And at the time I did the port, I had no idea about TC's connection
>> pooling, so continued with our own pooling implementation.
>>
>> Until I did this, I could not get rid of the memory leak warnings.
>> If there is another way, I couldn't find it at the time I was
>> messing with it...
>
> I'm not sure at what point Tomcat started de-registering drivers. When
> it de-registers a driver, it gives you a warning. By you doing it
> yourself, you are avoiding the warning, of course.
>
> But if you de-register all drivers, you are also de-registering any
> drivers that were registered by different web applications, Tomcat's
> connection-pool, etc. It would be better to only de-register the
> driver(s) you actually registered in the first place.
>
> I haven't researched such things, but a reasonable way might be to do
> something like this:
>
> ClassLoader cl = Thread.currentThread().getContextClassLoader();
> for(Driver driver : DriverManager.getDrivers())
>    if(cl.equals(driver.getClass().getClassLoader()))
>      DriverManager.deregisterDriver(driver);
>
> This way, you only remove drivers you load yourself. Alternatively,
> you probably already know which drivers you have explicitly loaded, so
> you could explicitly unload them instead of flushing the whole
> DriverManager.
>
> Note: I have no idea if Driver objects get the proper ClassLoader
> assigned, but it's worth a try to get a bit more safety.
>
> If your web application is the only one loaded, feel free to wipe-out
> the DriverManager like that. But, if you need to operate in a shared
> environment, your technique above might negatively impact other code
> that relies on its driver not being forcibly un-loaded out from under it.

Thanks for the suggestions, Chris!  The way we operate our environment 
currently there's no danger of killing another app, but I'll look into 
your suggestion for future reference.  I'm always open to suggestions on 
ways to improve my coding.



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


Re: tomcat severe error when shutting down service but startup is clean

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

David,

On 2/13/15 11:33 AM, David kerber wrote:
> On 2/13/2015 11:23 AM, Christopher Schultz wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
>> 
>> David,
>> 
>> On 2/12/15 12:59 PM, David kerber wrote:
>>> On 2/12/2015 12:48 PM, Cris Berneburg - US wrote:
>>>> 
>>>> -----Original Message----- From: David kerber 
>>>> [mailto:dckerber@verizon.net] Sent: Thursday, February 12,
>>>> 2015 9:40 AM To: Tomcat Users List Subject: Re: tomcat severe
>>>> error when shutting down service but startup is clean
>>>> 
>>>> On 2/12/2015 9:06 AM, Wirth, Kevin wrote:
>>>>> I keep getting these weird tomcat errors on shutdown on a
>>>>> newly built system using tomcat 7.0.57 on  a windows 2012
>>>>> server with jdk 1.7 that I can't figure out.  This is the
>>>>> catalina log: Feb 12, 2015 8:54:31 AM 
>>>>> org.apache.catalina.loader.WebappClassLoader 
>>>>> clearReferencesJdbc SEVERE: The web application
>>>>> [/identityiq] registered the JDBC driver 
>>>>> [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed
>>>>> to unregister it when the web application was stopped. To
>>>>> prevent a memory leak, the JDBC Driver has been forcibly
>>>>> unregistered. Feb 12, 2015 8:54:31 AM 
>>>>> org.apache.catalina.loader.WebappClassLoader 
>>>>> clearReferencesThreads SEVERE: The web application 
>>>>> [/identityiq] appears to have started a thread named
>>>>> [Thread-3] but has failed to stop it. This is very likely
>>>>> to create a memory leak.
>>>> 
>>>>>>> I ran into this a while back, and it means exactly what
>>>>>>> it says: the db driver is being registered (loaded),
>>>>>>> but not being unloaded.  I fixed it by putting the db
>>>>>>> driver unload commands in a contextDestroyed method.
>>>> 
>>>> David
>>>> 
>>>> I have the same issue as Kevin.  What "unload commands" code
>>>> did you call in the contextDestroyed method?  Are those
>>>> methods "universal"? The reason I ask is because we use
>>>> different ODBC drivers for different environments.
>>> 
>>> I call this code from my .contextDestroyed method (I didn't
>>> write it, I copied it from somewhere on the web):
>>> 
>>> 
>>> public static void unRegisterDrivers() { try { for ( 
>>> Enumeration<Driver> drivers = DriverManager.getDrivers(); 
>>> drivers.hasMoreElements(); ) { DriverManager.deregisterDriver( 
>>> drivers.nextElement() ); } } catch ( Exception e ) { /* log
>>> the exception */ } }
>> 
>> This is likely to over-reach in many scenarios. YMMV.
>> 
>> Also, Tomcat already de-registers drivers for you. So, this
>> probably isn't really changing anything.
> 
> We manage the pooling in our application, and don't use any of
> TC's connection pooling.  This is largely because several years ago
> (long enough ago that the then-current version of TC was 5.5.25)
> the app was moved from another servlet container that either didn't
> have pooling, or it was harder to use than it was to write out own.
> I wasn't in on the initial development, but did the port to TC.
> And at the time I did the port, I had no idea about TC's connection
> pooling, so continued with our own pooling implementation.
> 
> Until I did this, I could not get rid of the memory leak warnings.
> If there is another way, I couldn't find it at the time I was
> messing with it...

I'm not sure at what point Tomcat started de-registering drivers. When
it de-registers a driver, it gives you a warning. By you doing it
yourself, you are avoiding the warning, of course.

But if you de-register all drivers, you are also de-registering any
drivers that were registered by different web applications, Tomcat's
connection-pool, etc. It would be better to only de-register the
driver(s) you actually registered in the first place.

I haven't researched such things, but a reasonable way might be to do
something like this:

ClassLoader cl = Thread.currentThread().getContextClassLoader();
for(Driver driver : DriverManager.getDrivers())
  if(cl.equals(driver.getClass().getClassLoader()))
    DriverManager.deregisterDriver(driver);

This way, you only remove drivers you load yourself. Alternatively,
you probably already know which drivers you have explicitly loaded, so
you could explicitly unload them instead of flushing the whole
DriverManager.

Note: I have no idea if Driver objects get the proper ClassLoader
assigned, but it's worth a try to get a bit more safety.

If your web application is the only one loaded, feel free to wipe-out
the DriverManager like that. But, if you need to operate in a shared
environment, your technique above might negatively impact other code
that relies on its driver not being forcibly un-loaded out from under it.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJU3iw8AAoJEBzwKT+lPKRYu44QAJs8etPXC8CiQxlkPLnBY5lp
A13W+Ibk2X7TX/y3oIIry7juiFWMWBrVKaxFuVEcBgI4P3lfQ5rZAbba44of9r2N
RhXdwIepEgATD3E+LaRTAPuHOv5vZ2hhsj8GhlVp4caa2VCpY/iKL4Ax2w5vttrX
38Cp80eIXaLOl1M802bnoOI3s4NUaCo7+zWOAPXzZ1f1jyQx/H9Vbau90CcmQeIm
t17BOYa3C88FDc2QGfrbucYNqRKYLlUQcGhP+tjtyBv7qcWvBMprUz7dvFhtNTHQ
pEGWctPnJlza3e5quyQrFtLnLcAWlzKwvCxrCFhMDB6FeEpj21fFZYvrNKRHau+T
Yr3ZQ03+PepqyT+graWSSd5ejCRNrmXeTgw/9r+KCimbBp40DbDqWFzWh7OH6OAN
I++n5EOmH+XkXgFfgF63NlnSFyf60mLFNZs0X9hBEw9WbIj7FXuuKoJhsNoSlCQ+
U0n5YavLrc7jwxg00R1Lp51O5tVzdwItdK0wNUiR2iHu3/WjCjOKUJIC5FqITXKb
8Bd6S8ar+7mMC6riwp6zcjB4SMQnG5QKjGUsru7zoUmkStDwCFZ+xKkPeqgECIpf
7CasrGiBbX8JsdvZy+T03TiAwQC9xlag0JTfnApkZaJHvQjVuUEMBb3VCmqYK1Qm
zLZcwp+Nogs998uL/2eR
=4zOL
-----END PGP SIGNATURE-----

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


Re: tomcat severe error when shutting down service but startup is clean

Posted by David kerber <dc...@verizon.net>.
On 2/13/2015 11:23 AM, Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> David,
>
> On 2/12/15 12:59 PM, David kerber wrote:
>> On 2/12/2015 12:48 PM, Cris Berneburg - US wrote:
>>>
>>> -----Original Message----- From: David kerber
>>> [mailto:dckerber@verizon.net] Sent: Thursday, February 12, 2015
>>> 9:40 AM To: Tomcat Users List Subject: Re: tomcat severe error
>>> when shutting down service but startup is clean
>>>
>>> On 2/12/2015 9:06 AM, Wirth, Kevin wrote:
>>>> I keep getting these weird tomcat errors on shutdown on a newly
>>>> built system using tomcat 7.0.57 on  a windows 2012 server with
>>>> jdk 1.7 that I can't figure out.  This is the catalina log: Feb
>>>> 12, 2015 8:54:31 AM
>>>> org.apache.catalina.loader.WebappClassLoader
>>>> clearReferencesJdbc SEVERE: The web application [/identityiq]
>>>> registered the JDBC driver
>>>> [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to
>>>> unregister it when the web application was stopped. To prevent
>>>> a memory leak, the JDBC Driver has been forcibly unregistered.
>>>> Feb 12, 2015 8:54:31 AM
>>>> org.apache.catalina.loader.WebappClassLoader
>>>> clearReferencesThreads SEVERE: The web application
>>>> [/identityiq] appears to have started a thread named [Thread-3]
>>>> but has failed to stop it. This is very likely to create a
>>>> memory leak.
>>>
>>>>>> I ran into this a while back, and it means exactly what it
>>>>>> says: the db driver is being registered (loaded), but not
>>>>>> being unloaded.  I fixed it by putting the db driver unload
>>>>>> commands in a contextDestroyed method.
>>>
>>> David
>>>
>>> I have the same issue as Kevin.  What "unload commands" code did
>>> you call in the contextDestroyed method?  Are those methods
>>> "universal"? The reason I ask is because we use different ODBC
>>> drivers for different environments.
>>
>> I call this code from my .contextDestroyed method (I didn't write
>> it, I copied it from somewhere on the web):
>>
>>
>> public static void unRegisterDrivers() { try { for (
>> Enumeration<Driver> drivers = DriverManager.getDrivers();
>> drivers.hasMoreElements(); ) { DriverManager.deregisterDriver(
>> drivers.nextElement() ); } } catch ( Exception e ) { /* log the
>> exception */ } }
>
> This is likely to over-reach in many scenarios. YMMV.
>
> Also, Tomcat already de-registers drivers for you. So, this probably
> isn't really changing anything.

We manage the pooling in our application, and don't use any of TC's 
connection pooling.  This is largely because several years ago (long 
enough ago that the then-current version of TC was 5.5.25) the app was 
moved from another servlet container that either didn't have pooling, or 
it was harder to use than it was to write out own.  I wasn't in on the 
initial development, but did the port to TC.  And at the time I did the 
port, I had no idea about TC's connection pooling, so continued with our 
own pooling implementation.

Until I did this, I could not get rid of the memory leak warnings.  If 
there is another way, I couldn't find it at the time I was messing with 
it...


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


Re: tomcat severe error when shutting down service but startup is clean

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

David,

On 2/12/15 12:59 PM, David kerber wrote:
> On 2/12/2015 12:48 PM, Cris Berneburg - US wrote:
>> 
>> -----Original Message----- From: David kerber
>> [mailto:dckerber@verizon.net] Sent: Thursday, February 12, 2015
>> 9:40 AM To: Tomcat Users List Subject: Re: tomcat severe error
>> when shutting down service but startup is clean
>> 
>> On 2/12/2015 9:06 AM, Wirth, Kevin wrote:
>>> I keep getting these weird tomcat errors on shutdown on a newly
>>> built system using tomcat 7.0.57 on  a windows 2012 server with
>>> jdk 1.7 that I can't figure out.  This is the catalina log: Feb
>>> 12, 2015 8:54:31 AM
>>> org.apache.catalina.loader.WebappClassLoader 
>>> clearReferencesJdbc SEVERE: The web application [/identityiq]
>>> registered the JDBC driver 
>>> [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to 
>>> unregister it when the web application was stopped. To prevent
>>> a memory leak, the JDBC Driver has been forcibly unregistered. 
>>> Feb 12, 2015 8:54:31 AM
>>> org.apache.catalina.loader.WebappClassLoader 
>>> clearReferencesThreads SEVERE: The web application
>>> [/identityiq] appears to have started a thread named [Thread-3]
>>> but has failed to stop it. This is very likely to create a
>>> memory leak.
>> 
>>>>> I ran into this a while back, and it means exactly what it
>>>>> says: the db driver is being registered (loaded), but not
>>>>> being unloaded.  I fixed it by putting the db driver unload
>>>>> commands in a contextDestroyed method.
>> 
>> David
>> 
>> I have the same issue as Kevin.  What "unload commands" code did
>> you call in the contextDestroyed method?  Are those methods
>> "universal"? The reason I ask is because we use different ODBC
>> drivers for different environments.
> 
> I call this code from my .contextDestroyed method (I didn't write
> it, I copied it from somewhere on the web):
> 
> 
> public static void unRegisterDrivers() { try { for (
> Enumeration<Driver> drivers = DriverManager.getDrivers(); 
> drivers.hasMoreElements(); ) { DriverManager.deregisterDriver(
> drivers.nextElement() ); } } catch ( Exception e ) { /* log the
> exception */ } }

This is likely to over-reach in many scenarios. YMMV.

Also, Tomcat already de-registers drivers for you. So, this probably
isn't really changing anything.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJU3iUdAAoJEBzwKT+lPKRYjEAQAI2iNwQnzT4Rqv6qHswFPLE2
9S/Sb8JgM5ugN+FOkFu8jNllqvZA0wsqYY35a7JpKjKg8cVQcE9LF+gQrH4QJkhA
zdMK07pc756Q5XdxuMqIVwPy0TmQMKXDD2I/hAuWj1MTcyX57zaValTvdp29fOXm
NPiZe0LSd0unttawwFe5kbpF50pYlDWWVoBqyzRw9pCiAwC2z7mqG5Ytt9OXv4gR
p/l1Gu7sKdH6IDg7gcFCYh7qG9MzUz3kYc/5OSP+5nHTpRkJ7+d1/TKyYxF7EDmp
0stc0Q02O0/QoK9XZ5lfrgw1Bv7KXoiUaE5hbhtUj/3qV1PHjgGVaDOiCGXXSEiH
tp2gM3ex4Iz5qJcX0Jjr8WNuVSJb39Tvn1gtpuzui+EU95gnmfp2WFRBYw2V7SUM
SdyhPp/wvhd2hYYc9THOudFHkzzTBrdX8RqC/zHPWQPpctXSnntKxaczJWFl9Tcl
50AoSwxlLAEZ9S+phlyJuzlHU6mWOfz0LEJJinwBV/1a2pDAngFhuI/g0DQkyGi6
bz2oGfnev8/+NAiCFse7EzWvtc9U5F6RuXdxU0l66szw9Qu8htXMxQj4AfRnotPi
OFZunL0hSxTL5huR8LPfItjagfqqm3Ik/t7c8QdG2S2v4gw5CXgmWNWDr7abhvPj
o2ImiINb+5OBKDou78Nh
=IKCS
-----END PGP SIGNATURE-----

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


Re: tomcat severe error when shutting down service but startup is clean

Posted by David kerber <dc...@verizon.net>.
On 2/12/2015 12:48 PM, Cris Berneburg - US wrote:
>
> -----Original Message-----
> From: David kerber [mailto:dckerber@verizon.net]
> Sent: Thursday, February 12, 2015 9:40 AM
> To: Tomcat Users List
> Subject: Re: tomcat severe error when shutting down service but startup is clean
>
> On 2/12/2015 9:06 AM, Wirth, Kevin wrote:
>> I keep getting these weird tomcat errors on shutdown on a newly built system using tomcat 7.0.57 on  a windows 2012 server with jdk 1.7 that I can't figure out.  This is the catalina log:
>> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
>> clearReferencesJdbc
>> SEVERE: The web application [/identityiq] registered the JDBC driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
>> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader
>> clearReferencesThreads
>> SEVERE: The web application [/identityiq] appears to have started a thread named [Thread-3] but has failed to stop it. This is very likely to create a memory leak.
>
>>>> I ran into this a while back, and it means exactly what it says:  the db driver is being registered (loaded), but not being unloaded.  I fixed it by putting the db driver unload commands in a contextDestroyed method.
>
> David
>
> I have the same issue as Kevin.  What "unload commands" code did you call in the contextDestroyed method?  Are those methods "universal"?  The reason I ask is because we use different ODBC drivers for different environments.

I call this code from my .contextDestroyed method (I didn't write it, I 
copied it from somewhere on the web):


public static void unRegisterDrivers() {
    try {
       for ( Enumeration<Driver> drivers = DriverManager.getDrivers(); 
drivers.hasMoreElements(); ) {
          DriverManager.deregisterDriver( drivers.nextElement() );
       }
    } catch ( Exception e ) {
       /* log the exception */
    }
}



>
>>
>> The jdbc driver I am using is in the folder identityiq under the webapps directory in tomcat.  It is the sqljdbc4.jar driver.  This driver is not in the tomcat\lib directory.  Please help because I am getting no help from the vender.  Thank you.
>>
>> Kevin Wirth
>> [...]
>>
>
>
> --
> Cris Berneburg, Lead Software Engineer
> CACI, IRMA Project, 703-679-5313
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


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


RE: tomcat severe error when shutting down service but startup is clean

Posted by Cris Berneburg - US <cb...@caci.com>.
-----Original Message-----
From: David kerber [mailto:dckerber@verizon.net] 
Sent: Thursday, February 12, 2015 9:40 AM
To: Tomcat Users List
Subject: Re: tomcat severe error when shutting down service but startup is clean

On 2/12/2015 9:06 AM, Wirth, Kevin wrote:
> I keep getting these weird tomcat errors on shutdown on a newly built system using tomcat 7.0.57 on  a windows 2012 server with jdk 1.7 that I can't figure out.  This is the catalina log:
> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader 
> clearReferencesJdbc
> SEVERE: The web application [/identityiq] registered the JDBC driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader 
> clearReferencesThreads
> SEVERE: The web application [/identityiq] appears to have started a thread named [Thread-3] but has failed to stop it. This is very likely to create a memory leak.

>>> I ran into this a while back, and it means exactly what it says:  the db driver is being registered (loaded), but not being unloaded.  I fixed it by putting the db driver unload commands in a contextDestroyed method.

David

I have the same issue as Kevin.  What "unload commands" code did you call in the contextDestroyed method?  Are those methods "universal"?  The reason I ask is because we use different ODBC drivers for different environments.

>
> The jdbc driver I am using is in the folder identityiq under the webapps directory in tomcat.  It is the sqljdbc4.jar driver.  This driver is not in the tomcat\lib directory.  Please help because I am getting no help from the vender.  Thank you.
>
> Kevin Wirth
> [...]
>


--
Cris Berneburg, Lead Software Engineer
CACI, IRMA Project, 703-679-5313


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


RE: tomcat severe error when shutting down service but startup is clean

Posted by "Wirth, Kevin" <KW...@astoriabank.com>.
Thank you for the response, it don't mind sharing, how did you do this because I am not all that familiar with tomcat?

-----Original Message-----
From: David kerber [mailto:dckerber@verizon.net] 
Sent: Thursday, February 12, 2015 9:40 AM
To: Tomcat Users List
Subject: Re: tomcat severe error when shutting down service but startup is clean

On 2/12/2015 9:06 AM, Wirth, Kevin wrote:
> I keep getting these weird tomcat errors on shutdown on a newly built system using tomcat 7.0.57 on  a windows 2012 server with jdk 1.7 that I can't figure out.  This is the catalina log:
> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader 
> clearReferencesJdbc
> SEVERE: The web application [/identityiq] registered the JDBC driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader 
> clearReferencesThreads
> SEVERE: The web application [/identityiq] appears to have started a thread named [Thread-3] but has failed to stop it. This is very likely to create a memory leak.

I ran into this a while back, and it means exactly what it says:  the db driver is being registered (loaded), but not being unloaded.  I fixed it by putting the db driver unload commands in a contextDestroyed method.


>
> The jdbc driver I am using is in the folder identityiq under the webapps directory in tomcat.  It is the sqljdbc4.jar driver.  This driver is not in the tomcat\lib directory.  Please help because I am getting no help from the vender.  Thank you.
>
> Kevin Wirth
> Sr. Systems Engineer
> Information Services
> Astoria Bank
> * (516) 327-7762  |   *  kwirth@astoriabank.com<ma...@astoriabank.com>
>
> Astoria Federal Savings is now Astoria Bank.  We can now be contacted at our new email addresses @astoriabank.com.
>
>
> This e-mail and any attachments that accompany it are confidential and may be legally privileged. It is intended solely for the use of the individual(s) to whom it was intended to be addressed. Access to this e-mail by anyone else is unauthorized. If you are not the intended recipient, please immediately return the e-mail to the sender and delete the original and any copy from your computer. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to its intended recipient, you are herewith notified that any dissemination, distribution, copying or retention of this communication or the information contained herein is strictly prohibited.
>


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

Astoria Federal Savings is now Astoria Bank.  We can now be contacted at our new email addresses @astoriabank.com.


This e-mail and any attachments that accompany it are confidential and may be legally privileged. It is intended solely for the use of the individual(s) to whom it was intended to be addressed. Access to this e-mail by anyone else is unauthorized. If you are not the intended recipient, please immediately return the e-mail to the sender and delete the original and any copy from your computer. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to its intended recipient, you are herewith notified that any dissemination, distribution, copying or retention of this communication or the information contained herein is strictly prohibited.


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


Re: tomcat severe error when shutting down service but startup is clean

Posted by David kerber <dc...@verizon.net>.
On 2/12/2015 9:06 AM, Wirth, Kevin wrote:
> I keep getting these weird tomcat errors on shutdown on a newly built system using tomcat 7.0.57 on  a windows 2012 server with jdk 1.7 that I can't figure out.  This is the catalina log:
> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
> SEVERE: The web application [/identityiq] registered the JDBC driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
> Feb 12, 2015 8:54:31 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
> SEVERE: The web application [/identityiq] appears to have started a thread named [Thread-3] but has failed to stop it. This is very likely to create a memory leak.

I ran into this a while back, and it means exactly what it says:  the db 
driver is being registered (loaded), but not being unloaded.  I fixed it 
by putting the db driver unload commands in a contextDestroyed method.


>
> The jdbc driver I am using is in the folder identityiq under the webapps directory in tomcat.  It is the sqljdbc4.jar driver.  This driver is not in the tomcat\lib directory.  Please help because I am getting no help from the vender.  Thank you.
>
> Kevin Wirth
> Sr. Systems Engineer
> Information Services
> Astoria Bank
> * (516) 327-7762  |   *  kwirth@astoriabank.com<ma...@astoriabank.com>
>
> Astoria Federal Savings is now Astoria Bank.  We can now be contacted at our new email addresses @astoriabank.com.
>
>
> This e-mail and any attachments that accompany it are confidential and may be legally privileged. It is intended solely for the use of the individual(s) to whom it was intended to be addressed. Access to this e-mail by anyone else is unauthorized. If you are not the intended recipient, please immediately return the e-mail to the sender and delete the original and any copy from your computer. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to its intended recipient, you are herewith notified that any dissemination, distribution, copying or retention of this communication or the information contained herein is strictly prohibited.
>


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