I created a spring mvc application to connect with sqlserver database. I used jtds driver for connection.
<beans:bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<beans:property name="driverClassName" value="net.sourceforge.jtds.jdbc.Driver" />
<beans:property name="url"
value="jdbc:jtds:sqlserver://localhost:1433;databaseName=3PLTest;" />
<beans:property name="username" value="sa" />
<beans:property name="password" value="sa" />
</beans:bean>
When i am trying to run the server it gives the error.
ERROR: org.hibernate.engine.jdbc.spi.SqlExceptionHelper - Cannot create PoolableConnectionFactory (Network error IOException: Connection refused: connect)
Nov 03, 2014 10:33:46 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [appServlet] in context with path [/warehouse] threw exception [Request processing failed; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Could not open connection] with root cause
java.net.ConnectException: Connection refused: connect
I am using SQLEXPRESS. How does this happen?