从 Netbeans 启动 Tomcat 失败 [英] Starting of Tomcat failed from Netbeans

查看:39
本文介绍了从 Netbeans 启动 Tomcat 失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在从 Netbeans IDE 7.4 启动 Apache Tomcat 6 时遇到问题(在 7.3 版本上我遇到了同样的问题.其他人提到这个问题也存在于其他版本中,例如 8.0 等).

I have problem with starting Apache Tomcat 6 from Netbeans IDE 7.4 (on 7.3 version I had the same troubles. Other people mentioned that this problem exist also in other versions, like 8.0 etc).

我做了什么:

  • 删除已安装的 Tomcat 7(没有删除它,我遇到了同样的困难)
  • 添加新服务器,从Apache Tomcat网站下载(版本apache-tomcat-6.0.39,其他版本我也有同样的问题)
  • 我的服务器位置:D:\apache-tomcat-netbeans
  • 系统变量CATALINA_HOME:D:\apache-tomcat-netbeans
  • 系统变量JAVA HOME:C:\Program Files\Java\jdk1.7.0_51\
  • tomcat 用户:我让 netbeans 创建新用户,名为 tomcat,密码为 tomcat.添加服务器后打开 {tomcat}\conf\tomcat-users.xml 文件时,有关于我的用户的信息:

  • remove installed Tomcat 7 (without removing it, I had the same difficulties)
  • add new server, downloaded from Apache Tomcat website (version apache-tomcat-6.0.39, with other version I had the same problems)
  • my server location: D:\apache-tomcat-netbeans
  • system variable CATALINA_HOME: D:\apache-tomcat-netbeans
  • system variable JAVA HOME: C:\Program Files\Java\jdk1.7.0_51\
  • tomcat user: I let netbeans creating new user, called tomcat with password tomcat. When I open {tomcat}\conf\tomcat-users.xml file after adding server, there is info about my user:

<用户密码="tomcat" roles="manager,admin" username="tomcat"/>

< user password="tomcat" roles="manager,admin" username="tomcat"/ >

当我现在单击开始"时,出现Tomcat 启动失败".

When I now click "start", I got "Starting of Tomcat failed".

我的怀疑:

  • 我以管理员身份在 Windows 7 上工作,所以我认为这不是文件权限的问题.
  • 禁用代理没有帮助.
  • 日志:只创建了一个日志文件:localhost.2014-03-06.log,它完全是空的.
  • 以管理员身份"启动 Netbeans 没有帮助.
  • 从命令行一切正常,我在正常或调试模式下启动没有问题(catalina.bat jpda startstartup.bat)

推荐答案

它至少会影响 NetBeans 版本 7.4 到 8.0.2.它首先从 8.0 版报告并在 NetBeans 8.1 中修复.对于任何 tomcat 版本(7.0.56 到 8.0.28 版本已确认),它都会有问题.

It affects at least NetBeans versions 7.4 through 8.0.2. It was first reported from version 8.0 and fixed in NetBeans 8.1. It would have had the problem for any tomcat version (confirmed for versions 7.0.56 through 8.0.28).

具体描述为 Netbeans 错误 #248182.

这个问题也与提到以下错误输出的帖子有关:

This problem is also related to postings mentioning the following error output:

'127.0.0.1*' 不是内部或外部命令,也不是可运行的程序或批处理文件.

'127.0.0.1*' is not recognized as an internal or external command, operable program or batch file.

对于从 zip 文件安装的 tomcat,我通过更改 tomcat bin 目录中的 catalina.bat 文件来修复它.

For a tomcat installed from the zip file, I fixed it by changing the catalina.bat file in the tomcat bin directory.

在您的 catalina.bat 文件中找到波纹管配置.

Find the bellow configuration in your catalina.bat file.

:noJuliConfig
set "JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG%"

:noJuliManager
set "JAVA_OPTS=%JAVA_OPTS% %LOGGING_MANAGER%"

并通过删除双引号将其更改如下:

:noJuliConfig
set JAVA_OPTS=%JAVA_OPTS% %LOGGING_CONFIG%

:noJuliManager
set JAVA_OPTS=%JAVA_OPTS% %LOGGING_MANAGER%

现在保存您的更改,并从 NetBeans 中启动您的 tomcat.

Now save your changes, and start your tomcat from within NetBeans.

这篇关于从 Netbeans 启动 Tomcat 失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆