Skip to Content
avatar image
Former Member

java.lang.NoClassDefFoundError: oracle/sql/CLOB

Hello,

We are porting the J2EE app to WAS. WE are getting the following error. Any ideas.

source code snippet:

import java.sql.*;

import java.util.*;

import oracle.sql.CLOB;

import oracle.sql.BLOB;

ResultSet rs = ps.executeQuery();

while (rs.next()) {

int count = 1;

Iterator lobListIter = lobList.iterator();

while(lobListIter.hasNext()) {

LobData lobData = (LobData)lobListIter.next();

if(lobData.isByteArrayData()) {

if(lobData.getByteArrayData() != null) {

Blob blobData = rs.getBlob(count);

((oracle.sql.BLOB)blobData).putBytes(1,

lobData.getByteArrayData());

}

} else {

if(lobData.getStringData() != null) {

Clob clobData = rs.getClob(count);

((oracle.sql.CLOB)clobData).putString(1, lobData.getStringData());

}

}

++count;

}

}

rs.close();

} catch (SQLException e) {

<u><b>error: Caused by: java.lang.NoClassDefFoundError: oracle/sql/CLOB</b></u>

at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:240)

at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)

at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)

at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

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

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)

Caused by: java.lang.NoClassDefFoundError: oracle/sql/CLOB

at com.dicarta.infra.persistence.server.WebsphereLobHandler.updateClobData(WebsphereLobHandler.java:52)

at com.dicarta.infra.persistence.server.AbstractJDBCPersister.updateClobData(AbstractJDBCPersister.java:277)

at com.dicarta.appfound.contract.server.persistence.AbstractContractPersister.update(AbstractContractPersister.java:93)

at com.dicarta.appfound.contract.server.bo.ContractBO.submitDraft(ContractBO.java:1642)

at com.dicarta.appfound.contract.server.bo.ContractBO.submitDraft(ContractBO.java:1531)

at com.dicarta.appfound.contract.server.bo.ContractBO.submitDraft(ContractBO.java:1511)

at com.dicarta.app.kmgr.server.bo.ContractServicesBO.submit(ContractServicesBO.java:2390)

at com.dicarta.app.kmgr.server.ContractServicesEJB.submit(ContractServicesEJB.java:781)

at com.dicarta.app.kmgr.server.IContractServicesObjectImpl40.submit(IContractServicesObjectImpl40.java:7509)

Thank you,

Kumar

cSoftgroup

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Oct 18, 2005 at 04:19 AM

    Hi Kumar,

    You are using oracle.sql.* jar for your oracle database activity. This jar file is not available at server side. Thats why it is giving such error. You need to deploy these Jar files on the server and then give reference of these jar files in your J2ee application.

    Regards,

    Bhavik

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 18, 2005 at 04:27 AM

    Hi Kumar,

    There seems to be a problem with classpath.

    please add Oracle JDBC driver in your system CLASSPATH.

    If you are using Oracle, I recommend using <oracle_home>\jdbc\lib\classes12.jar

    or you can download the same from

    http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html

    The simplest way is to add the entry of this driver into the libraries of your project.

    select your project in Netweaver developer studio -> project menu->properties option-> under JAVA Build path optin in the left pane select Libraries tab. here add a external JAR and select the above mentioned jar file.

    After this re-build the project and the issue should be resolved.

    Vineet

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 21, 2005 at 08:34 AM

    Hi Kumar,

    If the problem is resolved, please don't forget to close the issue and give reward points to the person whose suggestion got the issue resolved.

    Add comment
    10|10000 characters needed characters exceeded