Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
5 replies Latest Post - ‏2013-01-17T08:49:52Z by SystemAdmin
SystemAdmin
SystemAdmin
2826 Posts
ACCEPTED ANSWER

Pinned topic Odata Query generation Problems 2

‏2013-01-08T07:29:12Z |
When using the Odata tools I also found another thing which might have to do something with the other problem I posted
(Syntax Error in Odata Query generation) . For this problem I also made a demo . I

I am using Informix IBM.Data.DB2.Dll Version 10.1.0.4 // with latest december version this also happens
Microsoft Data.EDM 5.0.0.50808
Entity Framework 4.1.1.0.715

In the Demo I Attached I found out that it seems to be a problem of the IBM Driver.

when I call http://localhost:53732/WcfDemoService.svc/article?$top=10&$expand=preiseinheit
( article contains two lines, preiseinheit contains no lines)

it crashes:

  • <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">

<message xml:lang="de-DE">Fehler beim Verarbeiten dieser Anforderung.</message>
- <innererror>
<message>Die Eigenschaft 'pe_faktor' bei 'preiseinheit' konnte nicht auf einen 'null'-Wert festgelegt werden. Sie müssen diese Eigenschaft auf einen Nicht-NULL-Wert des Typs 'Decimal' festlegen.</message>
<type>System.Data.ConstraintException</type>
<stacktrace>bei System.Data.Common.Internal.Materialization.Shaper.ErrorHandlingValueReader`1.GetValue(DbDataReader reader, Int32 ordinal) bei System.Data.Common.Internal.Materialization.Shaper.GetPropertyValueWithErrorHandlingTProperty(Int32 ordinal, String propertyName, String typeName) bei lambda_method(Closure , Shaper ) bei System.Data.Common.Internal.Materialization.Coordinator`1.ReadNextElement(Shaper shaper) bei System.Data.Common.Internal.Materialization.Shaper`1.SimpleEnumerator.MoveNext() bei System.Data.Services.Providers.BasicExpandProvider.ExpandedEnumerator`1.MoveNext() bei System.Data.Services.DataService`1.SerializeResponseBody(RequestDescription description, IDataService dataService, IODataResponseMessage responseMessage) bei System.Data.Services.DataService`1.HandleNonBatchRequest(RequestDescription description) bei System.Data.Services.DataService`1.HandleRequest()</stacktrace>
</innererror>
</error>

when I call without top it crashes not .

See my attached demo project
( Attach did not work so first without attach, maybe I can try to attacxh later )

Thank you
Updated on 2013-01-17T08:49:52Z at 2013-01-17T08:49:52Z by SystemAdmin
  • Arvind_Gupta
    Arvind_Gupta
    58 Posts
    ACCEPTED ANSWER

    Re: Odata Query generation Problems 2

    ‏2013-01-09T09:53:56Z  in response to SystemAdmin
    Hi,

    Can we please have the error message translated in English?

    To expedite the investigation on this and the other problem you posted, I would recommend that you open a PMR with IBM Technical support. I would need traces to analyze the problem. However, such a trace file would be a bit large to be submitting in this forum.

    Also could you please try attaching demo project again, that would help to understand the scenario.

    Thanks,
    Arvind
    • SystemAdmin
      SystemAdmin
      2826 Posts
      ACCEPTED ANSWER

      Re: Odata Query generation Problems 2

      ‏2013-01-10T08:20:21Z  in response to Arvind_Gupta
      Hi Arvind,
      The Message ( google translated) is the following

      The 'pe_faktor' in 'unit price' could not be set to a 'zero' value. You must set this property to a non-null value of type 'Decimal'. </ Message>
      <type> System.Data.ConstraintException </ type>
      <stacktrace> at System.Data.Common.Internal.Materialization.Shaper.ErrorHandlingValueReader `1.GetValue (DbDataReader reader, Int32 ordinal) at ordinal, String propertyName, String typeName) at lambda_method (Closure, Shaper) at System.Data.Common.Internal.Materialization.Coordinator `1.ReadNextElement shaper (shaper) at System.Data.Common.Internal.Materialization.Shaper` 1 SimpleEnumerator.MoveNext () at System.Data.Services.Providers.BasicExpandProvider.ExpandedEnumerator 1.MoveNext `()` at System.Data.Services.DataService 1.SerializeResponseBody (Request Description description, IDataService dataservice, IODataResponseMessage response message) at System.Data. Services.DataService `1.HandleNonBatchRequest (Request Description description) at System.Data.Services.DataService 1.HandleRequest` () </ stacktrace>

      I also now Try to attach the Zip with my demo project . This contains a commandline exe which makes up the demo service
      and an entity model .
      To make it run the two tables in an informix database have to be created according to the entity model .

      Thanks,
      Sascha
  • Arvind_Gupta
    Arvind_Gupta
    58 Posts
    ACCEPTED ANSWER

    Re: Odata Query generation Problems 2

    ‏2013-01-16T20:25:51Z  in response to SystemAdmin
    Hi,

    I am not able to reproduce this problem. I created WCF Data service with Odata V3 and the two tables in informix database as per the entity model present in your demo.

    As mentioned earlier, I would recommend you to open a PMR with IBM Technical support so that they can collect all necessary information to investigate it further.

    Thanks,
    Arvind
    • SystemAdmin
      SystemAdmin
      2826 Posts
      ACCEPTED ANSWER

      Re: Odata Query generation Problems 2

      ‏2013-01-17T07:36:23Z  in response to Arvind_Gupta
      Hi Arvind,

      Maybe I forgot to write in my post that this behaviour depends on the data

      article has 2 Zeilen preiseinheit is empty

      The wrong behaviour only appears when the table to join contains no values

      Thanks
      Sascha
    • SystemAdmin
      SystemAdmin
      2826 Posts
      ACCEPTED ANSWER

      Re: Odata Query generation Problems 2

      ‏2013-01-17T08:49:52Z  in response to Arvind_Gupta
      Hi Arvind,

      for better understanding of the Problem I attach a stacktrace where the first exception thrown is recoded with callstack .
      By the way, this problem is a supportcase already since december , but unfortunately I have no feedback at all until now.

      ( For the null value Problem also the decimal datatype seems to be important and the fact that preiseinheit table is empty )

      when I call http://localhost:53732/WcfDemoService.svc/article?$top=10&$expand=preiseinheit
      ( article contains two lines, preiseinheit contains no lines)

      it crashes: (I translated the exception manually )

      • <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">

      <message xml:lang="de-DE">Fehler beim Verarbeiten dieser Anforderung.</message>
      • <innererror>
      <message>Die property 'pe_faktor' bei 'preiseinheit' could not be set to a 'null'-value . you have to set this to anon.null value of type 'Decimal' .</message>
      <type>System.Data.ConstraintException</type>
      <stacktrace>bei System.Data.Common.Internal.Materialization.Shaper.ErrorHandlingValueReader`1.GetValue(DbDataReader reader, Int32 ordinal) bei System.Data.Common.Internal.Materialization.Shaper.GetPropertyValueWithErrorHandlingTProperty(Int32 ordinal, String propertyName, String typeName) bei lambda_method(Closure , Shaper ) bei System.Data.Common.Internal.Materialization.Coordinator`1.ReadNextElement(Shaper shaper) bei System.Data.Common.Internal.Materialization.Shaper`1.SimpleEnumerator.MoveNext() bei System.Data.Services.Providers.BasicExpandProvider.ExpandedEnumerator`1.MoveNext() bei System.Data.Services.DataService`1.SerializeResponseBody(RequestDescription description, IDataService dataService, IODataResponseMessage responseMessage) bei System.Data.Services.DataService`1.HandleNonBatchRequest(RequestDescription description) bei System.Data.Services.DataService`1.HandleRequest()</stacktrace>
      </innererror>
      </error>

      when I call without top it crashes not .
      Thanks
      Sascha