Announcement Announcement Module
Collapse
No announcement yet.
JDBCTemplate.setMaxRows() implementation Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JDBCTemplate.setMaxRows() implementation

    How is the method JDBCTemplate.setMaxRows() implemented to restrict the number of rows returned?

    I am trying to track down a problem I get the exception below. It does not happen very often and it may be a jdbc driver problem with Oracle. But we also had a logic bug around the same time involving the use of setMaxRows() and if I understand what it is doing, I can rule this out. Our problem was we were not resetting is back before the next call.


    Caused by: org.springframework.jdbc.UncategorizedSQLException : PreparedStatementCallback; uncategorized SQLException for SQL [ SELECT FLG1, FLG2 FROM DB1.tbl1 WHERE ID1 = ? ]; SQL state [null]; error code [17401]; Protocol violation; nested exception is java.sql.SQLException: Protocol violation
    at org.springframework.jdbc.support.SQLStateSQLExcept ionTranslator.translate(SQLStateSQLExceptionTransl ator.java:121)
    at org.springframework.jdbc.support.SQLErrorCodeSQLEx ceptionTranslator.translate(SQLErrorCodeSQLExcepti onTranslator.java:322)
    at org.springframework.jdbc.core.JdbcTemplate.execute (JdbcTemplate.java:582)
    at org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:616)
    at org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:645)
    at org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:649)
    at org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:681)
    at org.springframework.jdbc.core.JdbcTemplate.queryFo rList(JdbcTemplate.java:747)
Working...
X