Java堆空间错误
使用 ibatis 运行 Spring Batch 时出现 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 转换器在做什么吗?
I get a Java heap space error while running spring batch, with ibatis.
The following is the stack trace.
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)
Any idea what the sql converter is doing ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
另外,当您使用 Oracle JDBC 时,请确保对结果集使用 ResultSet.TYPE_FORWARD_ONLY - 如果您使用可滚动结果集,Oracle 将使用“客户端缓存”。
(http://docs.oracle.com/cd/B10500_01/java.920/a96654/resltset.htm)
Also, as you are using Oracle JDBC, make sure that you have use ResultSet.TYPE_FORWARD_ONLY for your result sets - Oracle uses "a client-side cache" if you use scrollable ResultSets.
(http://docs.oracle.com/cd/B10500_01/java.920/a96654/resltset.htm)