user2576371
user2576371

Reputation: 81

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. My apache tomcat was running fine but suddenly it stopped working and shows the following error

"Starting Apache Tomcat v7 at localhost has encountered a problem. Server Apache Tomcat v7 has failed to start."

I have tried deleting the .snap file and temp0 folder in the workspace folder. I have also tried uninstalling and re-installing 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.

But all this in vain. There is no other process running on port number 8080 or other ports. Tomcat doesn't start only in Eclipse

Upvotes: 1

Views: 18333

Answers (3)

Bunny
Bunny

Reputation: 1

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

Try this it worked for me

Upvotes: -1

DARSHAN MKWN
DARSHAN MKWN

Reputation: 1

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. connect with user sysdba and change HTTP port number of oracle SQL command.

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

Upvotes: -1

Scott
Scott

Reputation: 46

Try checking the Console tab of Eclipse to get more detail of what caused the error. 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. 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 (e.g., @WebServlet("/SavePost"). This resulted in two servlets being mapped to the same url-pattern, which caused the error:

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

Upvotes: 3

Related Questions