0

I am getting below error while creating data-source to a database in weblogic server 12.

Error Cannot load driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
devwebcl
  • 2,866
  • 3
  • 27
  • 46
trz
  • 9
  • 3
  • Why are you using a SQL Server driver if you're connecting to an Oracle database; or if you are using SQL Server why have you tagged Oracle 12c (which is for the Oracle *database*, not WebLogic)? Anyway... look at your code to check which driver you're trying to use, and your CLASSPATH (maybe in your WLS start-up script) to check that is included. – Alex Poole Jan 17 '23 at 12:35
  • I am using MS-Sql-Server as my db, it worked with correct jar file. thanks – trz Jan 18 '23 at 07:29

1 Answers1

0

Weblogic comes with it's own driver for sql server, weblogic.jdbc.sqlserver.SQLServerDriver which is available in the classpath. An example jdbc url for connecting using that driver is jdbc:weblogic:sqlserver://SBNSWDV63\\SSQLDV03:1433;allowPortWithNamedInstance=true

If you want to use the microsoft driver, you have to make sure the jar file containing that driver is copied to your <domain_home>/lib folder, so it's visible to weblogic.

httPants
  • 1,832
  • 1
  • 11
  • 13
  • Can you post the complete statck trace and the exact version of WebLogic server you are using. Configuration steps are a bit different from a version to another. – Emmanuel Collin Jan 18 '23 at 06:56
  • it worked once I added the sqljdbc42.jar jar file to DefaultDomain/osb as well . – trz Jan 18 '23 at 07:06