Service Virtualization

 View Only
  • 1.  After adding ojdbc7 to Lib folder for Oracle 12c database support, getting a NoClassFound error. Any idea ?

    Posted Dec 08, 2016 05:31 AM

    After adding ojdbc7 to Lib folder for Oracle 12c database support, getting a parsing error.
    I have added the ojdbc7-12.1.0.2.jar to support the latest upgrade for our databases to oracle 12c.
    Now if i am running the individual JDBC step to the test connection , i am able to connect..so that's great
    But now when i am running the ITR , i am getting the below error.

    The catch here is that when i am removing the classes12.jar from Lib folder i get this error.
    But if i include the classes12.jar file in the lib folder then i am unable to connect to the new DB servers with oracle 12c upgrades.Then i get a no security authentication protocol error.
    Has anyone faced something similar?
    Earlier, before the 12c upgrade, i was using ojdbc5.jar and classes12.jar together and it worked fine.

    ===========================================================================
    | Exception:
    ============================================================================
    | Message: Test Execution Stopped due to exception
    ----------------------------------------------------------------------------
    | Trapped Exception: oracle/xml/parser/v2/XMLParseException
    | Trapped Message: java.lang.NoClassDefFoundError: oracle/xml/parser/v2/XMLParseException
    ----------------------------------------------------------------------------
    STACK TRACE
    java.lang.NoClassDefFoundError: oracle/xml/parser/v2/XMLParseException
    at oracle.jdbc.driver.NamedTypeAccessor$XMLFactory.createXML(NamedTypeAccessor.java:118)
    at oracle.jdbc.driver.NamedTypeAccessor.getOracleObject(NamedTypeAccessor.java:249)
    at oracle.jdbc.driver.NamedTypeAccessor.getString(NamedTypeAccessor.java:354)
    at oracle.jdbc.driver.GeneratedStatement.getString(GeneratedStatement.java:327)
    at oracle.jdbc.driver.GeneratedScrollableResultSet.getString(GeneratedScrollableResultSet.java:882)
    at com.mchange.v2.c3p0.impl.NewProxyResultSet.getString(NewProxyResultSet.java:934)
    at com.itko.lisa.jdbc.JDBCResultSetCache.getRowData(JDBCResultSetCache.java:69)
    at com.itko.lisa.jdbc.JDBCResultSetCache.<init>(JDBCResultSetCache.java:54)
    at com.itko.lisa.jdbc.JDBCNode.makeGenericCall(JDBCNode.java:463)
    at com.itko.lisa.jdbc.JDBCNode.executeSQL(JDBCNode.java:387)
    at com.itko.lisa.jdbc.JDBCNode.execute(JDBCNode.java:341)
    at com.itko.lisa.test.TestNode.executeNode(TestNode.java:981)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1295)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1210)
    at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1195)
    at com.itko.lisa.utils.ExecSubProcessNode.doFullExec(ExecSubProcessNode.java:354)
    at com.itko.lisa.utils.ExecSubProcessNode.execute(ExecSubProcessNode.java:268)
    at com.itko.lisa.test.TestNode.executeNode(TestNode.java:981)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1295)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1210)
    at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1195)
    at com.itko.lisa.editor.WalkThruPanel.prepAndExecNode(WalkThruPanel.java:1057)
    at com.itko.lisa.editor.WalkThruPanel.access$900(WalkThruPanel.java:70)
    at com.itko.lisa.editor.WalkThruPanel$10.doCallback(WalkThruPanel.java:964)
    at com.itko.util.swing.panels.ProcessingDialog$2.run(ProcessingDialog.java:194)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.ClassNotFoundException: oracle.xml.parser.v2.XMLParseException
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 26 more



  • 2.  Re: After adding ojdbc7 to Lib folder for Oracle 12c database support, getting a NoClassFound error. Any idea ?

    Posted Dec 08, 2016 12:30 PM

    Question:

    Which version of DevTest are you using?  Later versions ship with an ojdbc7-12.1.0.2 jar.  I would rename the ojdbc7-12.1.0.2.jar that is pre-installed in LISA_HOME/lib/shared, drop your DB-specific jars into LIB, stop/start all services, and see if these steps cleaned up potential conflicts.

    If your version does not have the OOTB installed jar, I do not know the exact cause. 



  • 3.  Re: After adding ojdbc7 to Lib folder for Oracle 12c database support, getting a NoClassFound error. Any idea ?

    Posted Dec 09, 2016 01:15 AM

    I am on devtest 9.1.

    i verified, i do have ojdbc7-12.1.0.2.jar which is pre-installed in LISA_HOME/lib/shared.

    So i removed the ojdbc7.jar and classes12.jar from the Lib folder and tried running test connection individually in a jdbc step works fine.

    However, when i run an ITR i get the same NoClass found error. I am assuming this a error for parsing for which the class wasn't found.

     

    Although i have something to mention here , i edited the database query from select * to SELECT x.source_payload.getClobVal() and then it worked fine.

    So i am sure that this is related to the XMLParseException, because the payload i am extracting from DB is XML based.

     

    I just don't know which jar i am missing for the class required for this XML parsing.

     



  • 4.  Re: After adding ojdbc7 to Lib folder for Oracle 12c database support, getting a NoClassFound error. Any idea ?

    Posted Dec 09, 2016 10:58 AM

    I'm sorry about that, but I can't help you much further on this one.  Maybe a colleague has seen this and can chime into the conversation.



  • 5.  Re: After adding ojdbc7 to Lib folder for Oracle 12c database support, getting a NoClassFound error. Any idea ?

    Broadcom Employee
    Posted Dec 11, 2016 10:17 PM

    Hi Viraj,

        May be you need to copy additional jar (xmlparserv2) from oracle 12 installation directory. Can you try adding this jar to hotdeploy folder, restart workstation and verify it.

    java.lang.ClassNotFoundException: oracle.xml.pa... | Oracle Community 



  • 6.  Re: After adding ojdbc7 to Lib folder for Oracle 12c database support, getting a NoClassFound error. Any idea ?
    Best Answer

    Posted Dec 13, 2016 05:47 AM

    Dint work when i copied the xmlparserv2.jar to the hotdeploy folder.

     

    Tried copying additional jar (xmlparserv2.jar) from oracle 12 installation directory to LISA_HOME/lib folder and removed the previous ojdbc5.jar and classes12.jar from your LISA_HOME/lib folder.

     

    Then, restarted workstation and it worked.

     

     

    Thanks guys