Configuring MS SQL Server jdbc driver and data source for JBoss EAP 7.2

Discussão em 'StackOverflow' iniciado por Stack, Janeiro 22, 2021.

  1. Stack

    Stack Membro Participativo

    I have previously configured a SQL Server jdbc driver and data source for EAP 7.3, but trying many approaches for 7.2 for the same driver and datasource I get a message similar to a previous question when using the datasource class for EAP 7.2 - but I am specifying the database (not datasource) class. I am working with database drivers that have been installed both as modules an deployments, without success on using them in the datasource. After my initial CLI attempts failed I am trying to (re)install the datasource through the HAL Management Console.

    Like the link above, the logs complain about trying to connect to localhost,

    Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1433 has failed. Error: "Connection refused: connect. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not b
    locked by a firewall.".
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234)
    at com.microsoft.sqlserver.jdbc.SQLServerException.ConvertConnectExceptionToSQLServerException(SQLServerException.java:285)
    at com.microsoft.sqlserver.jdbc.SocketFinder.findSocket(IOBuffer.java:2462)


    when the datasource configuration specifies a remote machine at my company. How can I resolve this? I will go back to the CLI for repeatability and try 7.3 EAP as well - but the localhost issue is strange - so I doubt I will have more success with 7.3. It is also not a firewall issue - I can get to the server with SQL Server Management Studio from the machine.

    One of my seemingly working module configurations for the driver installed as a module is:

    <?xml version='1.0' encoding='UTF-8'?>
    <module xmlns="urn:jboss:module:1.1" name="com.mssql">
    <resources>
    <resource-root path="mssql-jdbc-8.4.1.jre8.jar"/>
    </resources>
    <dependencies>
    <module name="javax.api"/>
    <module name="javax.transaction.api"/>
    </dependencies>
    </module>

    Continue reading...

Compartilhe esta Página