If you are connecting a Java application to a SQL Server database, which is up and running, but your connection fails with the following error:
Could not acquire a connection from DataSource – Cannot create PoolableConnectionFactory
The error is most likely that the windows service “SQL Server Browser” is disabled.
To fix the problem:
- Start -> Control Panel -> Systems & Security -> Administrative tools -> Services
- SQL Server Browser -> right click -> properties
- Set Startup type to “Automatic”
- Apply -> Start
Now you should be able to connect to SQL Server from your Java application!