franksunnn Absent Member.
Absent Member.
3954 views

Why did I meet the " java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver"

Hi All,

I used SQL query  in my testing program.

When I ran the program in my local computer, it worked well.

When I started the execution in Silk Central, I was always told that " java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver"

But I have already configured the Junit Test Properties "classpath" and made the correct path of ojdbc6.jar contained in the classpath.

Is there anything wrong ?

I hope someone could give me advice.

Thx.

To be an automated tester.

0 Likes
5 Replies
maximilianp Absent Member.
Absent Member.

RE: Why did I meet the " java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver"

Hello,
Sounds that there is something wrong with the classpath setting though.

Can you check the "Test Run Results" dialog of your test for any entry like this on the Messages tab:


Please note, that the classpath setting for your test has to match the structure on the execution server (Working directory). So, compare the given classpath against the existing directory structure on the execution server.

regards

-max

0 Likes
franksunnn Absent Member.
Absent Member.

RE: Why did I meet the " java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver"

I omitted a semicolon!

To be an automated tester.

0 Likes
Adam4 Absent Member.
Absent Member.

RE: Why did I meet the " java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver"

Hello Max

I have similar problem, but after run test it is "Not Executed"

I have problem connected to updating actual automated tests or add new one. Test is running properly locally. The .jar file is also updated, but after run it in Silk, Silk can’t find it



ClassNotFoundException: eu.tsystems.mms.tic.vorwerk.order.mainorders.GiftOrderPlTest

Currently I'm are out of ideas how to resolve it

Mabye You have any ideas... ?

regards

Adam

0 Likes
Highlighted
maximilianp Absent Member.
Absent Member.

RE: Why did I meet the " java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver"

Hello,

As mentioned in an earlier post, please check the classpath setting for your JUnit test.

The given classpath must be available on the execution server's filesystem.

I have seen in the screenshot, that you are using a rather old version of Java (1.5.0_45). Please compare against the supported software list of your Silk Central version.

If the problem persists, please do not hesitate to open a support incident to get this resolved.

regards

-max

0 Likes
Adam4 Absent Member.
Absent Member.

RE: Why did I meet the " java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver"

Thank you for answers,

The reason was mistake in one letter in classpath 😉

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.