score:-1

You need to check if your spring context have this statement

<property name="MaxTotal" value="30"></property>

If your project has more than 7 DAOs won't work, because it won't create 8 connections.

my project:

<bean id="mysqlDataSource" class="org.apache.commons.dbcp2.BasicDataSource">
    <property name="driverClassName" value="com.mysql.jdbc.Driver"></property>
    <property name="url" value="jdbc:mysql://localhost/(name of your schema)"></property>
    <property name="username" value="root"></property>
    <property name="password" value="root"></property>
    <property name="MaxTotal" value="(numbers of DAO)"></property>
</bean>

score:-1

It's JVM space capacity (heap and Permanent area) issue in my case, it works after add Argument Config for Tomcat Server (Run Configuration, Arguments).

-Xms512m -Xmx1536m -XX:MaxPermSize=512m -Djava.util.Arrays.useLegacyMergeSort=true

score:0

Is your browser making calls to the server while it is starting? if yes, you probably should close it e.g. if your browser is currently set to http://localhost, close it before attempting to start the server.

score:0

If you are trying to debug the application on server, just check out the breakpoints. You might had include the whole class as breakpoint. So remove that breakpoint.

This thing worked in my case when i was trying to debug.

score:0

Nothing of the above helped me but setting:

-Djava.net.preferIPv4Stack=true

as VM Argument in the VM Arguments tab of the Tomcat Server Debug Configuration Settings solved the problem. (Tomcat 8, Windows 10, Eclipse Mars)

score:0

Tomcat Server not starting with in 45 seconds

right click on the configured server go to properties->select monitoring -> Add ->HTTP protocol 8080

after run server it will deploy.

score:0

I stoped the tomcat on the computer and started the service (tomcat) using the eclipse IDE.

score:0

If you are running into this on Mac and you installed Tomcat using brew, one good way to get round that is to install Tomcat using a zip file instead.

Go here, download a zip file, unzip it, and in Eclipse, create a new server and specify "Tomcat installation directory" as the unzipped file.

score:0

Timeouts:

  • Start: 200
  • Stop: 45

..and then Window → Preferences → General → Network Connection.

Set "Active Provider" = Manual (to mark all the checkboxes).

score:0

Turns out that MySQL wasn't running in my case. I've started MySQL service, and it worked.

score:0

If you are using any Databases such as Oracle/Mysql then first check this databases services are start

score:1

Well, I tried all the solutions:

  • increasing timeout seconds;
  • deleting the server instance in Eclipse along with the Run Config.

None of them worked.

And:

  • there was no breakpoint in my code;
  • I don't use any antivirus.

I realized that some people - who had the same problem - were using Eclipse Helios (so was I).

I switched to Eclipse Kepler and it worked perfectly.

Maybe it can be a solution. I wanted to use Helios, but Kepler is okay.

score:1

I was too facing similar issue and here I found another solution for it.

I have just started Eclipse Luna and not developed/deployed any project yet. I tried adding Tomcat v7.0 Server and got same error.

In order to resolve the issue I went to Server Perspective (it's actually server tab next to the console tab located below Project code). Double click on Server which is added to Eclipse. It will open up Overview page. Look for Server Location and select Use workspace metadata(does not modify Tomcat location). Now restart the Server and error will go away.

Server > (double click) Tomcat v7.0 Server at localhost > (Overview page) Server Location > Select -- Use workspace metadata(does not modify Tomcat location).

score:1

URL pattern of <servlet-mapping>:

Check project explorer → Deployment descriptor → Servlet Mapping → check that all mapping present in controller package. ref. image as below:

shop project ref

if there is any mapping not available, Then remove that <servlet> and <servlet-mapping> tag in web.xml.

score:2

I had the same problem I deleted the server from the server tab, and also the server folder under your eclipse workspace, restarted eclipse, set up a new server, and it appears to be running OK now.

score:2

Just for knowledge.. Also had the same issue and solved it stopping and starting again the mysql service... I think that was some conflict between mysql-service and tomcat.

Good Luck

score:2

In my case tomcat was configured to start not on localhost(guess it came from servers.xml connector entry) so Eclipse fails to find it running after start. Changed Host name on Servers tab to my 192.168.xxx.yyy ip.

Had the same error message, though tomcat did start sucessfully, but then Eclipse shuts it down.

score:2

If some one had the same issue like me about the timeout of the server where you can found it. This response can help you.

Click on window > Show View > Server. When you are on the server, you will see the server that you have configured before. After that, right click on your server configuration, go to Properties > General and click on Switch Location. After you clicking on "Switch Location", the server configuration will be appear on the Package Explorer of eclipse. Then Double click on the server file in the package explorer you will see where the timeout located.

Thank you.

score:2

None of the above worked for me but this - 1. Remove any project if configured already while installing Tomcat. 2. Right click on configured server -> clean and -> Clean tomcat working directory

Did couple of times and the issue resolved. Thanks.

score:2

try clean Tomcat working directory,it works for me

score:3

I had tried increasing the Server Start up time for tomcat server, removed server and created new server, removed server and changed run-time environment configurations. Those thing didn't work for me. At last, i found deployment descriptor(url pattern of servlet-mapping) is the one that making the trouble.

score:3

Just remove or delete the server from eclipse and reconfigure it or add it again to Eclipse.

score:4

Folks, I had this same problem and tried raising the timeout, deleting the server and creating again and did not work. I was running Eclipse Kepler in Linux. The solution proposed by @Phoenix is what worked for me:

Window -> Preferences -> General -> Network Connections

Set Active Providers in manual and then configure or not the proxy. I had this option in "Native".

Then I realized I had the variable http_proxy set. It was set in the ~/.bashrc file. This environment variable is the culprit of many problems.

Once I set http_proxy to empty

export http_proxy=

to check it:

echo $http_proxy

I was able to leave option "Active Provider" in "Native" and solve the timeout problem. This is useful because Eclipse adopts the native configuration, in case you change it often.

In my case, where I had configured http_proxy in ~./bashrc, I had to close Eclipse and even log out and log in again.

score:4

Below worked for me.

Removed all Breakpoints. Then did a clean on server as below.

Right click on server-->Click clean.

score:4

Just go with below points. Open Eclipse Windows -> show View -> server -> double click tomcat/press Fn + F3 -> Timeouts -> increase start time Save setting and Restart eclipse also delete .metadata folder from work space if you don't need Check Now... All The Best

score:5

Disabling my antivirus does the trick for me ...

score:5

I also had the issue of the Eclipse Tomcat Server timing out and tried every suggestion including:

  • increasing timeout seconds
  • deleting various .metadata files in workspace directory
  • deleting the server instance in Eclipse along with the Run Config

Nothing worked until I read a comment on a related issue and realized that I had added a breakpoint in an interceptor class after a big code change and had forgotten to toggle it off. I removed it and all other breakpoints and Tomcat started right up as it usually did.

score:9

I know it's a bit late, but I've tried everything above and nothing worked. The real problem was that I'm using hibernate, so it was trying to connect to mysql but was not able, thats why it showed time out.

Just to let u guys know, I'm using RDS(Amazon), so just to make a test I changed to my local mysql and it worked perfectly.

Hope that this answer helps somebody.

Thanks.

score:9

In my case I was using spring+hibernate and forgot to run my MYSQL server due to which hibernate was not getting loaded and thus was throwing error

score:11

Open the Servers view -> double click tomcat -> drop down the Timeouts section you can increase the startup time for each particular server. like 45 to 450

score:22

Open servers view, open Timeouts and set up Start

add start

score:40

I got the solution for your requirement.

I'm also getting the same error in my eclipse Luna.

Go to Window -> Preferences.

Then General -> Network Connections.

Then select the Active Provider as Manual.

Then restart the tomcat and run. It will work.

Hope it will help you.

score:123

Try remove all breakpoints.Also you can increase start up time.

Open the Servers view -> double click tomcat -> drop down the Timeouts section

enter image description here


Related Query

More Query from same tag