1

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

3
  • You can check your java environment variable settings, they should be set to something like C:\Program Files\Java\jdk1.7.0_09 if this does not work, try XAMPP. Commented Feb 23, 2014 at 10:04
  • reinstall it and make proper settings...it will work fine Commented Feb 23, 2014 at 10:06
  • Tomcat doesn't work only in Eclipse Commented Feb 23, 2014 at 10:09

3 Answers 3

3

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 
Sign up to request clarification or add additional context in comments.

Comments

-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 

Comments

-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

4 Comments

"mapping are not correct". would it be of value to show what you changed to make it work then?
If your application is on servlet then this mapping is needed. If mapping is wrong Tomcat wont start. refer : tutorialspoint.com/servlets/servlets-first-example.htm
"this mapping is needed". Which mapping? You haven't mentioned any specific mappings.
The mapping for Servlet name and URL pattern. If Servlet name is wrong or not present in you application then this error can come up.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.