java - Exception while using .setClob() -



java - Exception while using .setClob() -

i want insert string via java programme oracle db in table having column type clob. using next code

preparedstatement stmt=conn.preparestatement("insert json_test values(?,?)"); stmt.setint(1,counter); stmt.setclob(2,new stringreader(s));

but while executing getting exception: java.lang.exception: 1 - oracle.jdbc.driver.oraclepreparedstatementwrapper.setclob(iljava/io/reader;

can jdbc version using? works correctly me with

dependency> <groupid>com.oracle</groupid> <artifactid>ojdbc6</artifactid> <version>11.2.0.3</version> </dependency>

java jdbc prepared-statement clob

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -