Skip to Content
author's profile photo Former Member
Former Member

SAP UI5 ODATA SubmitBatch Error

Hi All,

Can someone please help me with this issue?

I am trying to call XS Odata service and trying to insert the data via a procedure, When calling individually, the procedure is working fine while inserting data.

But i am now using that XSODATA service from UI5 and sending the data via batch and facing the below problem.

Code

var oModel = new sap.ui.model.odata.ODataModel("https://s9hanaxs.hanatrial.ondemand.com/c5208507trial/hanainstance/ETATracker/ETATrackerBL/services/eta.xsodata");

batchPush.push(oModel.createBatchOperation("/ETAData","POST", data.etaExcel[0])); // data.etaExcel[0] is in json format

oModel.addBatchChangeOperations(batchPush);

oModel.submitBatch(

function(){

jQuery.proxy(function(mResponse) {

sap.m.MessageToast.show("Saved Successfully");

},this)

},

function(){error : jQuery.proxy(function(mResponse) {

sap.m.MessageToast.show("Problem creating new data");

}, this )}

);

ERROR

2015-11-05 21:44:36 The following problem occurred: HTTP request failed500,Internal Server Error,<?xml version="1.0" encoding="utf-8" standalone="yes"?><error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><code/><message xml:lang="en-US">Programming error.</message><innererror><exception>exception 1: no.2 (XSEngine/ResourceHandling/OData/Error.cpp:178)

OData programming error

exception throw location:

1: 0x00007f43aec1f9a4 in odata::error::Report::error(odata::error::Code::Number)+0xf0 at Error.cpp:178 (libxsengine.so)

2: 0x00007f43aec3fd86 in odata::XmlEntityHandler::XML_StartElementHandler(char const*, char const**)+0x1f2 at XmlEntityHandler.cpp:80 (libxsengine.so)

3: 0x00007f43a69e24a9 in doContent+0xb21 (libhdbbasement.so)

4: 0x00007f43a69e157a in contentProcessor+0x59 (libhdbbasement.so)

5: 0x00007f43a69e6075 in doProlog+0x9bc (libhdbbasement.so)

6: 0x00007f43a69e56b3 in prologProcessor+0x9f (libhdbbasement.so)

7: 0x00007f43a69e50f5 in prologInitProcessor+0x55 (libhdbbasement.so)

8: 0x00007f43a69e0945 in XML_ParseBuffer+0x102 (libhdbbasement.so)

9: 0x00007f43a69e0832 in XML_Parse+0x20a (libhdbbasement.so)

10: 0x00007f43aec3e840 in odata::XmlParser::parse(odata::RequestContext&, xsengine::WebRequest const&)+0x300 at XmlParser.cpp:37 (libxsengine.so)

11: 0x00007f43aec0bd08 in odata::RequestParser::parseData(xsengine::WebRequest const&)+0x114 at RequestParser.cpp:1157 (libxsengine.so)

12: 0x00007f43aec0ec0f in odata::RequestParser::parse(odata::RequestContext&, ltt::basic_string<char, ltt::char_traits<char> > const&, xsengine::WebRequest const&)+0x9b at RequestParser.cpp:81 (libxsengine.so)

13: 0x00007f43aeba38d5 in xsengine::ODataSuffixHandler::execute(xsengine::WebRequestInternal const&, xsengine::WebResponseInternal&, xsengine::ResourceHandler::Context const&, ltt::smartptr_handle<xsengine::RepositoryCache::CachedBinary> const&)+0xa81 at ODataSuffixHandler.cpp:215 (libxsengine.so)

14: 0x00007f43aeba5243 in xsengine::ODataSuffixHandler::handleRequest(xsengine::WebRequestInternal const&, xsengine::WebResponseInternal&, xsengine::ResourceHandler::Context const&)+0x270 at ODataSuffixHandler.cpp:74 (libxsengine.so)

15: 0x00007f43aeb7d294 in xsengine::RequestHandler::handleRequest(xsengine::IOInterface&, xsengine::XSThreadControlInterface&)+0x28c0 at RequestHandler.cpp:490 (libxsengine.so)

16: 0x00007f43aeb75ee8 in xsengine::XSThread::run(void*)+0x1f4 at XSThread.cpp:73 (libxsengine.so)

17: 0x00007f43a63bef72 in TrexThreads::PoolThread::run()+0x850 at PoolThread.cpp:265 (libhdbbasement.so)

18: 0x00007f43a63c0ad8 in TrexThreads::PoolThread::run(void*&)+0x14 at PoolThread.cpp:124 (libhdbbasement.so)

19: 0x00007f439b877f17 in Execution::Thread::staticMainImp(void**)+0xa93 at Thread.cpp:476 (libhdbbasis.so)

20: 0x00007f439b87845d in Execution::Thread::staticMain(void*)+0x39 at Thread.cpp:546 (libhdbbasis.so)

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 06, 2015 at 02:35 PM

    Solved it by myself, i am passing incorrect json data to XSOData service

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 06, 2015 at 03:59 AM

    Anyone have an idea about this error, this error log is taken from browser console and i think its coming from xs engine.

    When i am trying to post it using postman, its working. but from ui5, the error is coming

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.