开发者

Cant get Tomcat6.0 to work with Windows 7 Environment

开发者 https://www.devze.com 2022-12-10 00:25 出处:网络
Prior to upgrading to windows 7, I was able to use Tomcat 6.0, but when I upgraded to the new Windows, and downloaded Eclipse EE, and downloaded the apache content, I am unable to get Apache to run. W

Prior to upgrading to windows 7, I was able to use Tomcat 6.0, but when I upgraded to the new Windows, and downloaded Eclipse EE, and downloaded the apache content, I am unable to get Apache to run. When I attempt to start my apacher server through either system tray, or even windows services, it give开发者_运维问答s the followign error screen.

"Windows could not start the Apache Tomcat 6 on local computer. For more information review the system event log. Refer to server specific error code 0."

I have been able to locate some forums about error code 0, and some other documentation on this problem, but none of the solutions seems to work.

One of the solutions I came across said to take the msvcr71.dll (mscvrt.dll on new platforms) and put it into the bin folder of apache. This also did not work.

Does anybody know a fix for this problem, or a way to get around it so I can get my server up and running thanks.


"Windows could not start the Apache Tomcat 6 on local computer. For more information review the system event log. Refer to server specific error code 0."

I have had exactly this problem when running Tomcat on Windows 2003 server. Final solution was to configure Tomcat to use C:\Path\To\jre6\bin\client\jvm.dll as JVM through the Java tab of its properties which you can open by doubleclicking the system tray icon. I unfortunately don't recall anymore what dll file it pointed before, but it was wrong. See if that helps.


I had a problem with tomcat 6.0.20 and windows 7, where it wouldn't start up because it needed to run as an administrator, it didnt bother to tell me; just refused. You can have it run as an administrator by right clicking on the application and click on the "Run as administrator" option.

If you are starting it from eclipse you may need to do this with eclipse as well, so it inherits correctly.


It could be a few things, but from my experience under Windows 7 and a fresh install of jdk6 and tomcat6, all I needed to do was add my jdk6/bin to my path.


What version of the JRE is used by Tomcat when it tries to start?

Could you check it is a JRE5 as in the Tomcat6 documentation, instead of a JRE6?

Check out the launch configuration properties for a Tomcat server.


Make also sure that Tomcat is not somehow already running as a Windows service when eclipse WTP tries to start its instance of Tomcat.


Check also the "server locations" specifies you are using the tomcat installation (see this thread). It is not directly related to your issue, but it will help once the current problem is solved.


Go to services, and change it your logon account which grants access to your user account to interact with the service, and everything worked from then!


This doesn't solve the problem for everyone, but it is important nonetheless:

With Windows 7, you also need to check the "C:\Windows\Prefetch" directory. For some reason Windows 7 places copies of executables in the "C:\Windows\Prefetch" directory in order to speed up startup times. Windows assumes that "C:\Windows" will probably be first in the path, so if copies of frequently-used executables are all in "C:\Windows\Prefetch," Windows 7 can provide the illusion of starting applications faster. Unfortunately, if you work with different versions of Java like I do, this caching scheme can quickly screw up your day.

I had the same problem you had (Tomcat wouldn't start as a service), so I uninstalled the Tomcat service and re-installed it, and checked the "C:\Windows\Prefetch" directory. Lo and behold, look what I found:

APACHE-TOMCAT-6.0.32.EXE-F8BD7E48.pf

That means that either the installer placed a copy of tomcat6.exe in there, or Windows 7 did when I cranked up the service. When you upgrade Tomcat, this cached executable may or may not be updated along with it, so you may need to remove it after upgrading. Check that directory for any older versions of APACHE-TOMCAT-xxxxxxxxxx.pf files and nuke them.

This goes for Java and updated versions of Java as well. If you check "C:\Windows\Prefetch," you may find a lot of JAVA.EXE-xxxxxx.pf files in there. I remove all of them, as I work with a couple of different versions of Java, and I want the OS to use the executable on the path I specify, NOT the first JAVA executable in "C:\Windows\Prefetch."


Problem solved after updating jdk to jdk1.6.0_33. My environment was:

  1. jdk1.6.0_06
  2. Windows 7 Enterprise
  3. apache-tomcat-6.0.35x64


All I needed to do was download the latest JRE (Java Run-time Environment).

Here download link

0

精彩评论

暂无评论...
验证码 换一张
取 消