Unable to connect to MS SQL DB on Microsoft cloud

Hello Everyone

We are trying to connect to Microsoft SQL database which is on Microsoft cloud.

Host on which integration server and JDBC adapter is installed is: TESTWMIS101 (TESTWMIS101.rb.local)

Adapter Connection Properties:

Transaction Type NO_TRANSACTION
DataSource Class com.microsoft.sqlserver.jdbc.SQLServerDataSource
serverName rdbx-bi.database.windows.net
user esb-user
password ******
databaseName tesdashboard
portNumber 1433

we are getting the below error

2019-08-29 06:04:29 CDT [ART.0114.1007E] Adapter Runtime: Error Logged. See Error log for details. Error: [ADA.1.204] Cannot connect to the database with DataSource class “com.microsoft.sqlserver.jdbc.SQLServerDataSource”.
Cannot open server “TESTWMIS101” requested by the login. The login failed.

I have no issues in connecting to this database from the server (TESTWMIS101) using Microsoft SQL Server Management Studio or Oracle SQL Developer
I have other adapter connections defined to connect to MS SQL database. They are working fine. This confirms the drivers are in place.

Please help

Regards,
Ravi

Suggest you to enable server logger and set log level to TRACE for following subsystems:

  1. all Adapter Runtime
  2. JDBC Adapter

Then share the server.log and error.log(with stacktrace enabled). Just providing a line of error from IS server log will not help to diagnose the issue further.

HI Mike,

Thank you for your quick suggestion.

Admin Page–> Settings–> Logging–>Default–>Integration Server
0114 Adapter Runtime – Trace
0115 Adapter Runtime (Listener) – Trace
0116 Adapter Runtime (Notification) – Trace
0117 Adapter Runtime (Adapter Service) – Trace
0118 Adapter Runtime (Connection) – Trace
Admin Page–> Settings–> Logging–>Default–>Adapters
0001 JDBCAdapter – Trace

Here is what I see in the server log after setting logging to TRACE.

2019-08-30 00:42:22 CDT [ART.0114.1500D] Adapter Runtime: com.wm.adapter.wmjdbc.JDBCAdapter.getAdapterOnlineHelp() Started.
2019-08-30 00:42:22 CDT [ART.0114.1501T] Adapter Runtime: com.wm.adapter.wmjdbc.JDBCAdapter.getAdapterOnlineHelp() Completed.
2019-08-30 00:42:22 CDT [ART.0114.1500D] Adapter Runtime: com.wm.adapter.wmjdbc.JDBCAdapter.getAdapterDisplayName() Started.
2019-08-30 00:42:22 CDT [ART.0114.1501T] Adapter Runtime: com.wm.adapter.wmjdbc.JDBCAdapter.getAdapterDisplayName() Completed.
2019-08-30 00:42:22 CDT [ART.0114.1500D] Adapter Runtime: com.wm.adapter.wmjdbc.JDBCAdapter.getAdapterVendorName() Started.
2019-08-30 00:42:22 CDT [ART.0114.1501T] Adapter Runtime: com.wm.adapter.wmjdbc.JDBCAdapter.getAdapterVendorName() Completed.
2019-08-30 00:42:22 CDT [ART.0114.1500D] Adapter Runtime: com.wm.adapter.wmjdbc.JDBCAdapter.getAdapterDisplayName() Started.
2019-08-30 00:42:22 CDT [ART.0114.1501T] Adapter Runtime: com.wm.adapter.wmjdbc.JDBCAdapter.getAdapterDisplayName() Completed.
2019-08-30 00:42:22 CDT [ART.0114.1500D] Adapter Runtime: com.wm.adapter.wmjdbc.JDBCAdapter.getAdapterDescription() Started.
2019-08-30 00:42:22 CDT [ART.0114.1501T] Adapter Runtime: com.wm.adapter.wmjdbc.JDBCAdapter.getAdapterDescription() Completed.
2019-08-30 00:42:22 CDT [ART.0118.5523T] Adapter Runtime (Connection): Received ENABLE event for connection callback for Node: MSBIBYOD_JDBCAdapter.AdapterConnections:BYOD.
2019-08-30 00:42:22 CDT [ART.0118.5505D] Adapter Runtime (Connection): Starting connection MSBIBYOD_JDBCAdapter.AdapterConnections:BYOD.
2019-08-30 00:42:22 CDT [ART.0118.5505D] Adapter Runtime (Connection): Starting connection MSBIBYOD_JDBCAdapter.AdapterConnections:BYOD.
2019-08-30 00:42:22 CDT [ART.0118.5517D] Adapter Runtime (Connection): Creating connection manager properties: >>>BasicData:poolable=false,minimumPoolSize=1,maximumPoolSize=1,poolIncrementSize=1,blockingTimeout=0,expireTimeout=300000,selectionSize=0,poolOnCommit=true<<<.
2019-08-30 00:42:22 CDT [SCC.0126.0200I] SCC ConnectionManager pool MSBIBYOD_JDBCAdapter.AdapterConnections:BYOD started
2019-08-30 00:42:22 CDT [ART.0114.1500D] Adapter Runtime: com.wm.adapter.wmjdbc.JDBCAdapter.fillResourceAdapterMetadataInfo() Started.
2019-08-30 00:42:22 CDT [ART.0114.1500D] Adapter Runtime: com.wm.adapter.wmjdbc.JDBCAdapter.getAdapterDescription() Started.
2019-08-30 00:42:22 CDT [ART.0114.1501T] Adapter Runtime: com.wm.adapter.wmjdbc.JDBCAdapter.getAdapterDescription() Completed.
2019-08-30 00:42:22 CDT [ART.0114.1500D] Adapter Runtime: com.wm.adapter.wmjdbc.JDBCAdapter.getAdapterVendorName() Started.
2019-08-30 00:42:22 CDT [ART.0114.1501T] Adapter Runtime: com.wm.adapter.wmjdbc.JDBCAdapter.getAdapterVendorName() Completed.
2019-08-30 00:42:22 CDT [ART.0114.1501T] Adapter Runtime: com.wm.adapter.wmjdbc.JDBCAdapter.fillResourceAdapterMetadataInfo() Completed.
2019-08-30 00:42:36 CDT [ADA.0001.0113T] Received SQLException: "
(S0001/40532) Cannot open server “TESTWMIS101” requested by the login. The login failed."
2019-08-30 00:42:36 CDT [ART.0114.1007E] Adapter Runtime: Error Logged. See Error log for details. Error: [ADA.1.204] Cannot connect to the database with DataSource class “com.microsoft.sqlserver.jdbc.SQLServerDataSource”.
Cannot open server “TESTWMIS101” requested by the login. The login failed.

Regards,
Ravi

Hi Ravi,

Please kindly share the error.log for that period of time. If you output the error logger to file, it would be contained in WMERROR_XXXX.log, otherwise it will be in WMERROR table in DB. Alternatively you may load the IS Admin UI and go to the page that display the error log. Then filter the time, and make sure you’ve select “Expand stacktrace xxxx” before you hit the submit button.

The stacktrace will contain important information on what has caused the real issue.

Hi Mike,

---------------------------------- Beginning of Current Log ----------------------------------
TimeStamp:2019-08-30 00:42:36 CDT
ServiceName: wm.art.admin.connection:setResourceState

Error Message: Cannot open server “TESTWMIS101” requested by the login. The login failed.

Stack Trace:
com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open server “TESTWMIS101” requested by the login. The login failed.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:197)
at com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:246)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:83)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:2529)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:1905)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)
at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:1893)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1400)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1045)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:817)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:700)
at com.microsoft.sqlserver.jdbc.SQLServerDataSource.getConnectionInternal(SQLServerDataSource.java:593)
at com.microsoft.sqlserver.jdbc.SQLServerDataSource.getConnection(SQLServerDataSource.java:57)
at com.wm.adapter.wmjdbc.connection.JDBCConnection.initializeConnection(JDBCConnection.java:312)
at com.wm.adk.connection.WmManagedConnectionFactory.createManagedConnection(WmManagedConnectionFactory.java:210)
at com.wm.pkg.art.ns.ConnectionDataNode.createAndStartConnectionResource(ConnectionDataNode.java:991)
at com.wm.pkg.art.ns.ConnectionDataNode.enable(ConnectionDataNode.java:753)
at com.wm.pkg.art.ns.ConnectionDataNodeManager.setConnectionState(ConnectionDataNodeManager.java:1308)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
…

Root Context
22d8f710-8b53-1e24-a287-ffffffc6052d

Parent Context: NULL
Current Context: 22d8f710-8b53-1e24-a287-ffffffc6052d

TimeStamp: 2019-08-30 00:42:36 CDT
ServiceName: wm.art.admin.connection:setResourceState

Error Message:
[ADA.1.204] Cannot connect to the database with DataSource class “com.microsoft.sqlserver.jdbc.SQLServerDataSource”.
Cannot open server “TESTWMIS101” requested by the login. The login failed.

Stack Trace:

BasicData:errorResourceBundleName=com.wm.adapter.wmjdbc.JDBCAdapterResourceBundle,errorMessageArgs=[0]com.microsoft.sqlserver.jdbc.SQLServerDataSource,[1]
(S0001/40532) Cannot open server “TESTWMIS101” requested by the login. The login failed.,errorCode=204,pipeline=null,stack=com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open server “TESTWMIS101” requested by the login. The login failed.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:197)
at com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:246)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:83)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:2529)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:1905)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)
at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:1893)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1400)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1045)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:817)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:700)
at com.microsoft.sqlserver.jdbc.SQLServerDataSource.getConnectionInternal(SQLServerDataSource.java:593)
at com.microsoft.sqlserver.jdbc.SQLServerDataSource.getConnection(SQLServerDataSource.java:57)
at com.wm.adapter.wmjdbc.connection.JDBCConnection.initializeConnection(JDBCConnection.java:312)
at com.wm.adk.connection.WmManagedConnectionFactory.createManagedConnection(WmManagedConnectionFactory.java:210)
at com.wm.pkg.art.ns.ConnectionDataNode.createAndStartConnectionResou…
Parent Context: 22d8f710-8b53-1e24-a287-ffffffc6052d
Parent Context: NULL 22d8f710-8b53-1e24-a287-ffffffc6052d
2019-08-30 00:42:36 CDT wm.art.admin.connection:setResourceState

[ART.118.5042] Adapter Runtime (Connection): Unable to enable connection resource MSBIBYOD_JDBCAdapter.AdapterConnections:BYOD.
[ART.118.5063] Adapter Runtime (Connection): Unable to start connection MSBIBYOD_JDBCAdapter.AdapterConnections:BYOD: after 1 attempt(s).
[ADA.1.204] Cannot connect to the database with DataSource class “com.microsoft.sqlserver.jdbc.SQLServerDataSource”.
Cannot open server “TESTWMIS101” requested by the login. The login failed.
Caused by: com.wm.pkg.art.error.DetailedException: [ART.118.5063] Adapter Runtime (Connection): Unable to start connection MSBIBYOD_JDBCAdapter.AdapterConnections:BYOD: after 1 attempt(s).
[ADA.1.204] Cannot connect to the database with DataSource class “com.microsoft.sqlserver.jdbc.SQLServerDataSource”.
Cannot open server “TESTWMIS101” requested by the login. The login failed.

com.wm.pkg.art.error.DetailedException: [ART.118.5063] Adapter Runtime (Connection): Unable to start connection MSBIBYOD_JDBCAdapter.AdapterConnections:BYOD: after 1 attempt(s).
[ADA.1.204] Cannot connect to the database with DataSource class “com.microsoft.sqlserver.jdbc.SQLServerDataSource”.
Cannot open server “TESTWMIS101” requested by the login. The login failed.
at com.wm.pkg.art.ns.ConnectionDataNode.createAndStartConnectionResource(ConnectionDataNode.java:1050)
at com.wm.pkg.art.ns.ConnectionDataNode.enable(ConnectionDataNode.java:753)
at com.wm.pkg.art.ns.ConnectionDataNodeManager.setConnectionState(ConnectionDataNodeManager.java:1308)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:406)
at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:650)
at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:39)
at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:49)
at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:243)
at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:49)
at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:171)
at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:303)
at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:34)
at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:377)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:549)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:386)
at com.wm.app.b2b.server.ServiceManager.invoke(Serv…
22d8f710-8b53-1e24-a287-ffffffc6052d NULL 22d8f710-8b53-1e24-a287-ffffffc6052d
2019-08-30 00:42:36 CDT wm.art.admin.connection:setResourceState
wm.art.admin.connection:setResourceState

[ART.118.5042] Adapter Runtime (Connection): Unable to enable connection resource MSBIBYOD_JDBCAdapter.AdapterConnections:BYOD.
[ART.118.5063] Adapter Runtime (Connection): Unable to start connection MSBIBYOD_JDBCAdapter.AdapterConnections:BYOD: after 1 attempt(s).
[ADA.1.204] Cannot connect to the database with DataSource class “com.microsoft.sqlserver.jdbc.SQLServerDataSource”.
Cannot open server “TESTWMIS101” requested by the login. The login failed.
Caused by: com.wm.pkg.art.error.DetailedException: [ART.118.5063] Adapter Runtime (Connection): Unable to start connection MSBIBYOD_JDBCAdapter.AdapterConnections:BYOD: after 1 attempt(s).
[ADA.1.204] Cannot connect to the database with DataSource class “com.microsoft.sqlserver.jdbc.SQLServerDataSource”.
Cannot open server “TESTWMIS101” requested by the login. The login failed.

com.wm.pkg.art.error.DetailedException: [ART.118.5063] Adapter Runtime (Connection): Unable to start connection MSBIBYOD_JDBCAdapter.AdapterConnections:BYOD: after 1 attempt(s).
[ADA.1.204] Cannot connect to the database with DataSource class “com.microsoft.sqlserver.jdbc.SQLServerDataSource”.
Cannot open server “TESTWMIS101” requested by the login. The login failed.
at com.wm.pkg.art.ns.ConnectionDataNode.createAndStartConnectionResource(ConnectionDataNode.java:1050)
at com.wm.pkg.art.ns.ConnectionDataNode.enable(ConnectionDataNode.java:753)
at com.wm.pkg.art.ns.ConnectionDataNodeManager.setConnectionState(ConnectionDataNodeManager.java:1308)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:406)
at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:650)
at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:39)
at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:49)
at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:243)
at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:49)
at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:171)
at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:303)
at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:34)
at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:377)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:549)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:386)
at com.wm.app.b2b.server.ServiceManager.invoke(Serv…
22d8f710-8b53-1e24-a287-ffffffc6052d NULL 22d8f710-8b53-1e24-a287-ffffffc6052d

Check https://social.msdn.microsoft.com/Forums/vstudio/en-US/79919cbf-f7c7-4658-8037-13580e0ee2ec/cannot-connect-to-sql-azure-server-data-using-management-studio-or-odbc?forum=ssdsgetstarted

What server name are you using to connect to the SQL Azure server?

The correct one you can find on the Azure Portal under the SQL Azure Server section (or under Server in the SQL Azure management web interface).

The server name should be in the form: [SERVER_NAME].database.windows.net

Furthermore, be sure you are using the correct username: [USERNAME]@[SERVER_NAME]

For example, if your SQL Azure server name is myname, and you user name is Alex you have to use:

server: myname.database.windows.net

username: Alex@myname

password: [YOUR PASSWORD]

The SQL Azure management web interface allows you to login by using only [USERNAME] but SQL Server Management Studio does not.

Let us know if this helps.

Hey Ravi

I did a telnet on your SQL server on port 1433 and found NO ISSUES w.r.t its accessibility.

telnet rdbx-bi.database.windows.net 1433
Trying 104.42.238.205...
Connected to rdbx-bi.database.windows.net.
Escape character is '^]'.

So, it seems the issue is with authentication only? How are you authentication from your SQL Management Studio?

  • Is it SQL Authentication (Username/ Password)? or
  • Windows Login/ Azure Active Directory Authentication?

Hi Mahesh/Mike/Prasad

Thanks for your responses and sorry for not responding quickly.

I am not using windows authentication. I am using user/pass. It connected without any issues from Oracle SQL Developer as well as MS SQL Server Management Studio.

The issue seems to be with the sqljdbc driver we are using.

I tried connecting to the database using the below java code with the existing sqljdbc driver that we have in our integration server lib.

import java.sql.;
import com.microsoft.sqlserver.jdbc.
;

public class ConnectDS {

public static void main(String[] args) {

	// Declare the JDBC objects.
	Connection con = null;
	CallableStatement cstmt = null;
	ResultSet rs = null;

	try {
		// Establish the connection.
		SQLServerDataSource ds = new SQLServerDataSource();
		ds.setURL("jdbc:sqlserver://hostname;" + "databaseName=MWSDB;integratedSecurity=false");
		ds.setUser("myuser");
		ds.setPassword("mypass");			
		javax.sql.DataSource ds1 = ds;
		con = ds1.getConnection();

	}

	// Handle any errors that may have occurred.
	catch (Exception e) {
		e.printStackTrace();
	} finally {
		if (rs != null)
			try {
				rs.close();
			} catch (Exception e) {
			}
		if (cstmt != null)
			try {
				cstmt.close();
			} catch (Exception e) {
			}
		if (con != null)
			try {
				con.close();
			} catch (Exception e) {
			}
		System.exit(1);
	}
}

}

It gave the same error that I got when tried to enable Adapter connection.
Cannot connect to the database with DataSource class “com.microsoft.sqlserver.jdbc.SQLServerDataSource”.
Cannot open server “TESTWMIS101” requested by the login. The login failed.

Downloaded Microsoft JDBC Driver 4.2 (jre8) for SQL Server from https://docs.microsoft.com/en-us/sql/connect/jdbc/download-microsoft-jdbc-driver-for-sql-server?view=sql-server-2017

With this jar, I am able to connect to the database using the above java code. I tried with all the versions of jars from the above link. All of them worked without any issues using the above java code.

This shows that the issue is potentially with the old jar that I have.

I replaced the old jar with the new one (which worked with the java code one ofter the other) in D:\SoftwareAG\IntegrationServer\lib\jars and restarted the IS.

The IS never started successfully. Please check the attached server logs. The server is creating huge crash dumps like hs_err_pid28820.mdmp in D:\SoftwareAG\IntegrationServer\instances\default. I cant attach them here.

Started IS at 2019-09-01 06:36:48 CDT.
I was never able to open IS admin page. I had to go to Windows services and stop the SAG IS windows service at 2019-09-01 06:45:42 CDT
Please see the attached Server log for details.
Note: Our integration server core database is also a Microsoft SQL server to which the IS is able to connect with the old jar (sqljdbc4.jar).
I am not sure if the new driver is causing any issue for the IS to connect to core DB. I am able to connect to our code db using your java code with the new driver as well as the old driver.
Please check the logs between 2019-09-01 06:36:48 CDT. and 2019-09-01 06:45:42 CDT if they are indicating something.

Please shed some light.

Regards,
Ravi
hs_err_pid.zip (134 KB)
Server and FailedAudit Log.zip (2.21 MB)

I remembered that is a kb article in Empower that describes the SQL server drivers and the version of SQL Server including Azure SQL Server it supports.

Can you do a quick check in Empower kb search and see if your SQL Server is connected using the right SQL Server JDBC driver?

1 Like

Hi Mike,

Thank you for your suggestion. The issue is now resolved. The issue for IS not being able to start is, there are multiple JDBC adapter connections defined on the IS, some of which are using windows authentication (integratedSecurity=true) and others using user/pass. The ones which are using windows authentication require appropriate dll corresponding to the sqljdbc jar. that we are using to be placed in C:\Windows\System32 directory. I missed doing this. You get this dll along with the jar from microsoft website (https://docs.microsoft.com/en-us/sql/connect/jdbc/download-microsoft-jdbc-driver-for-sql-server?view=sql-server-2017).

Thanks everyone for your time.

Regards
Ravi

OK perfect:)

Thanks for sharing the final resolution info

Cheers!
RMG