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 -

java - Parsing XML, skip certain tags -

c# - ASP.NET MVC Sequence contains no matching element -