Link to home
Start Free TrialLog in
Avatar of ptreves
ptreves

asked on

Eclipse Hibernate Project: No buffer space available

Hello,

I am trying to run my project and am getting the following stack trace:


Could not connect to:  : 2407                  
java.net.SocketException: No buffer space available (maximum connections reached?): connect
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(Unknown Source)
      at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
      at java.net.PlainSocketImpl.connect(Unknown Source)
      at java.net.SocksSocketImpl.connect(Unknown Source)
      at java.net.Socket.connect(Unknown Source)
      at java.net.Socket.connect(Unknown Source)
      at java.net.Socket.<init>(Unknown Source)
      at java.net.Socket.<init>(Unknown Source)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.connect(RemoteTestRunner.java:570)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:381)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)


I read that the maximum number of connection has been reached.
I can I resolve this issue ?

Paolo
Avatar of Sharon Seth
Sharon Seth
Flag of India image

Seems that either your test case is leaking connecions or that your actual code is doing it . Can you detail when you are seeing this exception?
Avatar of ptreves
ptreves

ASKER

When I run an JUnit test class from eclipse.
Not a Hibernate/Java person but check that for every connection 'open', you call a 'close'.
To what exactly is your test case trying to connect to?
ASKER CERTIFIED SOLUTION
Avatar of Sharon Seth
Sharon Seth
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial