简体   繁体   中英

How can I turn on logging exceptions on startup of Websphere Application Server 16.0.0.4 (WLP)?

On startup I get this one very non-descriptive log message telling me something went wrong on startup of my Spring-application:

W exception.occurred.while.running.ServletContainerInitializers.onStartup
             org.springframework.web.SpringServletContainerInitializer@81337783
             web-app-name

And no trace of the exception anywhere. I've tried lots of tweaks in properties and server definition with no luck on getting Websphere to tell me what exception was thrown. That would a least give a hint of what is wrong with the app (possibly a bad or missing lib).

Is there a way of getting it to tell me more of what happened? And why is it so hard to get this piece of software to be a bit more informative?

I know of trace.log, but how do I tweak the settings so I get exactly the info I need and not tons of useless logs?

ServletContainerInitializer (SCI) processing in WebSphere Liberty should be covered by the trace:

<logging traceSpecification="*=info=enabled:com.ibm.ws.webcontainer*=all:com.ibm.wsspi.webcontainer*=all" maxFileSize="40" maxFiles="20" traceFormat="BASIC"/>

See these for more information about enabling trace in Liberty:

https://www.ibm.com/support/knowledgecenter/SSEQTP_liberty/as_ditamaps/was900_welcome_liberty.html

https://www.ibm.com/support/knowledgecenter/SSEQTP_liberty/com.ibm.websphere.wlp.doc/ae/rwlp_trouble.html

https://www.ibm.com/support/knowledgecenter/SSEQTP_liberty/com.ibm.websphere.wlp.doc/ae/rwlp_logging.html

Also, the exception information might appear in a different log than where that warning occurs. Make sure to check all of the generated log files, including those in the FFDC folder.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM