使用ibatis运行spring批处理时出现Java堆空间错误。
以下是堆栈跟踪。
java.lang.OutOfMemoryError: Java heap space
at oracle.sql.converter.CharacterConverter1Byte.toOracleStringWithReplacement(CharacterConverter1Byte.java:531)
at oracle.sql.CharacterSetWithConverter.convertWithReplacement(CharacterSetWithConverter.java:200)
at oracle.jdbc.driver.DBConversion.javaCharsToCHARBytes(DBConversion.java:770)
at oracle.jdbc.driver.DBConversion.javaCharsToCHARBytes(DBConversion.java:711)
at oracle.jdbc.driver.T4C8TTIClob.write(T4C8TTIClob.java:384)
at oracle.jdbc.driver.T4CConnection.putChars(T4CConnection.java:2708)
at oracle.sql.CLOB.putChars(CLOB.java:408)
at oracle.jdbc.driver.OracleClobWriter.write(OracleClobWriter.java:111)
at java.io.Writer.write(Unknown Source)
at java.io.Writer.write(Unknown Source)
at org.springframework.util.FileCopyUtils.copy(FileCopyUtils.java:220)
知道sql转换器在做什么吗?
答案 0 :(得分:0)
此外,在使用Oracle JDBC时,请确保对结果集使用ResultSet.TYPE_FORWARD_ONLY - Oracle使用"客户端缓存"如果您使用可滚动的ResultSet。 (http://docs.oracle.com/cd/B10500_01/java.920/a96654/resltset.htm)