LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-03-2012, 03:42 AM   #1
jayakumar01
Member
 
Registered: Nov 2011
Posts: 106

Rep: Reputation: Disabled
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
 
Old 01-04-2012, 09:04 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by jayakumar01 View Post
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.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bacula: Unable establish connection with file daemon (locally) milkies27 Linux - Software 1 06-02-2009 01:23 AM
Unable to establish internet connection using Linksys WRT54G Router on Mandrake 10 djynen Linux - Networking 3 11-25-2006 10:01 AM
unable to establish connection neerajchaudhari Linux - Software 2 09-14-2005 10:22 PM
Unable To Create A Connection Using Network Configuration MorPheix Linux - Networking 1 07-11-2005 04:50 PM
Unable to establish a connection to my ISP? phobos Linux - Networking 2 10-22-2002 11:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration