gene b.
gene b.

Reputation: 11984

Eclipse Tomcat starts up too quickly - configuration of Spring Web App in Tomcat not working

I have the occasional problem of Spring Web App projects not properly starting up in Tomcat 8.5 after setting up the Web Project from scratch. I always do something to fix it, and I can never remember what fixes it.

Right after Configuring as Web Project with appropriate Runtime (Project Facets -> Runtimes -> Tomcat 8.5), Building, Compiling, ensuring all the correct Java Build Path -> Libraries + Deployment Assembly are all correct (I have the Before/After screenshots for each project), and running in Tomcat, I get the following premature completion.

INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Jul 31, 2019 12:17:09 PM org.apache.tomcat.jdbc.pool.ConnectionPool checkPoolConfiguration
WARNING: maxIdle is larger than maxActive, setting maxIdle to: 2
Jul 31, 2019 12:17:10 PM org.apache.tomcat.jdbc.pool.ConnectionPool checkPoolConfiguration
WARNING: maxIdle is larger than maxActive, setting maxIdle to: 2
Jul 31, 2019 12:17:10 PM org.apache.tomcat.jdbc.pool.ConnectionPool checkPoolConfiguration
WARNING: maxIdle is larger than maxActive, setting maxIdle to: 2
Jul 31, 2019 12:17:10 PM org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Jul 31, 2019 12:17:10 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-8080"]
Jul 31, 2019 12:17:10 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-nio-8009"]
Jul 31, 2019 12:17:10 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4564 ms

^^^ supposed to be many more lines after this: 
^^^ e.g., INFO: Initializing Spring root WebApplicationContext, 
^^^ ContextLoader(Line 285) - Root WebApplicationContext: initialization started, etc., etc.

The Web App has several .properties, including for DB connection, in C:\AppsConf\myapp.

I try to point this Conf Dir in several ways:

1) Run As -> Configuration -> VM Arguments with the path, AppsConf, as follows:

enter image description here

2) I also do a direct Server Restart from the Servers window, by right-clicking on my Tomcat 8.5. In this case I don't know how it gets the configuration and the properties.

enter image description here

NOTE A very similar question is here, Spring root WebApplicationContext not getting initialized in eclipse

Upvotes: 2

Views: 1957

Answers (1)

gene b.
gene b.

Reputation: 11984

We solved this issue.

The Deployment Assembly had the default /Web Content. It had to be changed to our custom value, /webroot, which we are using.

enter image description here

Upvotes: 1

Related Questions