How to fix com.microsoft.sqlserver driver issues?

Solution Verified - Updated -

Environment

  • Red Hat JBoss Fuse
    • 6.2.0

Issue

  • Failure to find com.microsoft.sqlserver:sqljdbc4:jar:4.0
  • I am trying to test on my local Windows desktop and tyring to Connect to Remote Microsoft SQL Server.
  • Error stack trace:
Failed to execute goal on project payroll: Could not resolve dependencies for project xx.yy.zzz:bundle:1.0.0-SNAPSHOT: Failure to find com.microsoft.sqlserver:sqljdbc4:jar:4.0 in http://repo.fusesource.com/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of fusesource has elapsed or updates are forced -> [Help 1]
[ERROR]

Resolution

  • The issue clearly says Driver jar is not available in configured maven repositories ,as microsoft is not opensource it cont be available in maven to freely downlohavead
  • Have Driver jar available in local file system and add to to maven repo
  • please refer below link on how to install third party jars to maven [1]
    1.https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html

  • And wrap driver jar as osgi before installing the bundle

osgi:install -s wrap:file:/DriverJar

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.