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

Atlassian JIRA | Jed Wesley-Smith | 8 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  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 | 8 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 | 8 years ago | Jed Wesley-Smith
    org.postgresql.util.PSQLException: Unknown Types value.

    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