ForguesR
ForguesR

Reputation: 3618

Tomcat doesn't start in Eclipse with "Exception in thread "main"

In Eclipse Tomcat doesn't start with error message "'Starting Tomcat v7.0 Server at localhost' has encountered a problem. Server Tomcat v7.0 Server at localhost failed to start.". In the console the last output is Exception in thread "main".

When removing all projects from the server, Tomcat starts fine.

Upvotes: 0

Views: 2264

Answers (1)

ForguesR
ForguesR

Reputation: 3618

This is a memory related problem. It can be misleading since there is no Exception: java.lang.OutOfMemoryError shown in the console. The only way to get a hint about a memory issue is opting for "Debugging" when running the server. You then get the familiar java.lang.OutOfMemoryError: PermGen space error.

To solve the problem increase the memory for Tomcat in Run configurations -> Your Tomcat Server name -> Arguments tab and then add -Xms120m -Xmx2048m -XX:MaxPermSize=1024m in the VM arguments.

Upvotes: 5

Related Questions