org.postgresql.util.PSQLException: Unknown Types value.

Atlassian JIRA | Jed Wesley-Smith | 7 years ago
  1. 0

    {noformat} 2009-08-13 15:26:02,109 http-8090-Processor8 INFO anonymous 52614x25x1 19v1v4w /secure/SetupImport.jspa [atlassian.jira.upgrade.UpgradeManagerImpl] Performing Upgrade Task: Converts Legacy Portlets to Gadgets including user preferences. org.postgresql.util.PSQLException: Unknown Types value. at org.postgresql.jdbc2.AbstractJdbc2Statement.setNull(AbstractJdbc2Statement.java:1094) at org.postgresql.jdbc3.AbstractJdbc3Statement.setNull(AbstractJdbc3Statement.java:1447) at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.setNull(DelegatingPreparedStatement.java:105) at org.ofbiz.core.entity.jdbc.SQLProcessor.setValue(SQLProcessor.java:903) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.setValue(DefaultOfBizDelegator.java:787) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.bulkUpdateByPrimaryKey(DefaultOfBizDelegator.java:520) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build410.doUpgrade(UpgradeTask_Build410.java:78) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeTaskSucess(UpgradeManagerImpl.java:478) at com.atlassian.jira.upgrade.UpgradeManagerImpl.runUpgradeTasks(UpgradeManagerImpl.java:398) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgrade(UpgradeManagerImpl.java:335) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeeded(UpgradeManagerImpl.java:286) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeededAndAllowed(UpgradeManagerImpl.java:243) at com.atlassian.jira.action.admin.DataImport.doExecute(DataImport.java:241) {noformat} This is caused by the fact that NULL is being set as the value with the JDBC {{Types.JAVA_OBJECT}} (as it can't determine in this case that it should be a VARCHAR as it's null). Some JDBC drivers don't like this and complain. In this case, simply using empty string suffices, as the application handles empty string as though it was null.

    Atlassian JIRA | 7 years ago | Jed Wesley-Smith
    org.postgresql.util.PSQLException: Unknown Types value.
  2. 0

    {noformat} 2009-08-13 15:26:02,109 http-8090-Processor8 INFO anonymous 52614x25x1 19v1v4w /secure/SetupImport.jspa [atlassian.jira.upgrade.UpgradeManagerImpl] Performing Upgrade Task: Converts Legacy Portlets to Gadgets including user preferences. org.postgresql.util.PSQLException: Unknown Types value. at org.postgresql.jdbc2.AbstractJdbc2Statement.setNull(AbstractJdbc2Statement.java:1094) at org.postgresql.jdbc3.AbstractJdbc3Statement.setNull(AbstractJdbc3Statement.java:1447) at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.setNull(DelegatingPreparedStatement.java:105) at org.ofbiz.core.entity.jdbc.SQLProcessor.setValue(SQLProcessor.java:903) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.setValue(DefaultOfBizDelegator.java:787) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.bulkUpdateByPrimaryKey(DefaultOfBizDelegator.java:520) at com.atlassian.jira.upgrade.tasks.UpgradeTask_Build410.doUpgrade(UpgradeTask_Build410.java:78) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeTaskSucess(UpgradeManagerImpl.java:478) at com.atlassian.jira.upgrade.UpgradeManagerImpl.runUpgradeTasks(UpgradeManagerImpl.java:398) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgrade(UpgradeManagerImpl.java:335) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeeded(UpgradeManagerImpl.java:286) at com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeededAndAllowed(UpgradeManagerImpl.java:243) at com.atlassian.jira.action.admin.DataImport.doExecute(DataImport.java:241) {noformat} This is caused by the fact that NULL is being set as the value with the JDBC {{Types.JAVA_OBJECT}} (as it can't determine in this case that it should be a VARCHAR as it's null). Some JDBC drivers don't like this and complain. In this case, simply using empty string suffices, as the application handles empty string as though it was null.

    Atlassian JIRA | 7 years ago | Jed Wesley-Smith
    org.postgresql.util.PSQLException: Unknown Types value.
  3. 0

    PlainSQL - Option[ZonedDateTime] fails

    GitHub | 7 months ago | Raymond26
    org.postgresql.util.PSQLException: Unknown Types value.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How to store timestamp with timezone with prepared statement

    Stack Overflow | 8 months ago | afzalex
    org.postgresql.util.PSQLException: Unsupported Types value: 2,013
  6. 0

    [PostgreSQL] ResultSet problem in JDBC - Grokbase

    grokbase.com | 1 year ago
    org.postgresql.util.PSQLException: Can't infer the SQL type to use for an instance of org.postgresql.jdbc4.Jdbc4ResultSet. Use setObject() with an explicit Types value to specify the type to use.

    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. org.postgresql.util.PSQLException

      Unknown Types value.

      at org.postgresql.jdbc2.AbstractJdbc2Statement.setNull()
    2. PostgreSQL JDBC Driver
      AbstractJdbc3Statement.setNull
      1. org.postgresql.jdbc2.AbstractJdbc2Statement.setNull(AbstractJdbc2Statement.java:1094)
      2. org.postgresql.jdbc3.AbstractJdbc3Statement.setNull(AbstractJdbc3Statement.java:1447)
      2 frames
    3. org.apache.tomcat
      DelegatingPreparedStatement.setNull
      1. org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.setNull(DelegatingPreparedStatement.java:105)
      1 frame
    4. org.ofbiz.core
      SQLProcessor.setValue
      1. org.ofbiz.core.entity.jdbc.SQLProcessor.setValue(SQLProcessor.java:903)
      1 frame
    5. com.atlassian.jira
      DataImport.doExecute
      1. com.atlassian.jira.ofbiz.DefaultOfBizDelegator.setValue(DefaultOfBizDelegator.java:787)
      2. com.atlassian.jira.ofbiz.DefaultOfBizDelegator.bulkUpdateByPrimaryKey(DefaultOfBizDelegator.java:520)
      3. com.atlassian.jira.upgrade.tasks.UpgradeTask_Build410.doUpgrade(UpgradeTask_Build410.java:78)
      4. com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeTaskSucess(UpgradeManagerImpl.java:478)
      5. com.atlassian.jira.upgrade.UpgradeManagerImpl.runUpgradeTasks(UpgradeManagerImpl.java:398)
      6. com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgrade(UpgradeManagerImpl.java:335)
      7. com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeeded(UpgradeManagerImpl.java:286)
      8. com.atlassian.jira.upgrade.UpgradeManagerImpl.doUpgradeIfNeededAndAllowed(UpgradeManagerImpl.java:243)
      9. com.atlassian.jira.action.admin.DataImport.doExecute(DataImport.java:241)
      9 frames