Page 1 of 1

Tomcat None Starter With JDK7 (Win7) 1.7.7 [SOLVED]

PostPosted: 21. October 2011 21:24
by laceja
I just installed XAMPP 1.7.7 on a Windows 7 Ultimate SP 1, but I Tomcat won't start. Isn't Tomcat included in the basic package now. So, how do I start Tomcat?

Thanks!

Re: Tomcat on XAMPP 1.7.7

PostPosted: 21. October 2011 21:37
by Altrea
1st: please add your OS-version and XAMPP version in your profile settings.
2nd: Please try out the new XAMPP control panel v3.0.4 from viewtopic.php?f=16&t=46743&start=45#p186862. It has some really nice improvements especially for Tomcat
3rd: have you installed already JRE or JDK?

Re: Tomcat on XAMPP 1.7.7

PostPosted: 21. October 2011 22:53
by laceja
Thanks, I'll check out the new control panel and update my profile.

Yes, I have JDK1.7.0.01 installed and the JAVA_HOME is set for it.

Re: Tomcat None Starter With JDK7 (Win7) 1.7.7

PostPosted: 05. November 2011 21:11
by hackattack142
I am investigating this. I just installed the JDK 7 Update 1 with JRE 7. The batch files do pick up the JDK and use it. I am getting an exception during the server initialization. Try opening up a command prompt window (start > run > cmd), change directory to the "C:\xampp" or where ever you have xampp installed to, and try to run the "catalina_start.bat" file. This will keep the window open if the server crashes so you can see the output. Look for any Java exceptions. I am getting a "SEVERE: StandardServer.await: create[localhost:8005]" I am investigating the issue further but the port does not appear to be in use.

Update:
After some investigation, this appears to be a Java 7 issue. In Java 7 they implemented new Socket code that adds and uses IPv6. Under the hood it maps IPv4 addresses to IPv6 and this can cause issues if the application does not support those types of sockets. I am sure the Tomcat files could be edited in some fashion to get around this (haven't found it yet) but the easier solution would be to stick with Java 6 for the meantime unless there is a specific reason you never version 7. I had not upgraded because I have heard version 7 is riddled with issues and was waiting until more updates were out.

Update 2:
Figured out how to fix it.
Open "xampp/tomcat/bin/catalina.bat" and change line 310 from this:
Code: Select all
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%

to this
Code: Select all
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" -Djava.net.preferIPv4Stack="true" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%