Wednesday, June 27, 2012

Solving Cannot Load Driver Class: In JDeveloper 11g

As last post discussed about how to configure JDeveloper to connect MSSQL Server, it is not enough to run your jsf pages.
To run jsf pages, Integrated WebLogic Server needs to look your sqljdbc4.jar location.
Unless you specify the jar location, you would get "Cannot Load Driver Class:".

Platform - Windows 7 x86 Enterprise
JDeveloper -
Weblogic -
MSSQL Server 2008 Database

You can do in 3 ways either -
1. By defining Classpath in machine.
 a. In your machine set CLASSPATH variable to pointing the saved jar location.


 b. Click New button in System Variables area & follow screenshot.


 c. Click OK to close the dialogs.
 d. Now, upon starting, integratedwls will able to look jar file.

2. By defining jar location in startWeblogic.cmd in IntegratedWLS.
 a.Navigate to C:\Users\ralam\AppData\Roaming\JDeveloper\system11.\DefaultDomain\bin .

 b.Open startWebLogic.cmd file & look for "set SAVE_CLASSPATH"(without quotes) or "set
    CLASSPATH" (without quotes) entry.

 c.Put in any entry your jar file location & close to save the file, like this -


3. The last way is to save your jar file at this location in Integrated WLS installation folder -