Lucas,
On 9/8/24 13:43, Lucas W wrote:
(Tomcat v 11.0.0, java v 22.0.2)
Hi,
System.out.println(..) works just after tomcat startup to
catalina.out. But at some point later on, souts fail to be logged to
catalina.out or anywhere. I am also experiencing something weird with
File.mkdirs(..); I have it in two different static functions in a
utility class, but it only works in one of them (I would give you some
sort of exception, but it seems exceptions arent logged to
catalina.out either, after the same point where sout stops working).
I will note that *sometimes* I get the following SEVEREs in
catalina.out on tomcat startup/deploy of my webapp:
SEVERE [Catalina-utility-2]
org.apache.catalina.startup.ContextConfig.beforeStart Exception fixing
docBase for context [] - java.util.zip.ZipException: zip END header
not found
SEVERE [Catalina-utility-2]
org.apache.catalina.startup.HostConfig.deployWAR Error deploying web
application archive
[/home/user/apache-tomcat-11.0.0-M24/webapps/ROOT.war] -
java.lang.IllegalStateException: Error starting child
(I am using maven with the build plugin maven-war-plugin to build the
war; this is the only maven build plugin I have) but otherwise, my
webapp runs smooth.
Any obvious potential causes?
My guess is that you've got a lot of logging-related JAR files in your
application and that, at some point during your application's work, one
gets loaded that takes over System.out and/or System.err.
If you have multiple *log*.jar files in WEB-INF/lib, I'd spend some time
trying to determine whether or not you need all of them.
I just recently discovered that I had both slf4j-to-whatever AND
whatever-to-slf4j in my own application in a test environment and was
surprised to find it wasn't causing stack overflows.
-chris
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org