Error in oDataModel READ method

Hi Experts,
I am using read method in oDataModel. The code is below:
sap.ui.getCore().getModel().read("/E_EXCISE_DATA_SET", exData, null,true,
                                                         function(e){ alert("success"); },
                                                         function(oError){ alert("Insert Failure");  } );
It is throwing an error - "Uncaught TypeError: Object [object Array] has no method 'getPath' "
Actually I want to call the HTTP get method from the UI. In debugging mode I am getting above error. How to resolve this?
What are the parameters for read method I need to pass? Kindly provide the code example for the read method.
Thanks in advanced,
Regards,
Arindam Samanta.

Hi Arindam,
check once if you are getting object for sap.ui.getCore().getModel() (you should set model to the core before this code.) .
Here is the model defination :
var oDataModel=new sap.ui.model.odata.ODataModel("serviceUrl", true,"uName","Password");
and here is the read on that model and various paramaters:(This you can get in eclipse help)
oDataModel.read(sPath, oContext, oUrlParams, bAsync, fnSuccess, fnError);
Parameters: {string} sPath A string containing the path to the data which should be retrieved. The path is concatenated to the sServiceUrl which was specified in the model constructor.
                   {object} [oContext] If specified the sPath has to be is relative to the path given with the context.
                    {any[]} [oUrlParams] An map of url parameters which will be concatenated to the read url
                   {boolean} [bAsync] true for asynchronous requests. Default is true.
                    {function} [fnSuccess] a callback function which is called when the data has been successfully retrieved. The handler can have the following parameters: oData and response.
                   {function} [fnError] a callback function which is called when the request failed. The handler can have the parameter: oError which contains additional error information.
Ex :
Lets say you want to read the data from this service path :
http://<host>:<port>/sap/opu/odata/<service>/Employee('10000')
in that case you can define model as
var oDataModel=new sap.ui.model.odata.ODataModel("http://<host>:<port>/sap/opu/odata/<service>/", true,"uName","Password");
and read as
oDataModel.read("/Employee('10000')", null, null, false, function fnSuccess(oData){
alert("result :"oData);
},function fnError(response){
on success, fnSuccess will get fired and you should see resut : object alert message.
regards,
Vijay.

Similar Messages

  • JPEG image decode error with ImageIO.read() method

    Environment: Linux 64-bit, JDK 1.6.0_14 amd64, JAI 1.1.3 amd64
    When I tried to read this image http://farm4.static.flickr.com/3655/3591243423_a258d87ea6.jpg as URL or just the image 3591243423_a258d87ea6.jpg as a local file using ImageIO.read(URL), ImageIO.read(InputStream) or ImageIO.read(String), I got this exception:
    Caused by: java.lang.IllegalArgumentException: Numbers of source Raster bands and source color space components do not match
            at java.awt.image.ColorConvertOp.filter(ColorConvertOp.java:460)
            at com.sun.imageio.plugins.jpeg.JPEGImageReader.acceptPixels(JPEGImageReader.java:1102)
            at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImage(Native Method)
            at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:1070)
            at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:885)
            at javax.imageio.ImageIO.read(ImageIO.java:1422)
            at javax.imageio.ImageIO.read(ImageIO.java:1326)This can be fixed by adding the jai-imageio-1.1 extension( and recent daily builds too). However, that package is not stable, with memory corruption problem from time to time indicated by this:
    *** glibc detected *** /usr/java/jdk1.6.0_13/bin/java: malloc(): memory corruption: 0x000000004d73a3a0 ***Another way to overcome this is using JAI.create("URL", url) or JAI.create("fileload", file) API, which can decode the image but unfortunately the performance is much worse than the ImageIO.read method. So I compromised by using ImageIO.read first and on exception using JAI APIs on the occasional problem image, which looks ugly.
    What would be a better way of handling this?

    Environment: Linux 64-bit, JDK 1.6.0_14 amd64, JAI 1.1.3 amd64
    When I tried to read this image http://farm4.static.flickr.com/3655/3591243423_a258d87ea6.jpg as URL or just the image 3591243423_a258d87ea6.jpg as a local file using ImageIO.read(URL), ImageIO.read(InputStream) or ImageIO.read(String), I got this exception:
    Caused by: java.lang.IllegalArgumentException: Numbers of source Raster bands and source color space components do not match
            at java.awt.image.ColorConvertOp.filter(ColorConvertOp.java:460)
            at com.sun.imageio.plugins.jpeg.JPEGImageReader.acceptPixels(JPEGImageReader.java:1102)
            at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImage(Native Method)
            at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:1070)
            at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:885)
            at javax.imageio.ImageIO.read(ImageIO.java:1422)
            at javax.imageio.ImageIO.read(ImageIO.java:1326)This can be fixed by adding the jai-imageio-1.1 extension( and recent daily builds too). However, that package is not stable, with memory corruption problem from time to time indicated by this:
    *** glibc detected *** /usr/java/jdk1.6.0_13/bin/java: malloc(): memory corruption: 0x000000004d73a3a0 ***Another way to overcome this is using JAI.create("URL", url) or JAI.create("fileload", file) API, which can decode the image but unfortunately the performance is much worse than the ImageIO.read method. So I compromised by using ImageIO.read first and on exception using JAI APIs on the occasional problem image, which looks ugly.
    What would be a better way of handling this?

  • Automatic payment error - no valid payment method found

    I created an invoice which i try to clear in f110. the vendor has the appropriate payment methods specified too but still I get this error "No valid payment method found " for that document.
    kindly assist, if anyone knows where can be the error.
    this is only for one company code.
    thanks

    Hi,
    Check the configuration of Automatic Payment Program.  Check "Bank Determination" and verify whether the paymetn method is set up for the House Bank determined by Automatic Payment Program configuration.
    If the payment method in invoice or vendor master does nto match with the payemnt method set up for the house bank, you may get this error.
    Regards,
    Chirag
    Pls. award points if this is useful.

  • F110 error - No Valid Payment Method found - Account ID missing

    Hello All,
    I am trying to clear some Vendor invoices in F110 using a Payment method. We have entered the House Bank at the time of posting the Vendor Invoice (Invoice is posted through an BAPI) and I am able to see the House Bank in BSEG - HBKID.
    Further for the Payment Method we are using only one House Bank and one Account ID - which has been configured correctly in FBZP - Bank Determination.
    However when we are running F110 for clearing the invoices - we are getting an error no valid payment method found. I am able to see the Payment Method & the House Bank while editing the Proposal - only Parameter which is missing is Account ID - though we have maintained it in Bank Determination configurartion.
    Any help will be appreciated a lot to fix this issue.
    Thanks and regards,
    Ankur

    Dear,
    Everything may be alright but payment method is assigned to Bank Account in Bank selection section FBZP. So, system will process payment from the bank account with assigned payment method. So, there is no Account ID system is not able to find the payment method. It is difficult to provide remedy. If house bank and account ID is not in the vendor master then update them.
    Just try it out....all the best.
    Regards,
    Chintan Joshi.

  • Warning An internal error has occurred in method getMarkup()

    Hi,
    I have created simple portlet using Oracle JDeveloper and it is deployed to OAS 10.1.3, When I register wsrp provider to Oracle as portal 10.2.1 and add portlet to some page, then on page is shown following error: "Error: Could not get markup. The cookie or session is invalid or there is a runtime exception."
    In the same time is to oas 10.1.3 log writted warning: ">An internal error has occurred in method getMarkup()"
    What is wrong?
    Thanks

    I am encountering the same error as you were facing.Did you get any resolution on this issue?If yes,can you please pass on the require stuff as soon as possible.I need to crack this as quickly as possible so any help in this regard would be very useful.Thanks
    -Arindam
    mail to:[email protected]

  • Error while invoking onHeartBeat() method, exception is "Cannot load header

    I have a problem that when I read out an IMAP mailbox I sometimes get the above problem, and sometimes I don't get the problem.
    Below I attached the main parts of my environment to get an insight within the code:
    bpel.xml of process that is reading out the IMAP mailbox
    <activationAgents>
    <activationAgent className="com.collaxa.cube.activation.mail.MailActivationAgent"
    heartBeatInterval="60">
    <property name="accountName">account</property>
    </activationAgent>
    account.xml
    <mailAccount xmlns="http://services.oracle.com/bpel/mail/account">
    <userInfo>
    <displayName>Eneco Process lAyer</displayName>
    <organization>iFactory</organization>
    <replyTo>[email protected]</replyTo>
    </userInfo>
    <outgoingServer>
    <protocol>smtp</protocol>
    <host>10.126.16.73</host>
    <port>25</port>
    <authenticationRequired>false</authenticationRequired>
    </outgoingServer>
    <incomingServer>
    <protocol>imap</protocol>
    <host>10.126.20.8</host>
    <port>143</port>
    <email>IFACAORTA</email>
    <password>CRYPT{IB3B7SrA3kMYHoBDzWwsEg==}</password>
    <folderName>InBox</folderName>
    </incomingServer>
    </mailAccount>
    The domain.log of the appserver
    <2006-12-04 15:08:25,546> <ERROR> <default.collaxa.cube.activation> <HeartBeatListenerJob::execute> Error while invoking onHeartBeat() method, exception is "Cannot load header".
    <2006-12-04 15:08:25,562> <ERROR> <default.collaxa.cube.activation> <HeartBeatListenerJob::execute> Error while invoking onHeartBeat() method, exception is "No content".

    This problem is occuring only on BPEL release 10.1.3.
    I retested this again on BPEL 10.1.2, but there the problem did not occur.

  • Error while invoking onHeartBeat() method, exception is "Username supplied

    hi ...
    I am trying to invoke bpel process when we get email..
    but i am getting the following error..
    Error while invoking onHeartBeat() method, exception is "Username supplied in error".
    <mailAccount xmlns="http://services.oracle.com/bpel/mail/account">
         <userInfo>
              <displayName>Oracle BPM</displayName>
              <organization>xxx</organization>
              <replyTo>bpel@localhost</replyTo>
         </userInfo>
         <outgoingServer>
              <protocol>smtp</protocol>
              <host>xxxxx</host>
              <authenticationRequired>false</authenticationRequired>
         </outgoingServer>     
         <incomingServer>
              <protocol>pop3</protocol>
              <host>xxxxx</host>
              <port>143</port> -- tried with 110 prot also
              <email>xxxx</email>
              <password></password>
              <folderName>Inbox</folderName>
              <authenticationRequired>false</authenticationRequired>
         </incomingServer>     
    </mailAccount>
    Can any one help me on this ?
    thanks,
    bharath

    This problem is occuring only on BPEL release 10.1.3.
    I retested this again on BPEL 10.1.2, but there the problem did not occur.

  • Error: unexpected XML reader state. expected: END but found: START:

    I am getting following error while invoking method 'GetVersionInfo' (.net web service over dll) which takes one input parameter(string) and gives two output parameters(both short):
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception: deserialization
    error: unexpected XML reader state. expected: END but found: START:
    {UPPLink}pnVersionMajor
    ORA-06512: at "SYS.UTL_DBWS", line 388
    ORA-06512: at "SYS.UTL_DBWS", line 385
    ORA-06512: at line 40
    Expected Request is as follows:
    POST /UPPLink/UPPLink.asmx HTTP/1.1
    Host: 172.16.1.38
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    SOAPAction: "UPPLink/GetVersionInfo"
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <GetVersionInfo xmlns="UPPLink">
    <ignore>string</ignore>
    </GetVersionInfo>
    </soap:Body>
    </soap:Envelope>
    EXpected Response is as follows:
    HTTP/1.1 200 OK
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <GetVersionInfoResponse xmlns="UPPLink">
    <GetVersionInfoResult>
    <pnVersionMajor>short</pnVersionMajor>
    <pnVersionMinor>short</pnVersionMinor>
    </GetVersionInfoResult>
    </GetVersionInfoResponse>
    </soap:Body>
    </soap:Envelope>
    The PL/SQL code I am using is as follows:
    DECLARE
    service_ sys.utl_dbws.SERVICE;
    call_ sys.UTL_DBWS.call;
    service_qname sys.utl_dbws.QNAME;
    port_qname sys.utl_dbws.QNAME;
    operation_qname sys.utl_dbws.QNAME;
    string_type_qname sys.utl_dbws.QNAME;
    number_type_qname sys.utl_dbws.QNAME;
    retx ANYDATA;
    strEntry VARCHAR2(100);
    retx_string VARCHAR2(100);
    majorVersion NUMBER;
    minorVersion NUMBER;
    params sys.utl_dbws.ANYDATA_LIST;
    v_outputs sys.utl_dbws.anydata_list;
    BEGIN
    dbms_output.put_line('Starting Function');
    service_qname := sys.utl_dbws.to_qname(null, 'UPPLink');
    strEntry := 'vab';
    dbms_output.put_line('Creating Service');
    service_ := sys.utl_dbws.create_service(HTTPURITYPE('http://172.16.1.38/UPPLink/UPPLink.asmx?WSDL'), service_qname);
    dbms_output.put_line('Creating Operation');
    operation_qname := sys.utl_dbws.to_qname(null, 'GetVersionInfo');
    dbms_output.put_line('Calling Service');
    call_ := sys.utl_dbws.create_call(service_, null, operation_qname);
    sys.utl_dbws.set_property(call_, 'SOAPACTION_USE', 'true');
    sys.utl_dbws.set_property(call_, 'SOAPACTION_URI', 'UPPLink/GetVersionInfo');
    sys.utl_dbws.set_property(call_, 'OPERATION_STYLE', 'rpc');
    string_type_qname := sys.utl_dbws.to_qname('http://www.w3.org/2001/XMLSchema', 'string');
    number_type_qname := sys.utl_dbws.to_qname('http://www.w3.org/2001/XMLSchema', 'short');
    sys.utl_dbws.add_parameter(call_, 'ignore', string_type_qname, 'ParameterMode.IN');
    sys.utl_dbws.add_parameter(call_, 'pnVersionMinor', number_type_qname, 'ParameterMode.OUT');
    sys.utl_dbws.set_return_type(call_, number_type_qname);
    params(0) := ANYDATA.convertvarchar2(strEntry);
    dbms_output.put('Invoking with Input Parameter: ');
    dbms_output.put_line(ANYDATA.ACCESSVARCHAR2(params(0)));
    retx := sys.utl_dbws.invoke(call_, params);
    dbms_output.put_line('Invoke complete');
    majorVersion := retx.accessnumber;
    dbms_output.put_line('Major Version ' || majorVersion);
    v_outputs := SYS.utl_dbws.get_output_values(call_);
    minorVersion := ANYDATA.AccessNumber(v_outputs(1));
    dbms_output.put_line('Minor Version ' || minorVersion);
    sys.utl_dbws.release_service(service_);
    END;
    /

    Actually, the name needs to match what is specified in the WSDL file.

  • Error in pre-export methods for request

    hi...
    while releasing the TR we are facing  this error  msg..." Error in pre-export methods for request" it is showing lock in fornt of the TR.neither be able to delete the TR ....
    do reply as soon as possible..

    Hi,
    I had the same error PU238.
    What I did was:
    Execute SE03 to unlock the object.
    Then execute the program 'RS_STREE_OBJECTS_TO_REQ_GET', not sure what it does.
    Afterwards, it worked perfectly.
    Hope that information helps you.
    Regards,

  • Ecatt script fails due "Error in OLE API method Call"  error

    Hi ,
    Ecatt scripts fails due to "Error in OLE API method Call" error, this error message occurs once a while.
    We are calling testpartner scripts from Ecatt using REFEXT command. At times this ECATT script fails due to above issue.
    Please help in solving this issue.
    Thanks,
    Asha

    >
    Asha Nagaraj wrote:
    > Hi ,
    >
    > Ecatt scripts fails due to "Error in OLE API method Call" error, this error message occurs once a while.
    >
    > We are calling testpartner scripts from Ecatt using REFEXT command. At times this ECATT script fails due to above issue.
    >
    > Please help in solving this issue.
    >
    > Thanks,
    > Asha
    Hi Asha,
    Are those components are connected and the necessay settings has been done?
    Regards,
    SSN.

  • Error in MSMP Submit method - in ERM 10.0

    Hi All,
    We configured BRF+ Methodology with Role Type : Single & COndition group with methodology steps. Also defined the Initiator and Agent rule with Role Type : SIN & the User id: ZZZZ as approver.
    However when we intiiate the approval button - it is throwing an error "Error in MSMP Submit method"
    Where are we going wrong in the logic as we are using only 1 attribute as Role type.
    How to check the detail log of the error in GRC 10.0
    Thanks and Best Regards,
    Srihari.K

    hello
    Error in MSMP Submit method"
    Activate role approver related process id in MSMP without any errors then  re create role.

  • Undeclared Identifier Error for some 'PDFEdit_Layer' Methods

    Hi,
    I am getting the errors for the some Methods in PDFEdit_Layer ,
    1. Code -> PDEText pdeText = PDETextCreate();
    Error 3 error C2065: 'PDETextCreateSELPROTO' : undeclared identifier
    2. Code -> sysFont = PDFindSysFont(&pdeFontAttrs,sizeof(PDEFontAttrs), 0);
    Error 5 error C2065: 'PDFindSysFontSELPROTO' : undeclared identifier
    3. Code -> pdeFont = PDEFontCreateFromSysFont(sysFont, kPDEFontDoNotEmbed);
    Error 9 error C2065: 'PDEFontCreateFromSysFontSELPROTO' : undeclared identifier
    4. Code -> pdeColorSpace = PDEColorSpaceCreateFromName(ASAtomFromString("DeviceGray"));
    Error 11 error C2065: 'PDEColorSpaceCreateFromNameSELPROTO' : undeclared identifier
    5. Code -> PDETextAdd (pdeText, kPDETextRun, 0,(ASUns8 *)Title, strlen(Title), pdeFont, &gState,sizeof(gState), NULL, 0, &textMatrix, NULL);
    Error 15 error C2065: 'PDETextAddSELPROTO' : undeclared identifier
    Irrespective of including below header files i am the above Errors.
    #include "CoreExpT.h"
    #include "PDSExpT.h"
    #include "PEExpT.h"
    #include "PERProcs.h"
    #include "CorCalls.h"
    #include "PDCalls.h"
    #include "PERCalls.h"
    #include "PEWCalls.h"
    #include "PDSExpT.h"
    #include "PSFCalls.h"
    #include "PDSysFontExpT.h"
    I tried including the above headers then also i am getting the errors as shown above. Please let me know why is this happening, am i missing something ??
    Please someone help me, Thanks in advance.
    Regards,
    Chetan.

    This is for Plugin in Acrobat, not for Reader.
    Yes, i have set all proper defines for the project.
    #pragma 
    region [ Headers ]
    #include 
    <string>
    // Acrobat Headers.
    #ifndef 
    MAC_PLATFORM
    #include 
    "PIHeaders.h"
    #endif
    #pragma 
    endregion
    "PIHeaders.h" is having all the required header files for the Methods which i have specified.
    Yes.All this method i find under Samples\SnippetRunner project, i am able to build this project successfully.
    Please let me know what needs to be done for successfull building the solution.Thanks in advance.
    Regards,
    Chetan.

  • Web Service; Error attempting to read from file

    I'm trying to connect to a web service as outlined by the book "Creating Dynamic Forms with Adobe LiveCycle Designer" which is an excellent book by the way.
    I'm receiving the following error "Error attempting to read from file. http://www.webservicex.net/BibleWebservice.asmx"
    I've successfully created the Data Connection to
    http://www.webservicex.net/BibleWebservice.asmx?wsdl
    I dragged and dropped the bookTitle, chapter & Versie onto the form. I also dragged and dropped the GetBibleWordsByChapterAndVerseResult and the GetBibleWordsByChapterAndVerseBtn.
    I Preview PDF and click the button I get the above error.
    Does anyone have experience using Web Services with Adobe LiveCycle ES and have advice on how to resolve this. Any Suggestions would be greatly appreciated.
    -Todd

    Well, I have more news on the error I'm getting. - NO I didn't find the problem. Yet
    I checked and made sure that web.config had "None" selected " in authentication mode. I.E. <authentication mode="None" /> This should eliminate any authentication problems since that turns off IIS's authentication checking.
    At first I was thinking the form was generating the error trying to read the result coming back from the web service, but I put in some code that writes the result to a log file when the method fires off.
    I noticed that when I clicked on the button on the form, the error message would pop up from Acrobat, but when I check the log file, there was NO entry. This means that Acrobat failed before it could execute the method.
    Here is the web method:
    [WebMethod(CacheDuration = 30,
    Description="Returns the String 'True' or 'False' whether or
    not you entered a 'T' or 't'.")]
    public string TF(string Tf)
    string result="False";
    if(Tf.Substring(0,1).ToLower()=="t"){
    result= "True";}
    LogFile.Write("Sent: "+result);
    return result;

  • Errors in IDOC transfer method.....

    Hi
    I am loading customer data ( LIS , S001) by using transfer method as IDOC. now i got 4 error records. so how do we rectify in IDOC method. i can use PSA also, so that its very easy to rectify errors. But how do we rectify the error records in IDOC method...., any idea gurus......,
    Regards
    swetha

    Looks to me like you're not telling the linker to create a library (DLL). I'm not familiar with Linux, but clearly if the linker if looking for 'main' then its trying to build an executable.

  • Internal error in LMLCCS_UPDATEF02 LCL_DB method get_normvector position A with RC 1 when VL31N processing only

    HI Everyone,
    I have mentioned error (Internal error in LMLCCS_UPDATEF02 LCL_DB method get_normvector position A with RC 1) only when I try to process IB GR in transaction VL31N.
    This problem does not occur in other Material related transaction.
    The Plan that we have problem was created many years ago and also ML was activated at that time.
    We did not any changes to ML settings since.
    I had revived followings notes:
    639675 - Initialization of the actual cost component split
    710808 - Activating actual cost comp split: check actual costing
    584904 - MIRO: no procurement alternative/wrong price diff in ML
    Seems like first one fit our problem the best, but in our cases we do not activated component split after the material ledger production startup and also we do not have such problem besides VL31N. In addition using above solution, even try, would lead to lost of historical data which we would like to avoid.
    Does anyone faced similar issue and have an idea how to deal with this?
    Thanks,
    Rafał

    Hi Felipe,
    Raise an message to sap.When you are getting this dump.
    Regards,
    Madhu.

Maybe you are looking for