The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value.

Tuesday, June 14, 2016
Avatar
We're using a script written in Python to update the status of our test case after an automated test has run. Since previous week we're trying out SpiraTeam 5.0.0.3.
To perform the update we're making use of SOAP.

Since we've upgraded we're experiencing following error in our script:

DEBUG:suds.client:headers = {'SOAPAction': '"https://www.inflectra.com/SpiraTest/Services/v4.0/IImportExport/TestSet_Update"', 'Content-Type': 'text/xml; charset=utf-8'}
DEBUG:suds.client:HTTP failed - 500 - Internal Server Error:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">a:InternalServiceFault</faultcode><faultstring xml:lang="nl-BE">An error occurred while updating the entries. See the inner exception for details.</faultstring><detail><ExceptionDetail xmlns="http://schemas.datacontract.org/2004/07/System.ServiceModel" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><HelpLink i:nil="true"/><InnerException><HelpLink i:nil="true"/><InnerException i:nil="true"/><Message>The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value.&#xD;
The statement has been terminated.</Message><StackTrace>   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)&#xD;
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)&#xD;
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean&amp; dataReady)&#xD;
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)&#xD;
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task&amp; task, Boolean asyncWrite, SqlDataReader ds)&#xD;
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task&amp; task, Boolean asyncWrite)&#xD;
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)&#xD;
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()&#xD;
   at System.Data.Mapping.Update.Internal.DynamicUpdateCommand.Execute(UpdateTranslator translator, EntityConnection connection, Dictionary`2 identifierValues, List`1 generatedValues)&#xD;
   at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter)</StackTrace><Type>System.Data.SqlClient.SqlException</Type></InnerException><Message>An error occurred while updating the entries. See the inner exception for details.</Message><StackTrace>   at System.Data.Mapping.Update.Internal.UpdateTranslator.Update(IEntityStateManager stateManager, IEntityAdapter adapter)&#xD;
   at System.Data.Objects.ObjectContext.SaveChanges(SaveOptions options)&#xD;
   at Inflectra.SpiraTest.Business.SpiraTestEntitiesEx.SaveChanges(SaveOptions options, Nullable`1 userId, Boolean updateHistory, Boolean sendNotification, Nullable`1 rollbackId)&#xD;
   at Inflectra.SpiraTest.Business.SpiraTestEntitiesEx.SaveChanges(Nullable`1 userId, Boolean updateHistory, Boolean sendNotification, Nullable`1 rollbackId)&#xD;
   at Inflectra.SpiraTest.Business.TestSetManager.Update(TestSet testSet, Int32 userId, Nullable`1 rollbackId, Boolean updHistory)&#xD;
   at Inflectra.SpiraTest.Web.Services.v4_0.ImportExport.TestSet_Update(RemoteTestSet remoteTestSet)&#xD;
   at SyncInvokeTestSet_Update(Object , Object[] , Object[] )&#xD;
   at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]&amp; outputs)&#xD;
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp; rpc)&#xD;
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp; rpc)&#xD;
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc&amp; rpc)&#xD;
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</StackTrace><Type>System.Data.UpdateException</Type></ExceptionDetail></detail></s:Fault></s:Body></s:Envelope>
ERROR:suds.client:<suds.sax.document.Document instance at 0x891004c>

Were there any changes in this version that could cause this error?



1 Replies
Tuesday, June 14, 2016
Avatar
re: nlie Tuesday, June 14, 2016
Hi Nicholas

The v4.0 API was designed to be backwards compatible with v4.x clients in general.

It could be that a date field is out of the expected range.

I would recommend logging a help desk ticket and providing more information on the data being sent.

Thanks
Adam

Spira Helps You Deliver Quality Software, Faster and With Lower Risk

And if you have any questions, please email or call us at +1 (202) 558-6885

 

Statistics
  • Started: Tuesday, June 14, 2016
  • Last Reply: Tuesday, June 14, 2016
  • Replies: 1
  • Views: 5452