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. ,
    Expert tip

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

  2. ,
    Expert tip

    Check if you have started your server, or if your server is set to listen to the port you're trying to connect and is waiting to accept connections and check if the firewall isn't blocking your connection.

Solutions on the web

via Stack Overflow by the beest
, 1 year ago
Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
via Stack Overflow by James111
, 1 year ago
Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
via Stack Overflow by Syed Taukir Alam
, 1 year ago
Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
via Stack Overflow by El Dude
, 4 months ago
Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
via Stack Overflow by Zveratko
, 1 month ago
Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
via Stack Overflow by Virat Puar
, 2 years ago
Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
java.net.ConnectException: Connection refused: 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 com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:211)	at com.mysql.jdbc.MysqlIO.(MysqlIO.java:298)	at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2253)	at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2286)	at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2085)	at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:795)	at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:44)	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)	at java.lang.reflect.Constructor.newInstance(Constructor.java:422)	at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)	at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:400)	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:327)	at com.p6spy.engine.spy.P6SpyDriver.connect(P6SpyDriver.java:98)	at org.hibernate.engine.jdbc.connections.internal.DriverConnectionCreator.makeConnection(DriverConnectionCreator.java:38)	at org.hibernate.engine.jdbc.connections.internal.BasicConnectionCreator.createConnection(BasicConnectionCreator.java:58)	at org.hibernate.engine.jdbc.connections.internal.PooledConnections.addConnections(PooledConnections.java:106)	at org.hibernate.engine.jdbc.connections.internal.PooledConnections.(PooledConnections.java:40)	at org.hibernate.engine.jdbc.connections.internal.PooledConnections.(PooledConnections.java:19)	at org.hibernate.engine.jdbc.connections.internal.PooledConnections$Builder.build(PooledConnections.java:138)	at org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl.buildPool(DriverManagerConnectionProviderImpl.java:110)	at org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl.configure(DriverManagerConnectionProviderImpl.java:74)	at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:94)	at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:217)	at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:189)	at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.buildJdbcConnectionAccess(JdbcEnvironmentInitiator.java:145)	at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:66)	at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)	at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:88)	at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:234)	at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:208)	at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:189)	at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:51)	at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:94)	at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:217)	at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:189)	at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.handleTypes(MetadataBuildingProcess.java:352)	at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:111)	at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.build(MetadataBuildingProcess.java:83)	at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:418)	at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:87)	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:692)	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:724)	at org.pollinator.utilities.HibernateUtils.(HibernateUtils.java:24)	at org.pollinator.ApplicationConfig.(ApplicationConfig.java:63)	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)	at java.lang.reflect.Constructor.newInstance(Constructor.java:422)	at java.lang.Class.newInstance(Class.java:442)	at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:119)	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4733)	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5251)	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:587)	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1798)	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)	at java.util.concurrent.FutureTask.run(FutureTask.java:266)	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)	at java.lang.Thread.run(Thread.java:745)