JETI Incoming email issue - SQL Exception while setting value

We upgraded from JIRA 6.4.12 to 7.1.0, and also upgraded JETI to 7.0.14. JETI is now unable to create issues from incoming mail.

Our database is MS SQL Server 2012.

The stack trace is

javax.mail.MessagingException: com.atlassian.jira.workflow.WorkflowException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:CustomFieldValue][parentkey,null][customfield,10013][issue,31374][datevalue,0001-01-01 10:00:00.0][id,47448] (SQL Exception while setting value:  (Only dates between January 1, 1753 and December 31, 9999 are accepted.));   nested exception is: javax.mail.MessagingException: com.atlassian.jira.workflow.WorkflowException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:CustomFieldValue][parentkey,null][customfield,10013][issue,31374][datevalue,0001-01-01 10:00:00.0][id,47448] (SQL Exception while setting value: (Only dates between January 1, 1753 and December 31, 9999 are accepted.));   nested exception is: com.atlassian.jira.exception.CreateException: com.atlassian.jira.workflow.WorkflowException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:CustomFieldValue][parentkey,null][customfield,10013][issue,31374][datevalue,0001-01-01 10:00:00.0][id,47448] (SQL Exception while setting value:  (Only dates between January 1, 1753 and December 31, 9999 are accepted.)) at com.metainf.jira.plugin.emailissue.handler.AbstractMailHandler.handleMessage(AbstractMailHandler.java:138) at com.metainf.jira.plugin.emailissue.handler.EmailThisIssueMailHandler.handleMessage(EmailThisIssueMailHandler.java:509) at com.atlassian.jira.service.services.mail.MailFetcherService$1.process(MailFetcherService.java:376) at com.atlassian.jira.service.services.mail.MailFetcherService$MessageProviderImpl.getAndProcessMail(MailFetcherService.java:255) at com.atlassian.jira.service.services.mail.MailFetcherService.runImpl(MailFetcherService.java:366) at com.atlassian.jira.service.services.file.AbstractMessageHandlingService.run(AbstractMessageHandlingService.java:229) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:61) at com.atlassian.jira.service.ServiceRunner.runService(ServiceRunner.java:62) at com.atlassian.jira.service.ServiceRunner.runServiceId(ServiceRunner.java:44) at com.atlassian.jira.service.ServiceRunner.runJob(ServiceRunner.java:32) at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:153) at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:118) at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:97) at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.launchJob(CaesiumSchedulerService.java:401) at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeClusteredJob(CaesiumSchedulerService.java:396) at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeQueuedJob(CaesiumSchedulerService.java:349) at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService$1.consume(CaesiumSchedulerService.java:255) at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService$1.consume(CaesiumSchedulerService.java:252) at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeJob(SchedulerQueueWorker.java:65) at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeNextJob(SchedulerQueueWorker.java:59) at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.run(SchedulerQueueWorker.java:34) at java.lang.Thread.run(Thread.java:745) Caused by: javax.mail.MessagingException: com.atlassian.jira.workflow.WorkflowException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:CustomFieldValue][parentkey,null][customfield,10013][issue,31374][datevalue,0001-01-01 10:00:00.0][id,47448] (SQL Exception while setting value:  (Only dates between January 1, 1753 and December 31, 9999 are accepted.));   nested exception is: com.atlassian.jira.exception.CreateException: com.atlassian.jira.workflow.WorkflowException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:CustomFieldValue][parentkey,null][customfield,10013][issue,31374][datevalue,0001-01-01 10:00:00.0][id,47448] (SQL Exception while setting value:  (Only dates between January 1, 1753 and December 31, 9999 are accepted.)) at com.metainf.jira.plugin.emailissue.handler.CreateIssueHandler.handleMessage(CreateIssueHandler.java:228) at com.metainf.jira.plugin.emailissue.handler.ReporterResolvingCreateOrCommentHandler.handleMessage(ReporterResolvingCreateOrCommentHandler.java:138) at com.metainf.jira.plugin.emailissue.handler.CreateOrCommentWithRegexpHandler.handleMessage(CreateOrCommentWithRegexpHandler.java:49) at com.metainf.jira.plugin.emailissue.handler.AbstractMailHandler.handleMessage(AbstractMailHandler.java:125) ... 21 more Caused by: com.atlassian.jira.exception.CreateException: com.atlassian.jira.workflow.WorkflowException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:CustomFieldValue][parentkey,null][customfield,10013][issue,31374][datevalue,0001-01-01 10:00:00.0][id,47448] (SQL Exception while setting value:  (Only dates between January 1, 1753 and December 31, 9999 are accepted.)) at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssue(DefaultIssueManager.java:515) at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssueObject(DefaultIssueManager.java:604) at com.atlassian.jira.service.util.handler.DefaultMessageHandlerContext.createIssueWithIssueManager(DefaultMessageHandlerContext.java:248) at com.atlassian.jira.service.util.handler.DefaultMessageHandlerContext.createIssue(DefaultMessageHandlerContext.java:166) at com.atlassian.jira.service.services.mail.DelegatingMessageHandlerContext.createIssue(DelegatingMessageHandlerContext.java:43) at com.metainf.jira.plugin.emailissue.handler.EmailThisIssueMailHandler$1.createIssue(EmailThisIssueMailHandler.java:337) at com.metainf.jira.plugin.emailissue.handler.IssueSupportingMessageHandlerContext.createIssue(IssueSupportingMessageHandlerContext.java:56) at com.metainf.jira.plugin.emailissue.handler.CreateIssueHandler.createIssueInContext(CreateIssueHandler.java:242) at com.metainf.jira.plugin.emailissue.handler.CreateIssueHandler.handleMessage(CreateIssueHandler.java:221) ... 24 more Caused by: com.atlassian.jira.workflow.WorkflowException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:CustomFieldValue][parentkey,null][customfield,10013][issue,31374][datevalue,0001-01-01 10:00:00.0][id,47448] (SQL Exception while setting value:  (Only dates between January 1, 1753 and December 31, 9999 are accepted.)) at com.atlassian.jira.workflow.OSWorkflowManager.createIssue(OSWorkflowManager.java:767) at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssue(DefaultIssueManager.java:506) ... 32 more Caused by: com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:CustomFieldValue][parentkey,null][customfield,10013][issue,31374][datevalue,0001-01-01 10:00:00.0][id,47448] (SQL Exception while setting value:  (Only dates between January 1, 1753 and December 31, 9999 are accepted.)) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.createValue(DefaultOfBizDelegator.java:299) at com.atlassian.jira.ofbiz.WrappingOfBizDelegator.createValue(WrappingOfBizDelegator.java:172) at com.atlassian.jira.issue.customfields.persistence.OfBizCustomFieldValuePersister.createValuesInt(OfBizCustomFieldValuePersister.java:113) at com.atlassian.jira.issue.customfields.persistence.OfBizCustomFieldValuePersister.updateValues(OfBizCustomFieldValuePersister.java:128) at com.atlassian.jira.issue.customfields.persistence.EagerLoadingOfBizCustomFieldPersister.updateValues(EagerLoadingOfBizCustomFieldPersister.java:52) at com.atlassian.jira.issue.customfields.persistence.OfBizCustomFieldValuePersister.createValues(OfBizCustomFieldValuePersister.java:96) at com.atlassian.jira.issue.customfields.persistence.EagerLoadingOfBizCustomFieldPersister.createValues(EagerLoadingOfBizCustomFieldPersister.java:40) at com.atlassian.jira.issue.customfields.persistence.OfBizCustomFieldValuePersister.createValues(OfBizCustomFieldValuePersister.java:89) at com.atlassian.jira.issue.customfields.persistence.EagerLoadingOfBizCustomFieldPersister.createValues(EagerLoadingOfBizCustomFieldPersister.java:34) at com.atlassian.jira.issue.customfields.impl.AbstractSingleFieldType.createValue(AbstractSingleFieldType.java:138) at com.atlassian.jira.issue.fields.CustomFieldImpl.createValue(CustomFieldImpl.java:729) at com.atlassian.jira.workflow.function.issue.IssueCreateFunction.execute(IssueCreateFunction.java:81) at com.opensymphony.workflow.AbstractWorkflow.executeFunction(AbstractWorkflow.java:1050) at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1446) at com.opensymphony.workflow.AbstractWorkflow.initialize(AbstractWorkflow.java:615) at com.atlassian.jira.workflow.OSWorkflowManager.createIssue(OSWorkflowManager.java:741) ... 33 more Caused by: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:CustomFieldValue][parentkey,null][customfield,10013][issue,31374][datevalue,0001-01-01 10:00:00.0][id,47448] (SQL Exception while setting value:  (Only dates between January 1, 1753 and December 31, 9999 are accepted.)) at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:213) at org.ofbiz.core.entity.GenericDAO.insert(GenericDAO.java:178) at org.ofbiz.core.entity.GenericHelperDAO.create(GenericHelperDAO.java:83) at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:556) at org.ofbiz.core.entity.GenericDelegator.create(GenericDelegator.java:542) at org.ofbiz.core.entity.GenericValue.create(GenericValue.java:97) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.createValue(DefaultOfBizDelegator.java:296) ... 48 more Caused by: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while setting value:  (Only dates between January 1, 1753 and December 31, 9999 are accepted.) at org.ofbiz.core.entity.jdbc.SqlJdbcUtil.setValue(SqlJdbcUtil.java:885) at org.ofbiz.core.entity.jdbc.SqlJdbcUtil.setValue(SqlJdbcUtil.java:765) at org.ofbiz.core.entity.jdbc.SqlJdbcUtil.setValues(SqlJdbcUtil.java:553) at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:204) ... 54 more Caused by: java.sql.SQLException: Only dates between January 1, 1753 and December 31, 9999 are accepted. at net.sourceforge.jtds.jdbc.DateTime.packDate(DateTime.java:301) at net.sourceforge.jtds.jdbc.DateTime.<init>(DateTime.java:113) at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.setParameter(JtdsPreparedStatement.java:665) at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.setTimestamp(JtdsPreparedStatement.java:1100) at org.apache.commons.dbcp2.DelegatingPreparedStatement.setTimestamp(DelegatingPreparedStatement.java:159) at org.apache.commons.dbcp2.DelegatingPreparedStatement.setTimestamp(DelegatingPreparedStatement.java:159) at org.ofbiz.core.entity.jdbc.SQLProcessor.setValue(SQLProcessor.java:878) at org.ofbiz.core.entity.jdbc.SqlJdbcUtil.setValue(SqlJdbcUtil.java:804) ... 57 more

1 answer

1 accepted

0 votes
Accepted answer

I looked up the custom field with id 10013, it was a date time picker custom field which was not being used in this particular Jira project. Luckily the field wasn't being used any more in other projects so I deleted it, which seems to have fixed the problem.

Hi Brendan,

Do you need any help with this problem? 

Tibor

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,172 views 5 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you