'Assertion botch: negative time' Error is Thrown When Trying to Restore Backup Data
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Symptoms
Unable to restore backup data into JIRA instance, with the following exception being thrown in the logs file:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
2012-01-08 09:55:33,466 pool-2-thread-8 ERROR anonymous 33745x48x1 1aazszi http://jiraftc.ftc.ru:9101/secure/SetupImport.jspa [com.atlassian.jira.action.admin.OfbizImportHandler$1] Exception importing entity: java.lang.RuntimeException: Assertion botch: negative time
java.lang.RuntimeException: Assertion botch: negative time
at oracle.jdbc.driver.DateCommonBinder.setOracleHMS(OraclePreparedStatement.java:17446)
at oracle.jdbc.driver.TimestampBinder.bind(OraclePreparedStatement.java:17951)
at oracle.jdbc.driver.OraclePreparedStatement.setupBindBuffers(OraclePreparedStatement.java:3014)
at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:2247)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3444)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3530)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1062)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
at org.ofbiz.core.entity.jdbc.SQLProcessor.executeUpdate(SQLProcessor.java:535)
at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:115)
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:480)
at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:460)
at org.ofbiz.core.entity.GenericValue.create(GenericValue.java:77)
at com.atlassian.jira.action.admin.OfbizImportHandler$1.run(OfbizImportHandler.java:309)
at com.atlassian.jira.util.concurrent.BoundedExecutor$1.run(BoundedExecutor.java:42)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
2012-01-08 09:55:33,470 http-9101-Processor19 ERROR anonymous 33745x48x1 1aazszi http://jiraftc.ftc.ru:9101/secure/SetupImport.jspa [com.atlassian.jira.action.admin.DataImport] Error importing data: org.apache.commons.lang.exception.NestableException: com.atlassian.jira.exception.DataAccessException: java.lang.RuntimeException: Assertion botch: negative time
org.apache.commons.lang.exception.NestableException: com.atlassian.jira.exception.DataAccessException: java.lang.RuntimeException: Assertion botch: negative time
at com.atlassian.jira.action.admin.OfbizImportHandler.startElement(OfbizImportHandler.java:94)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
.....
Caused by: org.apache.commons.lang.exception.NestableException: com.atlassian.jira.exception.DataAccessException: java.lang.RuntimeException: Assertion botch: negative time
... 122 more
Caused by: com.atlassian.jira.exception.DataAccessException: java.lang.RuntimeException: Assertion botch: negative time
at com.atlassian.jira.action.admin.OfbizImportHandler$1.run(OfbizImportHandler.java:320)
at com.atlassian.jira.util.concurrent.BoundedExecutor$1.run(BoundedExecutor.java:42)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
... 1 more
Caused by: java.lang.RuntimeException: Assertion botch: negative time
at oracle.jdbc.driver.DateCommonBinder.setOracleHMS(OraclePreparedStatement.java:17446)
at oracle.jdbc.driver.TimestampBinder.bind(OraclePreparedStatement.java:17951)
at oracle.jdbc.driver.OraclePreparedStatement.setupBindBuffers(OraclePreparedStatement.java:3014)
at oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:2247)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3444)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3530)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1062)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPrepar
.....
Cause
This problem only occurs when we have JIRA running with Oracle database, and the root cause behind the problem could be because the System Time is inconsistent with the Database Server time.
Resolution
This issue can be fixed by appending -Duser.timezone property in the JVM startup option, e.g.:
-Duser.timezone=GMT+8
ℹ️ More details on adding the property, kindly refer to the docs on Setting Properties and Options on Startup
Was this helpful?