java.sql.SQLException: setString can only process strings of less than 32766 chararacters

Atlassian JIRA | Jeff Turner | 1 decade ago
  1. 0

    The JIRA mail service extracts attachments from mails it reads, and adds them as issue attachments. Apparently this parsing breaks on Oracle if attachments are over 32k, and probably also 4k (see JRA-4361): org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while setting value: (setString can only process strings of less than 32766 chararacters) at org.ofbiz.core.entity.jdbc.SqlJdbcUtil.setValue(SqlJdbcUtil.java:684) at org.ofbiz.core.entity.jdbc.SqlJdbcUtil.setValue(SqlJdbcUtil.java:601) at org.ofbiz.core.entity.jdbc.SqlJdbcUtil.setValues(SqlJdbcUtil.java:436) at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:114) at org.ofbiz.core.entity.GenericDAO.insert(GenericDAO.java:88) at org.ofbiz.core.entity.GenericHelperDAO.create(GenericHelperDAO.java:63) at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:470) at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:450) at org.ofbiz.core.entity.GenericValue.create(GenericValue.java:77) at com.atlassian.core.ofbiz.util.EntityUtils.createValue(EntityUtils.java:61) at com.atlassian.jira.issue.managers.DefaultActionManager.createEmail(DefaultActionManager.java:158) at com.atlassian.jira.service.util.handler.EmailHandler.handleMessage(EmailHandler.java:39) at com.atlassian.jira.service.services.pop.PopService.run(PopService.java:110) at com.atlassian.jira.service.JiraServiceContainer.run(JiraServiceContainer.java:53) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:50) at org.quartz.core.JobRunShell.run(JobRunShell.java:147) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:387) java.sql.SQLException: setString can only process strings of less than 32766 chararacters at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227) at oracle.jdbc.driver.OraclePreparedStatement.setStringInternal(OraclePreparedStatement.java:4575) at oracle.jdbc.driver.OraclePreparedStatement.setString(OraclePreparedStatement.java:4546) at org.apache.commons.dbcp.DelegatingPreparedStatement.setString(DelegatingPreparedStatement.java:131) at org.ofbiz.core.entity.jdbc.SQLProcessor.setValue(SQLProcessor.java:452) at org.ofbiz.core.entity.jdbc.SqlJdbcUtil.setValue(SqlJdbcUtil.java:636) at org.ofbiz.core.entity.jdbc.SqlJdbcUtil.setValue(SqlJdbcUtil.java:601) at org.ofbiz.core.entity.jdbc.SqlJdbcUtil.setValues(SqlJdbcUtil.java:436) at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:114) at org.ofbiz.core.entity.GenericDAO.insert(GenericDAO.java:88) at org.ofbiz.core.entity.GenericHelperDAO.create(GenericHelperDAO.java:63) at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:470) at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:450) at org.ofbiz.core.entity.GenericValue.create(GenericValue.java:77) at com.atlassian.core.ofbiz.util.EntityUtils.createValue(EntityUtils.java:61) at com.atlassian.jira.issue.managers.DefaultActionManager.createEmail(DefaultActionManager.java:158) at com.atlassian.jira.service.util.handler.EmailHandler.handleMessage(EmailHandler.java:39) at com.atlassian.jira.service.services.pop.PopService.run(PopService.java:110) at com.atlassian.jira.service.JiraServiceContainer.run(JiraServiceContainer.java:53) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:50) at org.quartz.core.JobRunShell.run(JobRunShell.java:147) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:387)

    Atlassian JIRA | 1 decade ago | Jeff Turner
    java.sql.SQLException: setString can only process strings of less than 32766 chararacters
  2. 0

    Openbravo Manufacturing

    openbravo | 1 decade ago | alexaweb
    java.sql.SQLException: Invalid column index
  3. 0

    Problem with Poduction function help me

    openbravo | 1 decade ago | inexm
    java.sql.SQLException: Invalid column index
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Don't work Production

    openbravo | 1 decade ago | inexm
    java.sql.SQLException: Invalid column index
  6. 0

    Connection cache ignores connection properties (OracleDataSource)

    Oracle Community | 7 years ago | 710460
    java.sql.SQLException: setString can only process strings of less than 32766 chararacters

    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

      setString can only process strings of less than 32766 chararacters

      at oracle.jdbc.driver.DatabaseError.throwSqlException()
    2. Oracle jdbc
      OraclePreparedStatement.setString
      1. oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
      2. oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
      3. oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:227)
      4. oracle.jdbc.driver.OraclePreparedStatement.setStringInternal(OraclePreparedStatement.java:4575)
      5. oracle.jdbc.driver.OraclePreparedStatement.setString(OraclePreparedStatement.java:4546)
      5 frames
    3. Commons DBCP
      DelegatingPreparedStatement.setString
      1. org.apache.commons.dbcp.DelegatingPreparedStatement.setString(DelegatingPreparedStatement.java:131)
      1 frame
    4. org.ofbiz.core
      GenericValue.create
      1. org.ofbiz.core.entity.jdbc.SQLProcessor.setValue(SQLProcessor.java:452)
      2. org.ofbiz.core.entity.jdbc.SqlJdbcUtil.setValue(SqlJdbcUtil.java:636)
      3. org.ofbiz.core.entity.jdbc.SqlJdbcUtil.setValue(SqlJdbcUtil.java:601)
      4. org.ofbiz.core.entity.jdbc.SqlJdbcUtil.setValues(SqlJdbcUtil.java:436)
      5. org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:114)
      6. org.ofbiz.core.entity.GenericDAO.insert(GenericDAO.java:88)
      7. org.ofbiz.core.entity.GenericHelperDAO.create(GenericHelperDAO.java:63)
      8. org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:470)
      9. org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:450)
      10. org.ofbiz.core.entity.GenericValue.create(GenericValue.java:77)
      10 frames
    5. com.atlassian.core
      EntityUtils.createValue
      1. com.atlassian.core.ofbiz.util.EntityUtils.createValue(EntityUtils.java:61)
      1 frame
    6. com.atlassian.jira
      ServiceRunner.execute
      1. com.atlassian.jira.issue.managers.DefaultActionManager.createEmail(DefaultActionManager.java:158)
      2. com.atlassian.jira.service.util.handler.EmailHandler.handleMessage(EmailHandler.java:39)
      3. com.atlassian.jira.service.services.pop.PopService.run(PopService.java:110)
      4. com.atlassian.jira.service.JiraServiceContainer.run(JiraServiceContainer.java:53)
      5. com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:50)
      5 frames
    7. quartz
      SimpleThreadPool$WorkerThread.run
      1. org.quartz.core.JobRunShell.run(JobRunShell.java:147)
      2. org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:387)
      2 frames