Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

SOATEST: Not able to connect to database while using Oracle 12.2 JDBC drivers

Testuser
Testuser Posts: 41
edited January 2018 in SOAtest

I have been using Parasoft SOATEST 9.9 and was using it to develop and run my web services tests against our server(which uses Oracle 11g drivers). Recently our servers got updated to use the Oracle 12c drivers(12.2.0.1) and I replaced my earlier oracle.jar , in the Parasoft workspace to 'ojdbc8-12.2.0.1.jar' ( I renamed it to 'ojdbc8.jar') and made sure to point this in my Parasoft > Preferences> JDBC drivers (enclosed screenshot of the Preferences window) and after that when I run my tests, I am getting the below error and not able to connect to database: Can someone please help ? Thanks in advance!

Error Message:
DataSource: GET FirmsFirmID (row 1): oracle/jdbc/OracleDriver : Unsupported major.minor version 52.0

Additional Details:
java.lang.UnsupportedClassVersionError: oracle/jdbc/OracleDriver : Unsupported major.minor version 52.0

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(ClassLoader.java:800)

at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)

at java.net.URLClassLoader.access$100(URLClassLoader.java:71)

at java.net.URLClassLoader$1.run(URLClassLoader.java:361)

at java.net.URLClassLoader$1.run(URLClassLoader.java:355)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:354)

at java.lang.ClassLoader.loadClass(ClassLoader.java:425)

at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

at com.parasoft.xtest.common.web.XTestJdbcClassLoaderProvider$WebJdbcClassLoader.loadClass(XTestJdbcClassLoaderProvider.java:68)

at com.parasoft.xtest.common.web.XTestJdbcClassLoaderProvider$WebJdbcClassLoader.loadClass(XTestJdbcClassLoaderProvider.java:59)

at com.parasoft.db.JdbcConnectionFactory.getDriverStatic(JdbcConnectionFactory.java:75)

at com.parasoft.db.JdbcConnectionFactory.getDriver(JdbcConnectionFactory.java:58)

at com.parasoft.db.JdbcConnectionFactory.getJDBCConnection(JdbcConnectionFactory.java:36)

at com.parasoft.db.AppJdbcConnectionFactory.getJDBCConnection(AppJdbcConnectionFactory.java:25)

at com.parasoft.db.VariableDbConnectionProvider.getConnection(VariableDbConnectionProvider.java:41)

at webtool.db.DbTool.doApply(DbTool.java:142)

at webtool.tool.WebTool.applyTool(WebTool.java:127)

at com.parasoft.tool.Tool.apply(Tool.java:285)

at com.parasoft.tool.Tool.getApplyResult(Tool.java:297)

at webtool.test.ToolTest.run(ToolTest.java:840)

at webtool.test.Test$4.loop(Test.java:912)

at webtool.test.execution.CompositeExecutionLoop.loop(CompositeExecutionLoop.java:60)

at webtool.test.execution.CompositeExecutionLoop.loop(CompositeExecutionLoop.java:69)

at webtool.test.execution.CompositeExecutionLoop.loop(CompositeExecutionLoop.java:69)

at webtool.test.execution.CompositeExecutionLoop.loop(CompositeExecutionLoop.java:69)

at webtool.test.execution.TestSuiteLoop.runSetUpTearDownTests(TestSuiteLoop.java:247)

at webtool.test.execution.TestSuiteLoop.runSetUpTests(TestSuiteLoop.java:221)

at webtool.test.execution.TestSuiteLoop.setup(TestSuiteLoop.java:133)

at webtool.test.execution.CompositeExecutionLoop.setup(CompositeExecutionLoop.java:109)

at webtool.test.execution.CompositeExecutionLoop.loop(CompositeExecutionLoop.java:54)

at webtool.test.execution.CompositeExecutionLoop.loop(CompositeExecutionLoop.java:69)

at webtool.test.execution.CompositeExecutionLoop.loop(CompositeExecutionLoop.java:69)

at webtool.test.execution.CompositeExecutionLoop.loop(CompositeExecutionLoop.java:69)

at webtool.test.execution.CompositeExecutionLoop.loop(CompositeExecutionLoop.java:69)

at webtool.test.Test.run(Test.java:1071)

at webtool.test.TestExecutor.run(TestExecutor.java:361)
Tagged:

Best Answer

Answers

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭
    edited January 2018

    java.lang.UnsupportedClassVersionError: oracle/jdbc/OracleDriver : Unsupported major.minor version 52.0

    Java class file version 52 means java 8 is required. You must start SOAtest with Java 8 in order for Java to be able to load classes built with java 8, like those from the Oracle JDBC driver.

    The current SOAtest release ships with Java 8. Otherwise, if you must use an older SOAtest release, you can install your own Java 8 then start SOAtest with a -Zjava_home command line argument as follows:
    soatest.exe -Zjava_home path_to_your_java_8_installation

  • Testuser
    Testuser Posts: 41
    edited January 2018

    Thanks for your quick response benken_parasoft. I have JDK 8 installed on my machine. Where do I need to update the Zjava ? Is it under Target location in the Properties >shortcut tab

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭

    I installed JDK 8 yesterday on my machine and SOATEST was still running fine after and before, until I changed the driver to 12.2.0.1.

    You must also pass the -Zjava_home argument I mentioned earlier. By default, SOAtest has its own private java installation for launching itself. To use a different java installation, like one you installed under C:\Program Files\Java\jdk1.8.0_xxx. you must specify -Zjava_home and then the path to the Java 8 installation.

    So I am a little confused here why SOATEST is complaining about Java version while using the new driver and works fine while using the old driver.

    The older Oracle JDBC driver was probably compiled for Java 7 or earlier. The newer Oracle JDBC Driver you started using is compiled for Java 8.

  • Testuser
    Testuser Posts: 41

    Thanks again for the clarification! Do i need to specify the JDK path under Target location in the Properties >shortcut tab ?

  • Testuser
    Testuser Posts: 41

    Thanks a bunch, it worked now.

Tagged