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.
<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>
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
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.
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.
Nothing of the above helped me but setting:
as VM Argument in the VM Arguments tab of the Tomcat Server Debug Configuration Settings solved the problem. (Tomcat 8, Windows 10, Eclipse Mars)
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.
I stoped the tomcat on the computer and started the service (tomcat) using the eclipse IDE.
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.
- Start: 200
- Stop: 45
..and then Window → Preferences → General → Network Connection.
"Active Provider" = Manual (to mark all the checkboxes).
Turns out that MySQL wasn't running in my case. I've started MySQL service, and it worked.
If you are using any Databases such as Oracle/Mysql then first check this databases services are start
Well, I tried all the solutions:
- increasing timeout seconds;
- deleting the server instance in Eclipse along with the Run Config.
None of them worked.
- 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.
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).
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.
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.
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
Had the same error message, though tomcat did start sucessfully, but then Eclipse shuts it down.
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.
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.
try clean Tomcat working directory,it works for me
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.
Just remove or delete the server from eclipse and reconfigure it or add it again to Eclipse.
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
to check it:
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.
Below worked for me.
Removed all Breakpoints. Then did a clean on server as below.
Right click on server-->Click clean.
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
Disabling my antivirus does the trick for me ...
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.
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.
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
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
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.
Try remove all breakpoints.Also you can increase start up time.
Open the Servers view -> double click tomcat -> drop down the Timeouts section
- Tomcat Server not starting with in 45 seconds
- Tomcat server is not starting as service: %1 is not a valid Win32 application
- Eclipse : Starting tomcat server from eclipse , does not start the deployed wars
- Not able to run a simple JSP program in Eclipse with Tomcat server 7 in browser
- Tomcat server 9.0 not starting in eclipse It showing error "Server Tomcat v9.0 Server at localhost failed to start."
- Tomcat server not starting when adding a specific servlet
- Tomcat server not running in eclipse with project
- Eclipse's Tomcat Server will not start after updating Spring framework version with Maven
- Tomcat Server Not Starting from Eclipse Oxygen in Mac
- Tomcat server does not start with DCEVM patched JRE
- Eclipse Tomcat Server starting but code is not getting deployed
- Having trouble with starting tomcat server in eclipse
- Tomcat 7.0.52 server not extracting war file(compressed file) in webapps to uncompressed format when using export with Eclipse
- Tomcat 7.0.25 is not starting with Eclipse Indigo
- why my external css file not loading with html file on my tomcat server
- Apache Tomcat Not Showing in Eclipse Server Runtime Environments
- Could not load the Tomcat server configuration
- Tomcat Not Starting Through Eclipse (Timeout)
- "could not find the yyy.apk" message in console while starting application with an android lib linked
- The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. on deploying to tomcat
- JBoss server 7.1 not starting in Eclipse Luna
- apache tomcat 9.x not working with eclipse & Java 10.0.1
- Tomcat not starting from eclipse
- When not to use this server location when using tomcat within Eclipse
- Apache Tomcat 9 Not Showing in Eclipse Server Runtime Environments
- Server Tomcat v6.0 Server at localhost was unable to start within 45 seconds
- Eclipse maven-enabled web app references workspace projects, but those are not deployed when running Tomcat server
- Eclipse not starting tomcat-7 server in debug mode
- I am not able to add Tomcat Server again
- Eclipse Luna - Getting error - 'Could not publish server configuration for Tomcat v7.0 Server at localhost. Multiple Contexts have a path of "/abc"
More Query from same tag
- Websphere in RAD hangs on startup
- Eclipse Remote Application Platform (RAP) - Deploy Custom Theme
- Cannot open default layouts on Eclipse after creating small version of each of them
- building development environment for GWT with JBoss
- java.io.IOException: Cannot run program "dir": CreateProcess error=2, Das System
- Regarding Maven Versions Plugin
- Eclipse - what's wrong with the project
- How to view and modify static and global variables in Eclipse CDT
- Reading a csv file into an array in Java (the add method not working)
- automatically go to the result page after pressing save button
- Developing CXF RESTful service using sysdeo-tomcat-plugin with maven
- Error when Deploying Java app with GlassFish
- How to eliminate the "maven-enforcer-plugin (goal "enforce") is ignored by m2e" warning by eclipse?
- how can I create a new project without appcompat_v7
- How to show login forms in browser using java framework in Eclipse?
- IDE or addons for IDE that support W3C WAI
- Unable to acces files of other project in a eclipse java project
- Eclipse jface tableviewer - changing celleditor at runtime
- My app keeps crashing in the emulator
- Debugging in Eclipse. Moving between breakpoints
- Automatically insert signature on class files
- RSA Profiling Stop
- cross compile git repository with mingw under Ubuntu
- The following classes could not be instantiated: com.google.ads.AdView()
- Quick Keys for Code Cleanup in Eclipse
- Wildfly - "Connector 'netty' not found on the main configuration file"
- Intellij suggest and move class to, otherwise autocorrect, the detected package declaration, like Eclipse
- TFS Eclipse plugin makes Eclipse hang on load workbench
- How can I format an entire source tree in Eclipse 3.4 (Ganymede)?
- GDB and OpenOCD - reset or resume after end of debugging