简体   繁体   中英

Tomcat won't start, no error provided (Windows 7)

I've got a fresh installation of Tomcat 7.0.56. When I run startup.bat (As administrator or not), I got the following message:

    Using CATALINA_BASE:   "C:\uPortal_test\apache-tomcat-7.0.56"
    Using CATALINA_HOME:   "C:\uPortal_test\apache-tomcat-7.0.56"
    Using CATALINA_TMPDIR: "C:\uPortal_test\apache-tomcat-7.0.56\temp"
    Using JRE_HOME:        "C:\Program Files (x86)\Java\jdk1.7.0_71"
    Using CLASSPATH:       "C:\uPortal_test\apache-tomcat-7.0.56\bin\bootstrap.jar;C
    :\uPortal_test\apache-tomcat-7.0.56\bin\tomcat-juli.jar"

And that's it. The console closes instantly. I followed this Tutorial

I set CATALINA_HOME at the beginning of startup.bat, just in case, but it should not be necessary

Ok you need to get the error from command prompt. You will need to do the following:

click on windows button 
type cmd (followed by enter)
cd C:\uPortal_test\apache-tomcat-7.0.56\bin (followed by enter)
startup.bat (followed by enter)

If you run this batch file you some of the error will pop off the script which will give you hint what wrong you are doing and you can correct accordingly.

In my case, the error did not show up in the command prompt. This can happen if a config file (in my case, setenv.bat) has a syntax error. I was able to isolate the problem by adding rem in front of each setting line in the bat file to isolate the root cause.

I was missing double quotes around a file path that included spaces.

set JAVA_OPTS=%JAVA_OPTS% -Djuli-logback.configurationFile=%CATALINA_HOME%\conf\logback.xml

Should have been:

set JAVA_OPTS=%JAVA_OPTS% -Djuli-logback.configurationFile="%CATALINA_HOME%\conf\logback.xml"

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