Service Virtualization

  • 1.  Getting java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

    Posted May 20, 2018 10:42 PM

    I'm getting the error java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver.  Others in my team can run the same test but I keep getting this error.  We thought I must be missing a .jar file but have compared my files to those of someone that can run the test and I have all the .jar files that they have.  It has been suggested that I should try reinstalling LISA but thought I'd see if there are any other ideas here first.

     

    The complete error is below:

    ============================================================================
    | Unable to execute JDBCNode.
    ============================================================================
    | Step:        Query Database to Get SMS Code
    ----------------------------------------------------------------------------
    | Message:     oracle.jdbc.driver.OracleDriver
    ----------------------------------------------------------------------------
    | Trapped Exception: oracle.jdbc.driver.OracleDriver
    | Trapped Message:   java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    ----------------------------------------------------------------------------
    STACK TRACE
    java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
     at java.net.URLClassLoader$1.run(Unknown Source)
     at java.net.URLClassLoader$1.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at java.lang.ClassLoader.loadClass(Unknown Source)
     at com.itko.lisa.jdbc.JDBCNode.getConnection(JDBCNode.java:610)
     at com.itko.lisa.jdbc.JDBCNode.executeSQL(JDBCNode.java:370)
     at com.itko.lisa.jdbc.JDBCNode.execute(JDBCNode.java:341)
     at com.itko.lisa.test.TestNode.executeNode(TestNode.java:993)
     at com.itko.lisa.test.TestCase.execute(TestCase.java:1160)
     at com.itko.lisa.test.TestCase.execute(TestCase.java:1075)
     at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1060)
     at com.itko.lisa.utils.ExecSubProcessNode.doFullExec(ExecSubProcessNode.java:314)
     at com.itko.lisa.utils.ExecSubProcessNode.execute(ExecSubProcessNode.java:233)
     at com.itko.lisa.test.TestNode.executeNode(TestNode.java:993)
     at com.itko.lisa.test.TestCase.execute(TestCase.java:1160)
     at com.itko.lisa.test.TestCase.execute(TestCase.java:1075)
     at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1060)
     at com.itko.lisa.editor.WalkThruPanel.prepAndExecNode(WalkThruPanel.java:1047)
     at com.itko.lisa.editor.WalkThruPanel.access$900(WalkThruPanel.java:68)
     at com.itko.lisa.editor.WalkThruPanel$10.doCallback(WalkThruPanel.java:960)
     at com.itko.util.swing.panels.ProcessingDialog$2.run(ProcessingDialog.java:194)
     at java.lang.Thread.run(Unknown Source)
    ============================================================================



  • 2.  Re: Getting java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

    Broadcom Employee
    Posted May 21, 2018 11:53 AM

    Hi Tina,

     

    I doubt reinstalling will solve this.  There's got to be a simple solution.

     

    Although you compared JAR files to those of your teammates, my gut says you overlooked something.  This is a symptom of LISA not being able to find the Oracle JDBC driver.

     

    Look at a teammates LISA installation and check out both "hotDeploy" and "lib" folders.  They'll have the driver JAR in one of those two locations.  Copy it to your installation and things should start working.

     

    --Mike



  • 3.  Re: Getting java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

    Posted May 21, 2018 09:54 PM

    Thanks Mike. Someone else also checked through the folders and found that

    I had all the .jar files that someone that can run the test had. I just

    did it again to make sure, this time actually printing out a screen shot

    of the folders and ticking off each jar file - they definitely all match.



  • 4.  Re: Getting java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

    Broadcom Employee
    Posted May 21, 2018 08:56 PM

    Hi Tina,

            Error says, it is missing oracle driver jar file in your class path. Devtest by default includes oracle driver jar file (ojdbc****.jar) in <devtest_home>/shared folder. Please share the version of devtest you are using and just check the LISA_HOME details in your log file (if you are getting this error on workstation, just check workstation.log file). If you have defined any LISA_HOME in your environment variable and if there is no oracle driver jar file exists, you may get this error. 

            Please verify the logs and check, whether it is loading oracle driver jar during the component startup. 

     

    Thanks & Regards

    Srikanth Gajawada



  • 5.  Re: Getting java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver

    Posted May 21, 2018 09:54 PM

    I'm actually using Lisa 7.5.1.