Boa noite
Como me conecto no sql server 2008 ? ja tenho configurado no banco o modo de autenticação ‘‘AUTENTICAÇÃO do SQL SERVER’’
O driver q utilizo é o JTDS no qual esta dentro e adicionado ao projeto, porem recebo a exceção:
type Exception report
message
descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: Cannot open connection
root cause
javax.faces.el.EvaluationException: javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: Cannot open connection
root cause
javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: Cannot open connection
root cause
org.hibernate.exception.JDBCConnectionException: Cannot open connection
root cause
java.sql.SQLException: Network error IOException: Connection refused: connect
root cause
java.net.ConnectException: Connection refused: connect
Meu persistence.xml:
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.SQLServer2008Dialect"/>
<property name="hibernate.hbm2ddl.auto" value="update" />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.format_sql" value="true"/>
<property name="hibernate.connection.driver_class" value="net.sourceforge.jtds.jdbc.Driver" />
<property name="javax.persistence.jdbc.url" value="jdbc:jtds:sqlserver://ipDaMaquina:1433/baseDeDados"/>
<property name="javax.persistence.jdbc.user" value="sa" />
<property name="javax.persistence.jdbc.password" value="root" />
</properties>
Encontrei algumas pessoas com esse mesmo problema aqui no guj mas não me ajudou, continua dando o mesmo erro.
Alguem pode dar uma força ?