ArgumentNullException when querying many fields
ArgumentNullException when querying many fields
Here is my scenario:
I have built a WCF Data (oData) service that is using dotConnect for Ora provider, version 5.70.190.0. When I execute a query to a single entity, selecting up to 8 properties, all is well. However, if I add just one more property/column to the list of selects I get the following exception (the type of the newly added property does not seem to make any difference) :
ArgumentNullException: Value cannot be null.Parameter name: value
and here is the stack trace:
at System.Data.Services.WebUtil.CheckArgumentNull[T](T value, String parameterName)
at System.Data.Services.Internal.ProjectedWrapper.set_PropertyNameList(String value)
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.Internal.ProjectedWrapper.EnumeratorWrapper.MoveNext()
at System.Data.Services.DataService`1.SerializeResponseBody(RequestDescription description, IDataService dataService)
at System.Data.Services.DataService`1.HandleNonBatchRequest(RequestDescription description)
at System.Data.Services.DataService`1.HandleRequest()
I saw forums that mention similar problems, but it was recommended that the users upgrade and I am already using the latest version of the dotConnect for Ora.
Does anyone have any idea where I need to look at?
Is this a known issue?
It appears that the length of the URL is in play here - if I have it under around 180 characters it works, if it is higher than that, not so much.
Many thanks in advance, G.
I have built a WCF Data (oData) service that is using dotConnect for Ora provider, version 5.70.190.0. When I execute a query to a single entity, selecting up to 8 properties, all is well. However, if I add just one more property/column to the list of selects I get the following exception (the type of the newly added property does not seem to make any difference) :
ArgumentNullException: Value cannot be null.Parameter name: value
and here is the stack trace:
at System.Data.Services.WebUtil.CheckArgumentNull[T](T value, String parameterName)
at System.Data.Services.Internal.ProjectedWrapper.set_PropertyNameList(String value)
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.Internal.ProjectedWrapper.EnumeratorWrapper.MoveNext()
at System.Data.Services.DataService`1.SerializeResponseBody(RequestDescription description, IDataService dataService)
at System.Data.Services.DataService`1.HandleNonBatchRequest(RequestDescription description)
at System.Data.Services.DataService`1.HandleRequest()
I saw forums that mention similar problems, but it was recommended that the users upgrade and I am already using the latest version of the dotConnect for Ora.
Does anyone have any idea where I need to look at?
Is this a known issue?
It appears that the length of the URL is in play here - if I have it under around 180 characters it works, if it is higher than that, not so much.
Many thanks in advance, G.
Thanks Andrey!
Thanks Andrey!
I have sent a sample solution to [email protected] that clearly illustrates the issue. Please review and advise.
G.
I have sent a sample solution to [email protected] that clearly illustrates the issue. Please review and advise.
G.
Please put the following line in the constructor of your context (the Devart.Data.Oracle.Entity.OracleEntityProviderServices class is defined in the %ProgramFiles%\Devart\dotConnect\Oracle\Entity\EF4\Devart.Data.Oracle.Entity.dll assembly):
Refer to http://blogs.planetsoftware.com.au/paul ... d-wcf.aspx . This is actually the problem of WCF Data Services which doesn't take into account the peculiarities of other RDMS (Oracle treats empty strings in varchar columns as null).
Code: Select all
Devart.Data.Oracle.Entity.OracleEntityProviderServices.HandleNullStringsAsEmptyStrings = true;
Re: ArgumentNullException when querying many fields
This problem was solved in WCF Data Service 5.0.2: "Fixes a bug where projections involving more than eight columns would fail if the EF Oracle provider was being used" (http://blogs.msdn.com/b/astoriateam/arc ... eased.aspx)
No workaround from provider's side is needed now.
No workaround from provider's side is needed now.