Skip to content

[Bug] NoSuchMethodError (ConfidentialClientApplication$Builder.executorService): mssql-jdbc + msal4j (since v1.15.0) #806

@gavvvr

Description

@gavvvr

Library version used

1.15.0

Java version

17.0.6

Scenario

Other - please specify

Is this a new or an existing app?

None

Issue description and reproduction steps

There is Java app connecting to MSSQL db over something called "Microsoft Entra".
After an update of msal4j from v1.14.x to v1.15.0, there the jdbc driver throws NoSuchMethodError while authenticating.

I reproduced the problem with a the below minimal code snippet

Relevant code snippets

dependencies {
    implementation("com.microsoft.sqlserver:mssql-jdbc:12.6.1.jre11")
    implementation("com.microsoft.azure:msal4j:1.15.0") // <-- the previous 1.14.3 worked well
    implementation("org.slf4j:slf4j-simple:2.0.12")
}
import com.microsoft.sqlserver.jdbc.SQLServerDataSource

fun main() {
    Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
    val ds = SQLServerDataSource()
    ds.url = "jdbc:sqlserver://ms-sql-server-host:1433;database=some-db;Authentication=ActiveDirectoryServicePrincipal"
    ds.user = "?"
    ds.setPassword("?")
    val con = ds.getConnection()
    con.close()
}

Expected behavior

No breaking change expected on minor version upgrade.

Identity provider

Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)

Regression

1.14.3

Solution and workarounds

Not to upgrade to msal4j v1.15.0 and ignore it by Renovate bot

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working, needs an investigation and a fixP1High priority items, should be done before any other workconfidential-clientFor issues related to confidential client apps

    Type

    No type

    Projects

    Status

    Done (in PR or next release)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions