Forum Stats

  • 3,874,528 Users
  • 2,266,750 Discussions
  • 7,911,880 Comments

Discussions

java.lang.NoClassDefFoundError: oracle/xdb/XMLType error

Hi Team,

I am using ojdbc8-21.4.0.0.1.jar in my project.

There is a table in my lab which has a column with data type as 'OPERA_SRW_PARAMLIST' .

I tried to load this column using the below code-

---

String query = "select params as Parameter from reports";

pstmt = conn.prepareStatement(query);


    resultSet = pstmt.executeQuery();

    System.out.println("Before while loop!");


    while (resultSet.next()) {

      try {

        System.out.println("ooooooooooooooooooooooooooooooo");

        System.out.println(resultSet.getString("Parameter"));

      } catch (Exception e) {

        System.out.println("ex- " + e);

      }

---

Error/Exception is coming on the line - resultSet.getString("Parameter").


Error message is -

java.lang.NoClassDefFoundError: oracle/xdb/XMLType

at oracle.jdbc.driver.NamedTypeAccessor.getString(NamedTypeAccessor.java:376)

at oracle.jdbc.driver.GeneratedStatement.getString(GeneratedStatement.java:232)

at oracle.jdbc.driver.GeneratedScrollableResultSet.getString(GeneratedScrollableResultSet.java:410)

at oracle.jdbc.driver.GeneratedResultSet.getString(GeneratedResultSet.java:662)....etc


Sample of data of params column is as below-

DUMMY_DATA_TO_TEST([DUMMY], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], 
[DUMMY], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], 
[DUMMY], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], 
[DUMMY], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], 
[DUMMY], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], 
[DUMMY], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], 
[DUMMY], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], 
[DUMMY], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], 
[DUMMY], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], 
[DUMMY], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], 
[DUMMY], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], 
[DUMMY], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], 
[DUMMY], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], 
[DUMMY], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], 
[DUMMY], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], [DUMMY2], )

Any suggestion or idea will be very much helpful to handle this type of data.
Thanks in advance.


Tagged:

Answers