This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of Zero to AI - A non-technical, hype-free guide to prospering in the AI era and have Nicolò Valigi and Gianluca Mauro on-line!
See this thread for details.
Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era this week in the Artificial Intelligence and Machine Learning forum!

Thomas Griffith

Greenhorn
+ Follow
since Sep 30, 2020
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
2
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Thomas Griffith

This occurs when I shut down the Tomcat Windows service...

20-Oct-2020 09:50:12.032 INFO [Thread-5] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
20-Oct-2020 09:50:12.126 INFO [Thread-5] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.catalina.loader.WebappClassLoaderBase (file:/C:/apache-tomcat-99/lib/catalina.jar) to field java.lang.Thread.threadLocals
WARNING: Please consider reporting this to the maintainers of org.apache.catalina.loader.WebappClassLoaderBase
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
20-Oct-2020 09:50:12.157 SEVERE [Thread-5] org.apache.catalina.core.StandardWrapper.unload InstanceManager.destroy() for servlet [QueryEngineServlet] threw exception
java.lang.NullPointerException
               at org.apache.catalina.core.DefaultInstanceManager.destroyInstance(DefaultInstanceManager.java:197)
               at org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1349)
               at org.apache.catalina.core.StandardWrapper.stopInternal(StandardWrapper.java:1632)
               at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
               at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5315)
               at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
               at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1441)
               at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1430)
               at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
               at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
               at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
               at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:997)
               at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
               at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1441)
               at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1430)
               at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
               at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
               at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
               at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:997)
               at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
               at org.apache.catalina.core.StandardService.stopInternal(StandardService.java:471)
               at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
               at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:791)
               at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
               at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:482)
               at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
               at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
               at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
               at java.base/java.lang.reflect.Method.invoke(Method.java:566)
               at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:406)
               at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)


NOTE ~ Below also follows in the log during shutdown...looks to be thrown primarily during sleep...this warning of an open thread (same number, Thread-5) appears to be related to the destroy() NullPointerException trace above...

20-Oct-2020 09:50:12.173 WARNING [Thread-5] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [EPS3] appears to have started a thread named [Thread-4] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.base@11.0.8/java.lang.Thread.sleep(Native Method)
org.apache.commons.pool.impl.GenericObjectPool$Evictor.run(GenericObjectPool.java:1122)
java.base@11.0.8/java.lang.Thread.run(Thread.java:834)
20-Oct-2020 09:50:12.173 WARNING [Thread-5] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [EPS3] appears to have started a thread named [Error reading Messages File.] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.base@11.0.8/java.net.SocketInputStream.socketRead0(Native Method)
java.base@11.0.8/java.net.SocketInputStream.socketRead(SocketInputStream.java:115)
java.base@11.0.8/java.net.SocketInputStream.read(SocketInputStream.java:168)
java.base@11.0.8/java.net.SocketInputStream.read(SocketInputStream.java:140)
lotus.priv.CORBA.iiop.Message.readFully(Unknown Source)
lotus.priv.CORBA.iiop.Message.createFromStream(Unknown Source)
lotus.priv.CORBA.iiop.IIOPInputStream.prefill(Unknown Source)
lotus.priv.CORBA.iiop.IIOPConnection.createInputStream(Unknown Source)
lotus.priv.CORBA.iiop.ReaderThread.run(Unknown Source)
20-Oct-2020 09:50:12.173 WARNING [Thread-5] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [EPS3] appears to have started a thread named [RecycleThread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.base@11.0.8/java.lang.Thread.sleep(Native Method)
lotus.domino.cso.RecycleThread.sleep(Unknown Source)
lotus.domino.cso.RecycleThread.run(Unknown Source)
java.base@11.0.8/java.lang.Thread.run(Thread.java:834)
20-Oct-2020 09:50:12.189 INFO [Thread-5] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
42 minutes ago
hi, thank you...yeah, the two WARs are dumped into TOMCAT_HOME/webapps, but within each web.xml...the <servlet> node and subnodes are identical.

For example, <servlet-name>QueryEngineServlet</servlet-name>...etc...

the exception when the windows service is stopped refers to the servlet name... so Tomcat does have a reference to one of these servlets since it references the name, but it's seeing a null something...


org.apache.catalina.core.StandardWrapper.unload InstanceManager.destroy() for servlet [QueryEngineServlet] threw exception
java.lang.NullPointerException at org.apache.catalina.core.DefaultInstanceManager.destroyInstance (DefaultInstanceManager.java:197) at...etc...etc...


Is there a way to grab a full stack trace? It's not only what's printed in the stderr log, right?
22 hours ago
Hi. I thought I should put it in consolidated form in Tomcat forum, should I remove this thread (although I don't think I have that access)?
23 hours ago
Hello. I noticed this error while reviewing the logs and I further isolated it to when I shut the Tomcat Windows service off (working on previous issue)...


16-Oct-2020 12:37:49.350 SEVERE [Thread-5]

org.apache.catalina.core.StandardWrapper.unload InstanceManager.destroy() for servlet [QueryEngineServlet] threw exception

java.lang.NullPointerException at org.apache.catalina.core.DefaultInstanceManager.destroyInstance (DefaultInstanceManager.java:197) at...etc...etc...


I don't think it has anything to do with the destroy() methods in the running servlets as it doesn't specify those classes..rather it's destroy() in DefaultInstanceMenager.destroyInstance...and it seems to be on a higher thread level. Would anybody have an idea how to address this?

I do have two web apps running with the same servlet name (QueryEngneConfig)...could that be it? I wouldn't think so. I checked web.xml for both web apps and it seems ok.

The requests and responses seem all right as I noticed this error only in the log and it occurs only at service shutdown.

thank you very much.
1 day ago

Paul Clapham wrote:I dunno, it seems unlikely that Tomcat would be unloading and destroying a servlet while it's being started. So to me, there's something fishy going on. Maybe configuration, like you suggested, but I have no idea where to start looking.

Okay, that's probably not helpful. But does this error cause the startup to abort, or does it carry on to a point where you can send requests to the website?



Hey, thank you so much for reading...just some further info...it's isolated to when I shut the Tomcat windows service down, so I'm thinking not to sweat it. I'd like for it to go away but it seems it's something with the DefaultInstanceManager.destroyInstance in Tomcat. I checked the web.xml for the two servlets and they seem ok. Maybe it's because they have the same name? It's worrisome as it seems the servlets are not being "registered" but the requests/responses all seem ok.
1 day ago
thank you so much....that is what is weird.  Everything seems ok otherwise in terms of requests and responses. I found the error reviewing the logs and checking for warnings and so forth. I'm worried that the chickens will come home to roost at some point with this.

There's two separate web apps with the same servlet name (the source code is very close to the same...the destroy() methods are the same) and this error doesn't specify which web app. As a result, I would think it would show up twice or not at all...but its only once...which kinda points to a Tomcat internal destroy() thing... (at org.apache.catalina.core.DefaultInstanceManager.destroyInstance)

It might possibly be when I shut the Tomcat service off...but I think it's when  starting the service. I will have to shut down the service and leave it off for a while and compare the log time.
3 days ago
Hello. If anybody has a minute, I see this error when I start a Tomcat service....




I don't see any reference to individual classes in the error trace (as it seems to be referencing DefaultInstanceManager)...but here is the destroy() method from QueryEngineServlet...

it performs a null check on QueryEngine before it calls destroy() so I do't think it's as much a code thing as maybe a Tomcat config issue? Again, the error trace doesn't refer to a custom java class (and error line), just DefaultinstanceManager. Thank you very much for reading.





3 days ago

Stephan van Hulst wrote:Uh as far as I know each Tomcat installation has its own service manager application that modifies a configuration file that's part of the same Tomcat installation directory. It doesn't point to any particular service. Instead, the background service points to a particular Tomcat installation.

I think an easy way to fix this is to cd to the bin folder of your Tomcat installation directory and run "service uninstall" followed by "service install". I think these scripts assume that the service is named Tomcat9. If you want to use Tomcat99 as a service name, use "tomcat9 //DS/Tomcat99" followed by "service install Tomcat99".



Hi. Thank you so much. The file name does have to match the windows service name. I was able to perform a hybrid of this solution by copying Tomcat9w.exe, renaming Tomcat99w.exe and as you said, it maps to the Tomcat99 Windows service. From there, i was able to change the service JVM. Afterwards, I removed the previous Tomcat9 windows service via DOS command on the server. Thank you.
3 days ago
Hi...for future reference, I copied Tomcat9w.exe and renamed the copy Tomcat99w.exe, to match the service name, and I was able to change the JVM. The service exe file name has to match the Windows service name. Thank you.
3 days ago
Ok... I found that Tomcat9w.exe appears to be pointing to a previous service I had installed... with the default Tomcat9 service name.

Is it possible to redirect Tomcat9w.exe to my current service name, Tomcat99?

thank you very much.
2 weeks ago
Ok... I found that Tomcat9w.exe appears to be pointing to a previous service I had installed... with the default Tomcat9 service name.

Is it possible to redirect Tomcat9w.exe to my current service name, Tomcat99?

thank you.

2 weeks ago
Hi. I found something interesting in tomcat9w.exe GUI. The Java Virtual Machine field in the Java tab indicates

C:...\jdk1.8.0_131\bin\server\jvm.dll

however, the Manager App for the Tomcat service (via browser) indicates JVM version 9.0.1.11...

I changed the tomcat9w.exe to C:...jdk11...etc... but no effect. It's like the tomcat9w.exe settings are completely ignored.

??
2 weeks ago
Hi. I found something interesting in tomcat9w.exe GUI. The Java Virtual Machine field in the Java tab indicates

C:...\jdk1.8.0_131\bin\server\jvm.dll

however, the Manager App for the Tomcat service (via browser) indicates JVM version 9.0.1.11...

I changed the tomcat9w.exe to C:...jdk11...etc... but no effect. It's like the tomcat9w.exe settings are completely ignored.

??

2 weeks ago

Stephan van Hulst wrote:The reason for that is probably because, as I said before, the difference between Java 8 and Java 9 was HUGE and a lot of older applications were not compatible with Java 9. Applications that want to migrate from Java 8 now have 10 years to do it.

You said your applications run fine on Java 9. There is absolutely no reason not to upgrade to Java 11. By the time support for Java 11 has ended, Java 17 will have been released for 5 years.



ok. I'll try 11. I posted in the Tomcat forum but I was wondering if anybody has used the tomcat9w.exe GUI (Tomcat running as a windows service) to repoint the JVM to a newer version of Java? It seems straight-forward, just change it and I am guessing restart the service. But it looks too easy...making me uneasy...

When I made the jump form JVM 8 to 9, I reinstalled the entire Tomcat service but obviously, if this is easy...
2 weeks ago

Dave Tolls wrote:

Thomas Griffith wrote:

The current environment is Tomcat 9 with JDK/JRE 9... I had JDK 8...



If that's the case then, as I think has been said above, move up to 11, not down to 8, unless there are other good reasons not to (eg client environment).



thank you...but what of the later end of long term support date for 8 (2030) as opposed to 11 (2026)?
2 weeks ago