LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   mysql driver unable to create a connection due to an inabilityto establish connection (http://www.linuxquestions.org/questions/linux-server-73/mysql-driver-unable-to-create-a-connection-due-to-an-inabilityto-establish-connection-921733/)

jayakumar01 01-03-2012 03:42 AM

mysql driver unable to create a connection due to an inabilityto establish connection
 
Hi All
when u i tried to insert data from one database to another it throws the following error

Caused by: org.hibernate.exception.JDBCConnectionException: Cannot open connection
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:420)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:119)
at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57)
at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)
at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:37)
... 13 more
Caused by: com.mysql.jdbc.CommunicationsException: The driver was unable to create a connection due to an inability to establish the client portion of a socket.

This is usually caused by a limit on the number of sockets imposed by the operating system. This limit is usually configurable.

For Unix-based platforms, see the manual page for the 'ulimit' command. Kernel or system reconfiguration may also be required.


For Windows-based platforms, see Microsoft Knowledge Base Article 196271 (Q196271).Exception-org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: Cannot open connection

13:03:59:077(HotelsproAutoImport.java:execute:71)-PushDestinationCommand ends...
13:03:59:077(HotelsproAutoImport.java:execute:72)-PushAmenitiesCommand starts...
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2814)
at com.mysql.jdbc.Connection.<init>(Connection.java:1553)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverMan agerDataSource.java:283)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverMan agerDataSource.java:271)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverMan agerDataSource.java:255)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnection(DriverManagerDataSource.ja va:236)
at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceCo nnectionProvider.java:47)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:417)
... 18 more

13:03:59:765(JobRunShell.java:run:211)-Job DEFAULT.auto-imports-hotelspro threw an unhandled Exception: java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Unknown Source)
at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source)
at java.lang.AbstractStringBuilder.append(Unknown Source)
at java.lang.StringBuffer.append(Unknown Source)
at java.io.StringWriter.write(Unknown Source)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1129)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:1104)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:1050)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:1075)
at org.apache.commons.io.IOUtils.toString(IOUtils.java:382)
at org.apache.commons.io.FileUtils.readFileToString(FileUtils.java:1103)
at org.apache.commons.io.FileUtils.readFileToString(FileUtils.java:1120)
at org.performics.business.hp.datafile.PushAmenitiesCommand.execute(PushAmenitiesCommand.java:33)
at org.performics.business.hp.datafile.HotelsproAutoImport.execute(HotelsproAutoImport.java:74)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)
[3:03:44 PM] nagraj052: *************************
[3:03:44 PM] nagraj052: The driver was unable to create a connection due to an inability to establish the client portion of a socket.

This is usually caused by a limit on the number of sockets imposed by the operating system. This limit is usually configurable.

For Unix-based platforms, see the manual page for the 'ulimit' command. Kernel or system reconfiguration may also be required.
[3:04:57 PM] nagraj052: plz send that url

TB0ne 01-04-2012 09:04 AM

Quote:

Originally Posted by jayakumar01 (Post 4564439)
Hi All
when u i tried to insert data from one database to another it throws the following error

Caused by: com.mysql.jdbc.CommunicationsException: The driver was unable to create a connection due to an inability to establish the client portion of a socket.

This is usually caused by a limit on the number of sockets imposed by the operating system. This limit is usually configurable.

For Unix-based platforms, see the manual page for the 'ulimit' command. Kernel or system reconfiguration may also be required.

plz send that url

Again, you need to spell out your words. And can you try to look things up too??? The system TELLS YOU what to look at, and so does the MySQL manual. Even opening up the my.cnf file has a ulimit variable in it. Did you bother to try any of these things???

Try the MySQL manual...look for ulimit:
http://dev.mysql.com/doc/refman/5.6/...x-command.html
http://dev.mysql.com/doc/refman/5.6/...e-support.html
http://dev.mysql.com/doc/refman/5.6/...e-handles.html
http://dev.mysql.com/doc/refman/5.6/...r-options.html

You seem to put very little effort into solving your own problems, or trying to look things up...under ANY of your four ID's.


All times are GMT -5. The time now is 11:23 PM.