org.apache.ibatis.exceptions.PersistenceException: ### Error opening session. Cause: com.mysql.jdbc.exceptions.jdbc4.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). ### Cause: com.mysql.jdbc.exceptions.jdbc4.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). at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:8) at org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSessionFromDataSource(DefaultSqlSessionFactory.java:81) at org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSession(DefaultSqlSessionFactory.java:32) at feg.mybatis.FuelPricesDAO.getAll(FuelPricesDAO.java:21) at feg.mybatis.FuelPricesDAO.getDefaultFuelPrices(FuelPricesDAO.java:32) at feg.mybatis.MyBatisServlet.getUser(MyBatisServlet.java:67) at feg.FindServlet.customizePrompt(FindServlet.java:647) at feg.FindServlet.processRequest(FindServlet.java:1374) at feg.FindServlet.doGet(FindServlet.java:72) at javax.servlet.http.HttpServlet.service(HttpServlet.java:489) at javax.servlet.http.HttpServlet.service(HttpServlet.java:583) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:212) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:156) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:181) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:156) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:168) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:346) at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:535) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:934) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1698) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) at java.lang.Thread.run(Thread.java:748) Caused by: com.mysql.jdbc.exceptions.jdbc4.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). at sun.reflect.GeneratedConstructorAccessor161.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.jdbc.Util.handleNewInstance(Util.java:407) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116) at com.mysql.jdbc.MysqlIO.(MysqlIO.java:343) at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2334) at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2371) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2163) at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:794) at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47) at sun.reflect.GeneratedConstructorAccessor100.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.jdbc.Util.handleNewInstance(Util.java:407) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:378) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:247) at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.getConnection(UnpooledDataSource.java:64) at org.apache.ibatis.datasource.pooled.PooledDataSource.popConnection(PooledDataSource.java:349) at org.apache.ibatis.datasource.pooled.PooledDataSource.getConnection(PooledDataSource.java:55) at org.apache.ibatis.session.defaults.DefaultSqlSessionFactory.openSessionFromDataSource(DefaultSqlSessionFactory.java:72) ... 30 more Caused by: java.net.BindException: Address already in use: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at java.net.Socket.connect(Socket.java:538) at java.net.Socket.(Socket.java:434) at java.net.Socket.(Socket.java:244) at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:254) at com.mysql.jdbc.MysqlIO.(MysqlIO.java:292) ... 47 more Error Message

We're sorry. An unexpected error has occurred.

To learn more about correcting errors on fueleconomy.gov, click on the links below

Have you been inactive on fueleconomy.gov for more than 30 minutes?

If you are inactive for an extended period on fueleconomy.gov, your session will time out and we will lose track of your vehicle choices. To resume your search, please visit the page below: Find and Compare Cars

Are your session cookies disabled?

The Find and Compare Cars section of fueleconomy.gov uses "session cookies" to temporarily keep track of your preferences and vehicle selections. These session cookies automatically expire in 30 minutes or when you close your browser.

"Persistent cookies" which are sometimes used to track user activity over multiple sessions are not currently used on this site.

To enable cookies in your browser, please follow the instructions below. If you would prefer not to enable cookies, please visit this alternative version of Find and Compare Cars: Alternative Find and Compare Cars

Microsoft Internet Explorer 7.x and 8.x (Windows)

  1. Click Start > Control Panel (or in Internet Explorer select the Tools > Options menu). (Note: with Windows XP Classic View, click the Windows Start button > Settings > Control Panel).
  2. Double-click the Internet Options icon.
  3. Click the Privacy tab.
  4. Click the Advanced button.
  5. Select the option 'Override automatic cookie handling' under the Cookies section in the Advanced Privacy Settings window.
  6. Select the 'Accept' or 'Prompt' option under 'First-party Cookies.'
  7. In the Internet Options window, click OK to exit.

Internet Explorer 6:

  1. Click Start > Control Panel (or in Internet Explorer select the Tools > Options menu). (Note: with Windows XP Classic View, click the Windows Start button > Settings > Control Panel).
  2. Click the Advanced button.
  3. Select the option 'Override Automatic Cookie Handling.'
  4. Select the 'Accept' or 'Prompt' option under 'First-party Cookies.'
  5. In the Internet Options window, click OK to exit.

Mozilla Firefox 3.x (PC):

  1. Click Tools > Options.
  2. Click Privacy in the top panel.
  3. Set 'Firefox will': to Use custom settings for history.
  4. Check the box next to 'Accept cookies from sites' to enable cookies
  5. Click OK.

Mozilla Firefox 2.x (PC)

  1. Click Tools > Options.
  2. Click Privacy in the top panel.
  3. Select the checkbox labeled 'Accept cookies from sites.'
  4. Click OK.

Mozilla Firefox (MAC)

  1. Go to the Firefox drop-down menu.
  2. Select Preferences.
  3. Click Privacy.
  4. Set 'Firefox will': to Use custom settings for history.
  5. Check the box next to Accept cookies from sites to enable cookies, or uncheck it to disable them.
  6. Click OK.

Chrome (PC)

  1. Click the Tools menu.
  2. Select Options.
  3. Click the Under the Hood tab.
  4. Click Content settings in the 'Privacy' section.
  5. Make sure Allow local data to be set is selected to allow first-party cookies.

Chrome (Mac)

  1. Select Chrome > Preferences on the menu bar.
  2. Click the Under the Hood tab.
  3. Click Content settings in the 'Privacy' section.
  4. Make sure Allow local data to be set is selected to allow first-party cookies.

Safari

  1. Go to the Safari drop-down menu.
  2. Select Preferences.
  3. Click Security in the top panel.
  4. Under 'Accept Cookies' select the option 'Only from sites you navigate to.'

If you've already checked that your cookies are enabled and you're still seeing an error message, try closing your browser and restarting.

Do you think the Web site is broken?

If you've already checked that your cookies and JavaScript are enabled and you're still seeing an error message, please report the problem by e-mail to the fueleconomy.gov Web team:

fueleconomy@ornl.gov