com.mysql.jdbc.exceptions.jdbc4.CommunicationsException

Communications link failure Last packet sent to the server was 0 ms ago.

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web116

  • Stack trace

    • com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure Last packet sent to the server was 0 ms ago. at sun.reflect.GeneratedConstructorAccessor75.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2103) at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:718) at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46) at sun.reflect.GeneratedConstructorAccessor72.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:82) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:300) at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:838) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:821) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518) at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:417) at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144) at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:94) at org.hibernate.id.insert.AbstractSelectingDelegate.performInsert(AbstractSelectingDelegate.java:30) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2093) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2573) at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:47) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248) at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:290) at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:180) at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:108) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186) at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175) at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70) at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:535) at org.hibernate.impl.SessionImpl.save(SessionImpl.java:523) at org.hibernate.impl.SessionImpl.save(SessionImpl.java:519) at org.springframework.orm.hibernate3.HibernateTemplate$12.doInHibernate(HibernateTemplate.java:635) at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:372) at org.springframework.orm.hibernate3.HibernateTemplate.save(HibernateTemplate.java:632) at com.insideup.dao.hibernate.BaseHibernateDAO.save(BaseHibernateDAO.java:26) at com.insideup.manager.EmailAlertManager.createEmailAlert(EmailAlertManager.java:90) at com.insideup.manager.EmailAlertManager.saveEmailAlert(EmailAlertManager.java:79) at com.insideup.manager.LeadManager.deliverAllUnsoldLeads(LeadManager.java:1669) at com.insideup.process.LeadDeliveryThread.run(LeadDeliveryThread.java:87) at java.lang.Thread.run(Thread.java:662) Caused by: java.net.UnknownHostException: base11.sofmen.in at java.net.InetAddress.getAllByName0(InetAddress.java:1157) at java.net.InetAddress.getAllByName(InetAddress.java:1083) at java.net.InetAddress.getAllByName(InetAddress.java:1019) at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:243) at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:280) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2026) ... 42 more Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory, cause: Communications li Last packet sent to the server was 0 ms ago. at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:82) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:524) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:588) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:613) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:645) at org.springframework.jdbc.object.SqlQuery.execute(SqlQuery.java:112) at org.springframework.jdbc.object.SqlQuery.execute(SqlQuery.java:122) at com.insideup.dao.jdbc.mapping.BaseMappingSqlQuery.execute(BaseMappingSqlQuery.java:151) ... 8 more Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory, cause: Communications link failure Last packet sent to the server was 0 ms ago. at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:825) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518) at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:113) at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:79) ... 15 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Mathias SMathias S
    Once,
    4 more bugmates