You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Chandan V.A (JIRA)" <ji...@apache.org> on 2014/01/12 18:44:51 UTC

[jira] [Resolved] (OLINGO-102) Deep insert throws NPE

     [ https://issues.apache.org/jira/browse/OLINGO-102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chandan V.A resolved OLINGO-102.
--------------------------------

       Resolution: Fixed
    Fix Version/s: V2 1.1.0

> Deep insert throws NPE
> ----------------------
>
>                 Key: OLINGO-102
>                 URL: https://issues.apache.org/jira/browse/OLINGO-102
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-jpa
>    Affects Versions: V2 1.0.0
>            Reporter: Stephen Cherian
>            Assignee: Chandan V.A
>            Priority: Critical
>             Fix For: V2 1.1.0
>
>
>   I was migrating my project based on SAP OData to Olingo. When i try to do a deep insert i get a HTTP 400 and  response message value as ""An exception of type 'NullPointerException' occurred.". This was working fine with SAP OData libraries v 0.7.0. Find the XML Header below
> <?xml version='1.0' encoding='utf-8'?><entry xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xml:base="http://localhost:8080/espm-model-web/espm.svc/"><link rel= "http://schemas.microsoft.com/ado/2007/08/dataservices/related/Customers" type="application/atom+xml;type=entry" title="Customer" href="Customers('100000008')" /><category term="com.sap.espm.modelModel.SalesOrderHeader" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/SalesOrderItems" type="application/atom+xml;type=feed" title="SalesOrderItems" href="SalesOrderHeaders('800000')/SalesOrderItems"><m:inline><feed><entry><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Products" type="application/atom+xml;type=entry" title="Product" href="Products('HT-1002')"/><category term="com.sap.espm.model.SalesOrderItem" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/><content type="application/atom+xml"><m:properties><d:ItemNumber>10</d:ItemNumber><d:CurrencyCode>EUR</d:CurrencyCode><d:QuantityUnit>PC</d:QuantityUnit><d:Quantity m:type="Edm.Decimal">1</d:Quantity><d:DeliveryDate m:type="Edm.DateTime">2012-11-27T18:31:59</d:DeliveryDate><d:ProductId>HT-1002</d:ProductId></m:properties></content></entry></feed></m:inline></link><content type="application/atom+xml"><m:properties><d:CustomerId>100000028</d:CustomerId><d:CurrencyCode>EUR</d:CurrencyCode></m:properties></content></entry>
> The exception is thrown from the  the class org.apache.olingo.odata2.core.ep.consumer.XmlEntityConsumer method- readLinks. The actual error thrown is "org.apache.olingo.odata2.api.ep.EntityProviderException: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
>  at [row,col {unknown-source}]: [1,0]"



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)