Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

  1. ,

    Make sure your server started correctly and is listening correctly on the correct port.

  2. ,
    Expert tip

    Firewall might be blocking your connection, or MySQL it's not running on your server machine.

Solutions on the web

via Stack Overflow by aurelius
, 1 year ago
java.net.ConnectException: Connection refused: connect	at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)	at java.net.Socket.connect(Socket.java:579)	at org.h2.util.NetUtils.createSocket(NetUtils.java:123)	at org.h2.util.NetUtils.createSocket(NetUtils.java:103)	at org.h2.engine.SessionRemote.initTransfer(SessionRemote.java:100)	at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:434)	at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:315)	at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:107)	at org.h2.jdbc.JdbcConnection.(JdbcConnection.java:91)	at org.h2.Driver.connect(Driver.java:74)	at org.hibernate.engine.jdbc.connections.internal.DriverConnectionCreator.makeConnection(DriverConnectionCreator.java:55)	at org.hibernate.engine.jdbc.connections.internal.DriverConnectionCreator.makeConnection(DriverConnectionCreator.java:58)	at org.hibernate.engine.jdbc.connections.internal.BasicConnectionCreator.createConnection(BasicConnectionCreator.java:75)	at org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl.configure(DriverManagerConnectionProviderImpl.java:106)	at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111)	at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234)	at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206)	at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.buildJdbcConnectionAccess(JdbcServicesImpl.java:260)	at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:94)	at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111)	at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234)	at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206)	at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1887)	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1845)	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1930)	at com.wkfsfrc.drools.dummy.runtimeload.HibernateUtil.buildSessionFactory(HibernateUtil.java:13)	at com.wkfsfrc.drools.dummy.runtimeload.HibernateUtil.buildSessionFactory(HibernateUtil.java:18)	at com.wkfsfrc.drools.dummy.runtimeload.HibernateUtil.(HibernateUtil.java:9)	at com.wkfsfrc.drools.dummy.runtimedataload.RuntimeDataLoadTest.(RuntimeDataLoadTest.java:25)	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)	at org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:217)	at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:266)	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)	at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:263)	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74)	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211)	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)