0

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?

Andy Guibert
  • 41,446
  • 8
  • 38
  • 61
  • Consider moving to a newer version of Liberty like 17.0.0.4, it is possible the problem has been addressed. Also, I don't think Liberty trace is at fault here, that exception is coming out of Spring, consider configuring it. – F Rowe Jan 24 '18 at 12:23
  • I have logging configured for Spring, but no logging is coming out since it's never getting configured before the exception is thrown. It looks like the exception is caught by a Websphere-component/module, så there should be a way to log it. At least show me its name. – Georg Sirnes Lundesgaard Jan 24 '18 at 12:36
  • And BTW, it works with Spring 5.0.x, but not Spring 4.3.x, so there must be some lib missing or in conflict. – Georg Sirnes Lundesgaard Jan 24 '18 at 12:42
  • There is a bug in Liberty here. That is a message key for which there appears to be no associated message. Ultimately the SpringServletContainerInitializer.onStartup method has thrown an Exception. There should be an FFDC for the exception, but the message should also exist. – Alasdair Jan 24 '18 at 16:38
  • I found the culprit using trial and error. I was missing a commons-logging .jar-file. – Georg Sirnes Lundesgaard Jan 26 '18 at 12:38

1 Answers1

0

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.

Thomas Bitonti
  • 1,179
  • 7
  • 14