'Data size bigger than max size for this type' Error when Importing on Oracle

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

During a data import, the following error appears:


org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while setting value:  (Data size bigger than max size for this type: 19616)
	at org.ofbiz.core.entity.jdbc.SqlJdbcUtil.setValue(SqlJdbcUtil.java:684)

Alternatively, the error code ORA-17070 may occur.

Cause

Older Oracle drivers are unable to manage the data type Workflows, issue fields and comments are saved in, if these are longer than 4000 characters. Newer versions contain a workaround that requires explicit activation in the DataSource connection properties: SetBigStringTryClob

Some versions of Oracle XE present this problem in spite of the SetBigStringTryClob flag.

Resolution

  1. For a Tomcat hosted instance, add SetBigStringTryClob=true to the connectionProperties attribute:
    
    <Resource name="jdbc/JiraDS" auth="Container" type="javax.sql.DataSource"
          ...
          driverClassName="oracle.jdbc.driver.OracleDriver"
          ...
          connectionProperties="SetBigStringTryClob=true"
          ...
          />
    
  2. Verify the recommended Oracle driver version is installed (see Connecting JIRA to Oracle)
  3. Make sure the oracle10g field-type name is set in the entityengine.xml
  4. Stop JIRA
  5. Drop and recreate the database
  6. Restart JIRA and re-import the XML backup

Last modified on Mar 30, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.