Jenny,

On 6/3/24 12:35, Ying Jin wrote:
Chris,

Thanks for your suggestion!

Another question I would like to confirm with you is if we have to remove
the ojdbc jar file from our web application’s web-inf/lib folder or not.

The reason of our concern is that we need to use the same code base to
create a jar file and deploy it to stone branch which needs to have the
ojdbc jar file included in the application.

Therefore, we prefer to include the ojdbc jar file in the application to
avoid confusion, however, we’re not sure if this will cause any issues for
the web application’s deployment or not on tomcat server.

Using WEB-INF/lib for your JDBC driver should work, but your JDBC driver map have a bug which causes leaks. If you cannot get the driver to de-register properly, you have two choices:

1. Ignore the warning messages and eventually run out or memory

2. Move (not copy) your driver to CATALINA_BASE/lib

Hope that helps,
-chris

On Sun, Jun 2, 2024 at 1:57 AM Christopher Schultz <
ch...@christopherschultz.net> wrote:

Jenny,

(Apologies for top-posting)

“Safely ignored” can mean many things. You are only in danger of running
out of heap space. So if you aren’t worried about that, feel free to ignore
the error message.

If it were my system, I would want to ensure a clean unload of the driver
when the application shuts down.

But I don’t think it will harm anything besides your memory usage.

-chris

On Jun 1, 2024, at 00:18, Ying Jin <jiny4...@gmail.com> wrote:

Chris,

Thanks for your reply!

We already removed the ojdbc8.jar file from the application's Web-inf/lib
folder as suggested in the following post, however, we still got the
warning messages below after the application is deployed to the Tomcat 9
server.


https://stackoverflow.com/questions/6981564/why-must-the-jdbc-driver-be-put-in-tomcat-home-lib-folder

WARNING: The web application [Our Web Application Name] appears to have
started a thread named [InterruptTimer] but has failed to stop it. This
is
very likely to create a memory leak. Stack trace of thread:

WARNING: The web application [Our Web Application Name] appears to have
started a thread named [oracle.jdbc.diagnostics.Diagnostic.CLOCK] but has
failed to stop it. This is very likely to create a memory leak. Stack
trace
of thread:

I also read some posts saying these warning messages can be safely
ignored
if the Tomcat version is greater than 7.0. I'm not sure if this is
correct
or not.

Please advise,

Many thanks!
Jenny

On Fri, May 31, 2024 at 3:50 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

Jenny,

On 5/31/24 14:52, Ying Jin wrote:
We removed the ojdbc8 driver jar from web-inf/lib from the web
application and kept the ojdbc8 jar file in the Tomcat/lib folder, but
we still can see the following memory link warning message whenever we
redeploy the web application. We use the Tomcat 9 server in the Linux
environment.

This list strips attachments. Can you re-post with text-only?

The other warning message is about the "validateFile Problem with jar
file /tomcat/lib/jolokia.jar. My question is if we can safely ignore
these warning messages or not.

It would be great if you can shed some light on this issue.

If the message is something like "driver cannot be unloaded" then check
Tomcat with a debugger or even something like JVisualVM to see how many
WebappClassLoaders you have in memory.

If the driver causes the web application ClassLoader to be "pinned" in
memory, then it will never be removed and all those classes will
continue to use-up heap space until you restart the JVM. This gets worse
every time you reload your application without restarting the JVM. The
Manager application web UI can help you diagnose these a little.

The validation problem with the Jolokia JAR file will depend upon
exactly what it says. I would first get a replacement copy of the
Jolokia JAR file before bothering to try to diagnose it any further.

-chris

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



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




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

Reply via email to