org.springframework.jdbc.InvalidResultSetAccessException: PreparedStatementCallback; invalid ResultSet access for SQL [Select ID, title From HIERARCHY_NODE_META where title in ('BIE-B'`ioethics') and hierarchyId = ? and isDisabled = 0]; nested exception is java.sql.SQLException: Invalid column index

Sakai JIRA | Yi Zhu | 2 years ago
  1. 2

    Delegated Access quartz job is unable to complete execution due to special characters contained in the site's property value. {quote} 2014-11-12 16:31:13,017 ERROR QuartzScheduler_Worker-4 org.sakaiproject.delegatedaccess.dao.impl.DelegatedAccessDaoImpl - Error executing query: class org.springframework.jdbc.InvalidResultSetAccessException:PreparedStatementCallback; invalid ResultSet access for SQL [Select ID, title From HIERARCHY_NODE_META where title in ('BIE-B'`ioethics') and hierarchyId = ? and isDisabled = 0]; nested exception is java.sql.SQLException: Invalid column index org.springframework.jdbc.InvalidResultSetAccessException: PreparedStatementCallback; invalid ResultSet access for SQL [Select ID, title From HIERARCHY_NODE_META where title in ('BIE-B'`ioethics') and hierarchyId = ? and isDisabled = 0]; nested exception is java.sql.SQLException: Invalid column index at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:224) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:607) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:641) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:670) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:678) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:710) at org.sakaiproject.delegatedaccess.dao.impl.DelegatedAccessDaoImpl.getNodesBySiteRef(DelegatedAccessDaoImpl.java:137) at org.sakaiproject.delegatedaccess.jobs.DelegatedAccessSiteHierarchyJob.checkAndAddNode(DelegatedAccessSiteHierarchyJob.java:217) at org.sakaiproject.delegatedaccess.jobs.DelegatedAccessSiteHierarchyJob.execute(DelegatedAccessSiteHierarchyJob.java:144) at org.sakaiproject.component.app.scheduler.jobs.SpringJobBeanWrapper.execute(SpringJobBeanWrapper.java:70) at org.quartz.core.JobRunShell.run(JobRunShell.java:202) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:534) Caused by: java.sql.SQLException: Invalid column index at oracle.jdbc.driver.OraclePreparedStatement.setStringInternal(OraclePreparedStatement.java:5321) at oracle.jdbc.driver.OraclePreparedStatement.setString(OraclePreparedStatement.java:5309) at oracle.jdbc.driver.OraclePreparedStatementWrapper.setString(OraclePreparedStatementWrapper.java:280) at org.apache.commons.dbcp.DelegatingPreparedStatement.setString(DelegatingPreparedStatement.java:132) at org.springframework.jdbc.core.StatementCreatorUtils.setValue(StatementCreatorUtils.java:335) at org.springframework.jdbc.core.StatementCreatorUtils.setParameterValueInternal(StatementCreatorUtils.java:217) at org.springframework.jdbc.core.StatementCreatorUtils.setParameterValue(StatementCreatorUtils.java:145) at org.springframework.jdbc.core.ArgPreparedStatementSetter.setValues(ArgPreparedStatementSetter.java:51) at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:646) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:591) ... 10 more {quote} Steps to reproduce: 1. Edit site properties that are used by Hierarchy tool. For example, change the value of Subject to People's Right. Note the single quote in the text 2. now execute the Delegated Access job and check log.

    Sakai JIRA | 2 years ago | Yi Zhu
    org.springframework.jdbc.InvalidResultSetAccessException: PreparedStatementCallback; invalid ResultSet access for SQL [Select ID, title From HIERARCHY_NODE_META where title in ('BIE-B'`ioethics') and hierarchyId = ? and isDisabled = 0]; nested exception is java.sql.SQLException: Invalid column index
  2. 0

    validating JTextField data from result set

    Stack Overflow | 4 years ago | Craig Hogan
    java.sql.SQLException: Invalid column index
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Invalid column index

    GitHub | 4 years ago | rafael-alcantara
    java.sql.SQLException: Invalid column index
  5. 0

    Invalid column index , update using PreparedStatement

    Stack Overflow | 5 years ago | invariant
    java.sql.SQLException: Invalid column index

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.sql.SQLException

      Invalid column index

      at oracle.jdbc.driver.OraclePreparedStatement.setStringInternal()
    2. Oracle jdbc
      OraclePreparedStatementWrapper.setString
      1. oracle.jdbc.driver.OraclePreparedStatement.setStringInternal(OraclePreparedStatement.java:5321)
      2. oracle.jdbc.driver.OraclePreparedStatement.setString(OraclePreparedStatement.java:5309)
      3. oracle.jdbc.driver.OraclePreparedStatementWrapper.setString(OraclePreparedStatementWrapper.java:280)
      3 frames
    3. Commons DBCP
      DelegatingPreparedStatement.setString
      1. org.apache.commons.dbcp.DelegatingPreparedStatement.setString(DelegatingPreparedStatement.java:132)
      1 frame
    4. Spring Framework
      JdbcTemplate.query
      1. org.springframework.jdbc.core.StatementCreatorUtils.setValue(StatementCreatorUtils.java:335)
      2. org.springframework.jdbc.core.StatementCreatorUtils.setParameterValueInternal(StatementCreatorUtils.java:217)
      3. org.springframework.jdbc.core.StatementCreatorUtils.setParameterValue(StatementCreatorUtils.java:145)
      4. org.springframework.jdbc.core.ArgPreparedStatementSetter.setValues(ArgPreparedStatementSetter.java:51)
      5. org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:646)
      6. org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:591)
      7. org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:641)
      8. org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:670)
      9. org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:678)
      10. org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:710)
      10 frames
    5. org.sakaiproject.delegatedaccess
      DelegatedAccessSiteHierarchyJob.execute
      1. org.sakaiproject.delegatedaccess.dao.impl.DelegatedAccessDaoImpl.getNodesBySiteRef(DelegatedAccessDaoImpl.java:137)
      2. org.sakaiproject.delegatedaccess.jobs.DelegatedAccessSiteHierarchyJob.checkAndAddNode(DelegatedAccessSiteHierarchyJob.java:217)
      3. org.sakaiproject.delegatedaccess.jobs.DelegatedAccessSiteHierarchyJob.execute(DelegatedAccessSiteHierarchyJob.java:144)
      3 frames
    6. org.sakaiproject.component
      SpringJobBeanWrapper.execute
      1. org.sakaiproject.component.app.scheduler.jobs.SpringJobBeanWrapper.execute(SpringJobBeanWrapper.java:70)
      1 frame
    7. quartz
      SimpleThreadPool$WorkerThread.run
      1. org.quartz.core.JobRunShell.run(JobRunShell.java:202)
      2. org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:534)
      2 frames