Software⏱️ 2 min read📅 2026-05-31

How to Fix: Missing artifact com.microsoft.sqlserver:sqljdbc4:jar:4.0

The issue is likely due to the Microsoft SQL Server JDBC driver not being available in the Maven repository. Try using the correct artifactId, which is sqljdbc41 or sqljdbc47 for SQL Server 2008 and later versions.

Quick Answer: Use the correct artifactId, such as sqljdbc41 or sqljdbc47, instead of sqljdbc4.

The issue you're experiencing is due to the incorrect namespace for the SQL Server JDBC driver. The correct namespace should be 'com.microsoft.sqlserver.jdbc' instead of 'com.microsoft.sqlserver'. This change was made in version 4.2 of the driver.

🔧 Proven Troubleshooting Steps

Method 1: Update Your Dependency

  1. Step 1: Open your POM.xml file and update the 'artifactId' to 'sqljdbc47'. This change will ensure that you're using the correct version of the driver.

🔧 Proven Troubleshooting Steps

Method 2: Check for Dependencies

  1. Step 1: Make sure you have the 'sqljdbc47' dependency in your POM.xml file. If not, add it to your project.

✨ Wrapping Up

By following these steps, you should be able to resolve the 'Missing artifact com.microsoft.sqlserver:sqljdbc4:jar:4.0' issue and successfully add the MS SQL driver dependency in your POM.xml file.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions