File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Too many connections Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Too many connections" Watch "Too many connections" New topic
Author

Too many connections

suraj savaratkar
Ranch Hand

Joined: May 17, 2010
Posts: 60
Hi professioner,
I am implementing an such application to perform save and update an particuler user data, but whenever i save and update
his data sponetenously for four time it's work properly but next time i got an exception for that operation; But it's does
not have problem but it's unpredictable; thus, I could not found any solution on that what is the main reason for
throwing an following exception;

I am using an MySQL 5.0 dataBase.

But server says that ,
Caused by: com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Data source
rejected establishment of connection, message from server: "Too many connections"


can somebody help me,


org.hibernate.exception.GenericJDBCException: Cannot open connection
at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92)
at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
at org.hibernate.jdbc.AbstractBatcher.openConnection(AbstractBatcher.java:384)
at org.hibernate.jdbc.JDBCContext.connect(JDBCContext.java:141)
at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:88)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:85)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1090)
at org.hibernate.loader.Loader.doQuery(Loader.java:362)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:203)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1255)
at org.hibernate.loader.entity.EntityLoader.load(EntityLoader.java:139)
at org.hibernate.loader.entity.EntityLoader.load(EntityLoader.java:124)
at org.hibernate.persister.entity.BasicEntityPersister.load(BasicEntityPersister.java:2453)
at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:387)
at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:368)
at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:166)
at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:140)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:119)
at org.hibernate.impl.SessionImpl.immediateLoad(SessionImpl.java:571)
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:59)
at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:80)
at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:133)
at beans.Employee$$EnhancerByCGLIB$$539f9fc9.toString()
at java.lang.String.valueOf(String.java:2577)
at java.lang.StringBuffer.append(StringBuffer.java:220)
at org.apache.catalina.session.StandardSession.writeObject(StandardSession.java:1438)
at org.apache.catalina.session.StandardSession.writeObjectData(StandardSession.java:911)
at org.apache.catalina.session.StandardManager.doUnload(StandardManager.java:516)
at org.apache.catalina.session.StandardManager.unload(StandardManager.java:462)
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:664)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4261)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2914)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:403)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1273)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1561)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1550)
at java.lang.Thread.run(Thread.java:595)
Caused by: com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Data source rejected establishment of
connection, message from server: "Too many connections"
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:980)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1096)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2048)
at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:723)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:298)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
at org.hibernate.jdbc.AbstractBatcher.openConnection(AbstractBatcher.java:381)
... 36 more
Jun 2, 2010 4:16:54 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
Jun 2, 2010 4:16:54 PM org.apache.catalina.core.StandardContext reload
SEVERE: Exception stopping Context
LifecycleException: Manager has not yet been started
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:657)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4261)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2914)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:403)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1273)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1561)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1550)
at java.lang.Thread.run(Thread.java:595)
Jun 2, 2010 4:16:54 PM org.apache.catalina.core.StandardContext start
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/FTTS] has already been started
Jun 2, 2010 4:17:04 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
Jun 2, 2010 4:17:04 PM org.apache.catalina.core.StandardContext reload
SEVERE: Exception stopping Context
LifecycleException: Manager has not yet been started
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:657)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4261)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2914)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:403)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1273)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1561)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1550)
at java.lang.Thread.run(Thread.java:595)
Jun 2, 2010 4:17:04 PM org.apache.catalina.core.StandardContext start
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/FTTS] has already been started
Jun 2, 2010 4:17:14 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
Jun 2, 2010 4:17:14 PM org.apache.catalina.core.StandardContext reload
SEVERE: Exception stopping Context
LifecycleException: Manager has not yet been started
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:657)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4261)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2914)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:403)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1273)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1561)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1550)
at java.lang.Thread.run(Thread.java:595)
Jun 2, 2010 4:17:14 PM org.apache.catalina.core.StandardContext start
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/FTTS] has already been started
Jun 2, 2010 4:17:24 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
Jun 2, 2010 4:17:24 PM org.apache.catalina.core.StandardContext reload
SEVERE: Exception stopping Context
LifecycleException: Manager has not yet been started
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:657)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4261)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2914)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:403)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1273)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1561)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1550)
at java.lang.Thread.run(Thread.java:595)
Jun 2, 2010 4:17:24 PM org.apache.catalina.core.StandardContext start
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/FTTS] has already been started
Jun 2, 2010 4:17:34 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
Jun 2, 2010 4:17:34 PM org.apache.catalina.core.StandardContext reload
SEVERE: Exception stopping Context
LifecycleException: Manager has not yet been started
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:657)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4261)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2914)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:403)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1273)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1561)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1550)
at java.lang.Thread.run(Thread.java:595)
Jun 2, 2010 4:17:34 PM org.apache.catalina.core.StandardContext start
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/FTTS] has already been started
Jun 2, 2010 4:17:44 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
Jun 2, 2010 4:17:44 PM org.apache.catalina.core.StandardContext reload
SEVERE: Exception stopping Context
LifecycleException: Manager has not yet been started
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:657)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4261)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2914)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:403)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1273)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1561)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1550)
at java.lang.Thread.run(Thread.java:595)
Jun 2, 2010 4:17:44 PM org.apache.catalina.core.StandardContext start
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/FTTS] has already been started
Jun 2, 2010 4:17:54 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
Jun 2, 2010 4:17:54 PM org.apache.catalina.core.StandardContext reload
SEVERE: Exception stopping Context
LifecycleException: Manager has not yet been started
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:657)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4261)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2914)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:403)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1273)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1561)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1550)
at java.lang.Thread.run(Thread.java:595)
Jun 2, 2010 4:17:54 PM org.apache.catalina.core.StandardContext start
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/FTTS] has already been started
Jun 2, 2010 4:18:04 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
Jun 2, 2010 4:18:04 PM org.apache.catalina.core.StandardContext reload
SEVERE: Exception stopping Context
LifecycleException: Manager has not yet been started
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:657)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4261)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2914)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:403)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1273)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1561)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1550)
at java.lang.Thread.run(Thread.java:595)
Jun 2, 2010 4:18:04 PM org.apache.catalina.core.StandardContext start
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/FTTS] has already been started
Jun 2, 2010 4:18:14 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
Jun 2, 2010 4:18:14 PM org.apache.catalina.core.StandardContext reload
SEVERE: Exception stopping Context
LifecycleException: Manager has not yet been started
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:657)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4261)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2914)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:403)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1273)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1561)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1550)
at java.lang.Thread.run(Thread.java:595)
Jun 2, 2010 4:18:14 PM org.apache.catalina.core.StandardContext start
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/FTTS] has already been started
Jun 2, 2010 4:18:24 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
Jun 2, 2010 4:18:24 PM org.apache.catalina.core.StandardContext reload
SEVERE: Exception stopping Context
LifecycleException: Manager has not yet been started
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:657)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4261)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2914)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:403)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1273)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1561)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1550)
at java.lang.Thread.run(Thread.java:595)
Jun 2, 2010 4:18:24 PM org.apache.catalina.core.StandardContext start
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/FTTS] has already been started
Jun 2, 2010 4:18:34 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
Jun 2, 2010 4:18:34 PM org.apache.catalina.core.StandardContext reload
SEVERE: Exception stopping Context
LifecycleException: Manager has not yet been started
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:657)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4261)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2914)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:403)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1273)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1561)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1550)
at java.lang.Thread.run(Thread.java:595)
Jun 2, 2010 4:18:34 PM org.apache.catalina.core.StandardContext start
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/FTTS] has already been started
Jun 2, 2010 4:18:44 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
Jun 2, 2010 4:18:44 PM org.apache.catalina.core.StandardContext reload
SEVERE: Exception stopping Context
LifecycleException: Manager has not yet been started
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:657)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4261)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2914)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:403)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1273)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1561)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1550)
at java.lang.Thread.run(Thread.java:595)
Jun 2, 2010 4:18:44 PM org.apache.catalina.core.StandardContext start
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/FTTS] has already been started
Jun 2, 2010 4:18:54 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
Jun 2, 2010 4:18:54 PM org.apache.catalina.core.StandardContext reload
SEVERE: Exception stopping Context
LifecycleException: Manager has not yet been started
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:657)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4261)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2914)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:403)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1273)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1561)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1550)
at java.lang.Thread.run(Thread.java:595)
Jun 2, 2010 4:18:54 PM org.apache.catalina.core.StandardContext start
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/FTTS] has already been started
Jun 2, 2010 4:19:04 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
Jun 2, 2010 4:19:04 PM org.apache.catalina.core.StandardContext reload
SEVERE: Exception stopping Context
LifecycleException: Manager has not yet been started
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:657)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4261)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2914)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:403)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1273)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1561)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1550)
at java.lang.Thread.run(Thread.java:595)
Jun 2, 2010 4:19:04 PM org.apache.catalina.core.StandardContext start
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/FTTS] has already been started
Jun 2, 2010 4:19:14 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
Jun 2, 2010 4:19:14 PM org.apache.catalina.core.StandardContext reload
SEVERE: Exception stopping Context
LifecycleException: Manager has not yet been started
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:657)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4261)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2914)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:403)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1273)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1561)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1550)
at java.lang.Thread.run(Thread.java:595)
Jun 2, 2010 4:19:14 PM org.apache.catalina.core.StandardContext start
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/FTTS] has already been started
Jun 2, 2010 4:19:24 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
Jun 2, 2010 4:19:24 PM org.apache.catalina.core.StandardContext reload
SEVERE: Exception stopping Context
LifecycleException: Manager has not yet been started
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:657)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4261)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2914)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:403)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1273)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1561)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1550)
at java.lang.Thread.run(Thread.java:595)
Jun 2, 2010 4:19:24 PM org.apache.catalina.core.StandardContext start
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/FTTS] has already been started
Jun 2, 2010 4:19:35 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
Jun 2, 2010 4:19:35 PM org.apache.catalina.core.StandardContext reload
SEVERE: Exception stopping Context
LifecycleException: Manager has not yet been started
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:657)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4261)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2914)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:403)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1273)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1561)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1550)
at java.lang.Thread.run(Thread.java:595)
Jun 2, 2010 4:19:35 PM org.apache.catalina.core.StandardContext start
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/FTTS] has already been started
Jun 2, 2010 4:19:45 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
Jun 2, 2010 4:19:45 PM org.apache.catalina.core.StandardContext reload
SEVERE: Exception stopping Context
LifecycleException: Manager has not yet been started
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:657)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4261)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2914)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:403)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1273)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1561)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1550)
at java.lang.Thread.run(Thread.java:595)
Jun 2, 2010 4:19:45 PM org.apache.catalina.core.StandardContext start
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/FTTS] has already been started
Jun 2, 2010 4:19:55 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
Jun 2, 2010 4:19:55 PM org.apache.catalina.core.StandardContext reload
SEVERE: Exception stopping Context
LifecycleException: Manager has not yet been started
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:657)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4261)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:2914)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:403)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1273)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1561)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren



This exception thrown by the server side and MySQL thrown an
"MySQL Exception"
"Query execute Thread cannot conect to MySQL"
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Please post only what's relevant and non-repetitive; that's 300+ lines, most of which are not helpful.

There are too many connections open--without more information it's impossible to help any further.
suraj savaratkar
Ranch Hand

Joined: May 17, 2010
Posts: 60
thanks
pamir sonmez
Ranch Hand

Joined: May 31, 2010
Posts: 46
In your java code I guess you manually open connection to database and you are not closing it.
In the life cycle of the programme, there exists huge amount of database connection.
You can configure the maximum number of database connection.

However, you should check the connections.(just in C, dealloc the unnecessary places )
suraj savaratkar
Ranch Hand

Joined: May 17, 2010
Posts: 60
But from where i should configure the maximum number of database connection.
Where is this cionfiguration to getting number of database connection.


thanks.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

It might be a better idea to first make sure connections are being properly closed and released, no?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

That may be a moot point, because its Hibernate that is making the connections.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Maybe, but that it works "for awhile" then unpredictably would point me in a different direction first.
pamir sonmez
Ranch Hand

Joined: May 31, 2010
Posts: 46
I am not sure if he is using hibernate.
It seems like he is using pure jdbc connection

in hibernate config file(in xml) you can configure maximum number of connections
I am not sure about syntax, just compare with your config file and google it

<bean id="hibernateProperties"
class="org.springframework.beans.factory.config.PropertiesFactoryBean"
scope="singleton">
<property name="properties">
<props>
.....
<prop key="hibernate.connection.pool_size">300</prop>
</props>
</property>
</bean>
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

pamir sonmez wrote:I am not sure if he is using hibernate.
It seems like he is using pure jdbc connection

in hibernate config file(in xml) you can configure maximum number of connections
I am not sure about syntax, just compare with your config file and google it

<bean id="hibernateProperties"
class="org.springframework.beans.factory.config.PropertiesFactoryBean"
scope="singleton">
<property name="properties">
<props>
.....
<prop key="hibernate.connection.pool_size">300</prop>
</props>
</property>
</bean>


The stack trace above contains calls to Hibernate code. And the message appears to come from the MySQL server, not the Driver or Hibernate, so I'd be checking how many connection MySQL is configured to allow and how many are being made. It could just be that you need to up the number allowed, or decrease the size of your connection pool.
suraj savaratkar
Ranch Hand

Joined: May 17, 2010
Posts: 60
Hi guys,
I had solved the problem by using "mysql.allow_persistent=Off" in configuration file to persist data
and it's closed connection wheather connection is opened.

Another way to use "set-variable=max_connections=250" this syntax in same configuration file to
manage maximum connection.

Thanks to all.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Too many connections
 
Similar Threads
Struts Plugins
log4j:WARN No appenders could be found for logger
my tomcat almost kill me
AspectJ LTW using Spring
java.lang.ClassCastException: org.spring.....ContextLoaderPlugIn cannot be cast to ..action.PlugIn