A mysterious problem arises when migrating the system to another server:
When deploying the system on the local development and other servers, using the same JDK, Oracle driver, TOMCAT, and yet another operation is to call the Oracle database stored procedure, need to pass a CLOB type of the parameter, in the local test no problem, When uploading to the server, it is impossible to execute the following code snippet, and no exception is thrown:
String wkt = "..."; Clob clobwkt = Conn.createclob () clobwkt.setstring (1, wkt); Cs.setclob (1, clobwkt);
After the final modification to the following way, the problem is resolved, but never found the code has been the cause of the problem, leave this problem here, waiting for someone to answer.
String wkt = "..."; Cs.setcharacterstream (1, New StringReader (wkt), wkt.length ());
Solve problems when Java needs to pass CLOB fields in calling stored procedures