Expected 8 byte array error with ORM Azure Backend

5 posts, 0 answers
  1. Adonis
    Adonis avatar
    34 posts
    Member since:
    Nov 2008

    Posted 01 Feb 2012 Link to this post

    I'm getting an error after updating and deploying a working ORM web application to azure, I have updated the model to use Azure from a
    previous SQL model the error is below, I'm not sure where exactly the error is being generated but any help is appreciated

    Source Error:
     
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
     
    Stack Trace:
     
    [ArgumentException: Expected 8 byte array]
       OpenAccessRuntime.Data.EightBytes2LongConverter.Read(DataHolder& data) +702
       Telerik.OpenAccess.RT.Adonet2Generic.Impl.BufferingReader.GetValuesInternal() +221
       Telerik.OpenAccess.RT.Adonet2Generic.Impl.BufferingReader.EnsureRead(Int32 rdpos) +89
       Telerik.OpenAccess.RT.Adonet2Generic.Impl.BufferingReader.EnsureLastRowRead() +21
       Telerik.OpenAccess.RT.Adonet2Generic.Impl.BufferingReader.HandleImmediateResolve() +24
       Telerik.OpenAccess.RT.Adonet2Generic.Impl.BufferingReader.SetConverter(ConverterUsage[] usages) +212
       OpenAccessRuntime.Relational.fetch.FetchResultImp.Execute() +100
     
    [DataStoreException: Error executing query: System.ArgumentException: Expected 8 byte array
       at OpenAccessRuntime.Data.EightBytes2LongConverter.Read(DataHolder& data)
       at Telerik.OpenAccess.RT.Adonet2Generic.Impl.BufferingReader.GetValuesInternal()
       at Telerik.OpenAccess.RT.Adonet2Generic.Impl.BufferingReader.EnsureRead(Int32 rdpos)
       at Telerik.OpenAccess.RT.Adonet2Generic.Impl.BufferingReader.EnsureLastRowRead()
       at Telerik.OpenAccess.RT.Adonet2Generic.Impl.BufferingReader.HandleImmediateResolve()
       at Telerik.OpenAccess.RT.Adonet2Generic.Impl.BufferingReader.SetConverter(ConverterUsage[] usages)
       at OpenAccessRuntime.Relational.fetch.FetchResultImp.Execute()
    SQL:
    SELECT b.[ChangeRequestID] AS COL1, b.[ChangeRequestStatusTypeID] AS COL2, b.[CompletedDate] AS COL3, b.[Content] AS COL4, b.[CreatedByUser] AS COL5, b.[CreatedDate] AS COL6, b.[Description] AS COL7, b.[InitiatedDate] AS COL8, b.[ModifiedByUser] AS COL9, b.[ModifiedDate] AS COL10, b.[PersonID] AS COL11, b.[RevisionID] AS COL12, b.[SubSectionID] AS COL13, b.[Title] AS COL14, b.[ts] AS COL15, b.[WorkingTime] AS COL16 FROM [Revision] a LEFT JOIN [ChangeRequest] AS b ON (a.[RevisionID] = b.[RevisionID]) WHERE a.[RevisionID] = ?                                        System.ArgumentException: Expected 8 byte array
       at OpenAccessRuntime.Data.EightBytes2LongConverter.Read(DataHolder& data)
       at Telerik.OpenAccess.RT.Adonet2Generic.Impl.BufferingReader.GetValuesInternal()
       at Telerik.OpenAccess.RT.Adonet2Generic.Impl.BufferingReader.EnsureRead(Int32 rdpos)
       at Telerik.OpenAccess.RT.Adonet2Generic.Impl.BufferingReader.EnsureLastRowRead()
       at Telerik.OpenAccess.RT.Adonet2Generic.Impl.BufferingReader.HandleImmediateResolve()
       at Telerik.OpenAccess.RT.Adonet2Generic.Impl.BufferingReader.SetConverter(ConverterUsage[] usages)
       at OpenAccessRuntime.Relational.fetch.FetchResultImp.Execute()]
       OpenAccessRuntime.ExceptionWrapper.Throw() +13
       OpenAccessRuntime.DataObjects.PCStateMan.handleException(Exception x) +106
       OpenAccessRuntime.DataObjects.PCStateMan.getObjectFieldImp(PersistenceCapable pc, FieldMetaData fmd, Object currentValue) +183
       JetStream.Data.Entities.Revision.OpenAccessEnhancedGet_changeRequests(Revision ) +80
       JetStream.Data.DataProxy.GetAllActionActionAlerts(Person _currentUser) in C:\JetStreamAzure\JetStreamV2\JetStream.Data\DataProxy.cs:2520
       JetStream.admin._default.AdminAlerts_NeedDataSource2(Object sender, GridNeedDataSourceEventArgs e) in C:\JetStreamAzure\JetStreamV2\JetStream\admin\default.aspx.cs:38
       Telerik.Web.UI.RadGrid.OnNeedDataSource(GridNeedDataSourceEventArgs e) +191
       Telerik.Web.UI.RadGrid.AutoDataBind(GridRebindReason rebindReason) +109
       Telerik.Web.UI.RadGrid.OnLoad(EventArgs e) +254
       System.Web.UI.Control.LoadRecursive() +71
       System.Web.UI.Control.LoadRecursive() +190
       System.Web.UI.Control.LoadRecursive() +190
       System.Web.UI.Control.LoadRecursive() +190
       System.Web.UI.Control.LoadRecursive() +190
       System.Web.UI.Control.LoadRecursive() +190
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3064
  2. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 06 Feb 2012 Link to this post

    Hi Adonis,
    The EightBytes2LongConverter is used to handle the translation between a long field in your persistent model and a timestamp column in the sql server. The error looks like the value coming from the server is not a timestamp but something different. Is there a difference between your local database and the sql azure instance? Can you have a look where you use a timestamp and how the field in your class is typed?

    Greetings,
    Jan Blessenohl
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft banner
  4. Adonis
    Adonis avatar
    34 posts
    Member since:
    Nov 2008

    Posted 20 Feb 2012 Link to this post

    Thank you for your response , I am still having trouble with this error.

    I have a few other tables where the select occurs fine and they all have a timestamp column, any ideas? I know it's definitely ORM / Azure related but I do not know what needs to be modified.

    Other Notes:
    I have scripted the same database from SQL 2008 R2  to Azure , The application works without error using SQL 2008
  5. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 23 Feb 2012 Link to this post

    Hello,
    Maybe it is related to special values, can you find out which values you are trying to read? Can you execute the sql statement in the management studio and see if there is something special returned in the [ts] column?

    Is the [ts] column really a timestamp column or something slightly different?

    I have added some more information to the exception now but that does not help you immediately.

    Kind regards,
    Jan Blessenohl
    the Telerik team
    Telerik OpenAccess ORM Q1 2012 release is here! Check out what's new or download a free trial >>
  6. Adonis
    Adonis avatar
    34 posts
    Member since:
    Nov 2008

    Posted 26 Feb 2012 Link to this post

    Thanks , I have not resolved the issue but the ts column was being used as the concurrency member , I have started using a datetime column as the concurrency member to get around the issue, the ts column seemed fine and running queries directly in SQL did not yield any errors.

    Thanks for your help on this , I will move forward using the date time columns
Back to Top
DevCraft banner