Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 848
Grigory Kornilov Avatar asked Sep 30 '22 11:09

Grigory Kornilov


2 Answers

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.

like image 96
SMA Avatar answered Oct 03 '22 08:10

SMA


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"
like image 23
RMorrisey Avatar answered Oct 03 '22 08:10

RMorrisey