Need Support for working Oracle CLOB Via JNDI Oracle Connection Using OracleDatasource.
I am unable Insert data on Oracle CLOB Data Type in Oracle 10G.I have used thin Driver -ojdbc14.jar. My Java Runtime Environment is Java1.5.
As per Oracle Documenation to use CLOB ,
for insering data via preparedstatment , it is required to get oracle.jdbc.CLOB as below.
This required OracleConnection instead of interface java.sql.Connection.
// If the temporary CLOB has not yet been created, create new
tempClob = CLOB.createTemporary(conn, true, CLOB.DURATION_SESSION);
So for this i get an error during lookup at following line.
myDataSource = (OracleDataSource) initCtx.lookup(strDSN);
com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource incompatible with oracle.jdbc.pool.OracleDataSource
JPdev 270003K04U18 Posts
Re: Oracle CLOB - Java JDBC Development2012-07-21T12:54:36ZThis is the accepted answer. This is the accepted answer.Hello!
This is not surprising, you are using a JNDI env from JAVA IBM.
ORACLE support ONLY SUN/ORACLE JAVA runtime.
So your cast 'OracleDataSource' is not supported by ORACLE and i think the binding of your Oracle Datasource to the IBM JNDI (if correct!) don't work.
I suggest you use the JAVA runtime of your ORACLE database which is located in dir xx/oracle/product/xxxx/xxx//jdk/bin/java .
Another sensitive question, how have you define the OracleDatasource and bind it to the JNDI env?
ORACLE use javax.naming.* and javax.naming.spi.*