简体   繁体   English

在本地主机上启动Apache Tomcat v7遇到问题,无法在eclipse中启动

[英]Starting Apache Tomcat v7 at localhost has encountered a p‌r‌o‌b‌l‌e‌m and failed to start in eclipse

I'm using Eclipse kepler and Tomcat v7 64 bit on my windows 7 PC. 我在Windows 7 PC上使用Eclipse kepler和Tomcat v7 64位。 My apache tomcat was running fine but suddenly it stopped working and shows the following error 我的Apache Tomcat运行正常,但突然停止工作并显示以下错误

"Starting Apache Tomcat v7 at localhost has encountered a problem. Server Apache Tomcat v7 has failed to start." “在本地主机上启动Apache Tomcat v7遇到问题。服务器Apache Tomcat v7无法启动。”

I have tried deleting the .snap file and temp0 folder in the workspace folder. 我尝试删除工作区文件夹中的.snap文件和temp0文件夹。 I have also tried uninstalling and re-installing apache. 我也尝试过卸载并重新安装apache。 i referred to the question "Server Tomcat v7.0 Server at localhost failed to start" without stack trace while it works in terminal and tried all solutions. 我提到了“无法在本地启动的服务器Tomcat v7.0服务器在主机上启动Tomcat”问题,但没有在终端中工作并尝试所有解决方案的堆栈跟踪

But all this in vain. 但这一切都是徒劳的。 There is no other process running on port number 8080 or other ports. 端口号8080或其他端口上没有其他进程在运行。 Tomcat doesn't start only in Eclipse Tomcat不仅在Eclipse中启动

Try checking the Console tab of Eclipse to get more detail of what caused the error. 尝试检查Eclipse的Console选项卡,以获取导致错误的更多详细信息。 There are several potential problems that could produce this symptom. 可能会出现此症状的几个潜在问题。

On the Console tab, there will be plenty of red text for "INFO" entries in the log, but likely there will be a "SEVERE" entry that explains what happened. 在控制台选项卡上,日志中的“ INFO”条目将有很多红色文本,但是可能会有一个“ SEVERE”条目来说明发生了什么。 You may have to look down a little further because the first one may list that it is "caused by" something else. 您可能需要进一步向下看,因为第一个可能会列出它是“由”其他原因引起的。

In my case, I had refactored the name of a Servlet, but accidentally left the mapping to the old name (eg, @WebServlet("/SavePost"). This resulted in two servlets being mapped to the same url-pattern, which caused the error: 在我的情况下,我重构了Servlet的名称,但是不小心将映射保留为旧名称(例如@WebServlet(“ / SavePost”)),这导致将两个Servlet映射到相同的url-pattern,这导致错误:

Caused by: java.lang.IllegalArgumentException: The servlets named [forum.SavePost] and [forum.SavePost_old] are both mapped to the url-pattern [/SavePost] which is not permitted

If eclipse shows like this: starting tomcat v7.0 server at localhost has encountered a problem port 8080. default port number of tomcat is 8080. if oracle install in your system then you need to change oracle port number. 如果eclipse显示如下:在本地主机上启动tomcat v7.0服务器遇到端口8080问题。tomcat的默认端口号为8080。如果在系统中安装了oracle,则需要更改oracle端口号。 connect with user sysdba and change HTTP port number of oracle SQL command. 与用户sysdba连接并更改oracle SQL命令的HTTP端口号。

SQL> select dbms_xdb.gethttpport as "HTTP-Port", dbms_xdb.getftpport as "FTP-Port" from dual;
HTTP-Port FTP-Port

8080 0

Change Port HTTP and FTP.


SQL> begin
2 dbms_xdb.sethttpport('80'); 

3 dbms_xdb.setftpport('2100');

4 end;

5 /

SQL> select dbms_xdb.gethttpport as "HTTP-Port"
, dbms_xdb.getftpport as "FTP-Port" from dual;

HTTP-Port FTP-Port

80 2100

I used to get this error and were very frustrated because none of the answer were solving problem. 我曾经遇到此错误,并且非常沮丧,因为没有答案可以解决问题。

Just see the mappings of servlet this error can be because mapping are not correct 只是看到servlet的映射,此错误可能是因为映射不正确

Try this it worked for me 试试这个对我有用

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在本地主机上启动tomcat v8.0服务器遇到p‌r‌o‌b‌l‌e‌m。 未能启动 - starting tomcat v8.0 server at localhost has encountered p‌r‌o‌b‌l‌e‌m . Failed to start Tomcat 7服务器将无法在eclipse中启动,并显示错误消息“在本地主机(2)上启动Tomcat v7.0服务器遇到问题”。 - Tomcat 7 server won't start within eclipse with error `Starting Tomcat v7.0 Server at localhost (2) has encountered a p‌r‌o‌b‌l‌e‌m` 安装 Hibernate 插件后,Eclipse 上的“更新 lcd 遇到 p‌r‌o‌b‌l‌e‌m” - “Update lcd has encountered a p‌r‌o‌b‌l‌e‌m” on Eclipse after installing Hibernate plugin 设置构建路径遇到了一个问题-资源存在,但情况不同 - Setting build path has encountered a p‌r‌o‌b‌l‌e‌m - A resource exists with a different case 用Spring IOC解决“机器人腿”问题(DI) - Solving “Robot legs” p‌r‌o‌b‌l‌e‌m with Spring IOC (DI) 在 localhost 启动 tomcat v9.0 服务器遇到问题 - starting tomcat v9.0 server at localhost has encountered a problem 在 localhost 启动 App Engine Standard 时遇到问题 - 启动失败 - Starting App Engine Standard at localhost has encountered a problem - failed to start 本地主机上的Tomcat v8.0服务器无法在Eclipse上启动 - Tomcat v8.0 server at localhost failed to start on Eclipse Server Tomcat v9.0 Server at localhost 无法在 eclipse 中启动 - Server Tomcat v9.0 Server at localhost failed to start in eclipse 本地主机上的Server Tomcat v8.0 Server无法启动-JSF,CDI,JAVA,TOMCAT,ECLIPSE - Server Tomcat v8.0 Server at localhost failed to start - JSF, CDI, JAVA, TOMCAT, ECLIPSE
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM