We're updating the issue view to help you get more done. 

JIRA backup can't write null column values

Description

We've got a table with two Long columns, one can be null. The entity looks like this:

1 2 3 4 5 6 7 @PrimaryKey @NotNull public Long getIssueId(); public void setIssueId(Long issueId); public Long getNextId(); public void setNextId(Long nextId);

When running a backup from inside JIRA, I'm getting a NPE if nextId is null:

com.atlassian.dbexporter.exporter.DataExporter.appendInteger(DataExporter.java:175)
com.atlassian.dbexporter.exporter.DataExporter.exportRow(DataExporter.java:128)
com.atlassian.dbexporter.exporter.DataExporter.exportTable(DataExporter.java:103)
com.atlassian.dbexporter.exporter.DataExporter.access$100(DataExporter.java:27)
com.atlassian.dbexporter.exporter.DataExporter$1.call(DataExporter.java:47)
com.atlassian.dbexporter.exporter.DataExporter$1.call(DataExporter.java:42)
com.atlassian.dbexporter.jdbc.JdbcUtils.withConnection(JdbcUtils.java:29)
com.atlassian.dbexporter.exporter.DataExporter.export(DataExporter.java:41)
com.atlassian.dbexporter.DbExporter.exportData(DbExporter.java:56)
com.atlassian.activeobjects.backup.ActiveObjectsBackup.save(ActiveObjectsBackup.java:106)

getBigDecimal(result, col) returns null for this column, so .toBigInteger() doesn't work. The next step in RowDataNode.append handles null values again.

Environment

JIRA v4.4-rc1-prerelease

Testing Notes

None

Status

Assignee

Samuel Le Berrigaud

Reporter

Alexander Hennecke

Labels

Add-on Type

None

Team

None

CC

None

Risk factor

None

QA Kickoff Status

None

QA Demo Status

None

Fix versions

Affects versions

ao-plugin 0.14.2

Priority

Blocker