Af:Table data refresh without calling ManagedBean constructor

Hi,
I have an adf application jspx page where I have af:selectOneChoice and af:table showing default data. On selecting af:selectOneChoice value (assigned, completed etc.) I am calling managed bean method which calls task flow client api which gets the task details based on af:selectOneChoice value and show in the adf table.
When ever I change the af:selectOneChoice value, first it is callling 'valueChanged(ValueChangeEvent valueChangeEvent)' method in managed bean and able to get the records based on filter value(Example: Assigned). Issue is immediatly after that Managed bean constructor also calling which overrides the previous query and get the records based on default filter value (Example: All).
here is <af:selectOneChoice & <af:table code:
<af:selectOneChoice id="rsoc" autoSubmit="true"
binding="#{backingBeanScope.backing_taskdetails.rsoc}"
label="Status" valueChangeListener="#{backingBeanScope.backing_taskdetails.valueChanged}">
<f:selectItem itemValue="A" itemLabel="All" />
<f:selectItem itemValue="AG" itemLabel="Assigned" />
<f:selectItem itemValue="C" itemLabel="Completed" />
</af:selectOneChoice>
<af:table emptyText="#{bindings.taskList.viewable ? 'No data to display.' : 'Access Denied.'}"
var="row" columnStretching="multiple"
value="#{backingBeanScope.backing_taskdetails.taskList}"
immediate="false" rowSelection="single"
binding="#{backingBeanScope.backing_taskdetails.t1}"
id="t1"
inlineStyle="font-family:Arial, Helvetica, sans-serif; border:0pt none; "
partialTriggers="::rsoc">
Here partialTriggers is invoking managed bean. So Can I refresh only table data without calling managed bean constructor on selection of <af:selectOneChoice?
Any inputs will be highly appreciated. Thanks.

Hi,
Thanks for your reply.
here it is my adfc-config.xml file.
<?xml version="1.0" encoding="UTF-8" ?>
<adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
<managed-bean id="__2">
<managed-bean-name id="__3">backing_test</managed-bean-name>
<managed-bean-class id="__4">view.backing.Test</managed-bean-class>
<managed-bean-scope id="__1">backingBean</managed-bean-scope>
<!--oracle-jdev-comment:managed-bean-jsp-link:1test.jspx-->
</managed-bean>
</adfc-config>
I am not using adf taskflow (Should I use this, I am not sure as I am new to ADF. Please suggest). My execution flow is I have 'Human Task SOA application' which I am calling from adf application (managed bean --> workflow cllient API --> Human Task SOA Application) and showing task details in cutom UI screens. I do not want to use BPM worklist application as I need my own screens.
thanks.

Similar Messages

  • Create an object instance without calling its constructor?

    Hi,
    Sometimes it's useful to create object instances without calling their constructor. When? For example object deserialization.
    By default when deserializating an object, the instance in the VM is created by calling the default constructor of the first non Serializable super-class (if you don't have such you're in trouble). I think that the db4o object database don't even call any constructor you may have written.
    So such thing exists, but how is this possible? I fugured out that sun's deserialization mechanism first finds the constructor of the first non Serializable super-class and then:
    cons = reflFactory.newConstructorForSerialization(cl, cons); Here I'm stuck.
    Here's the source of the method for finding serializable constructor:
         * Returns subclass-accessible no-arg constructor of first non-serializable
         * superclass, or null if none found.  Access checks are disabled on the
         * returned constructor (if any).
        private static Constructor getSerializableConstructor(Class cl) {
         Class initCl = cl;
         while (Serializable.class.isAssignableFrom(initCl)) {
             if ((initCl = initCl.getSuperclass()) == null) {
              return null;
         try {
             Constructor cons = initCl.getDeclaredConstructor(new Class[0]);
             int mods = cons.getModifiers();
             if ((mods & Modifier.PRIVATE) != 0 ||
              ((mods & (Modifier.PUBLIC | Modifier.PROTECTED)) == 0 &&
               !packageEquals(cl, initCl)))
              return null;
             cons = reflFactory.newConstructorForSerialization(cl, cons);
             cons.setAccessible(true);
             return cons;
         } catch (NoSuchMethodException ex) {
             return null;
        }So any info about this ReflectionFactory, and the problem as a whole?
    Thanks.

    So the question is how to create object instance without initializing it (calling the constructor)? And if you have any info about ReflectionFactory it will be useful too.
    When serializing an object you save all its fields and some extra info. When you deserialize it you have to reconstruct it, by copying the fields back, but not to reinitialize.
    import java.lang.reflect.*;
    import java.io.Serializable;
    import java.security.AccessController;
    import sun.reflect.ReflectionFactory;
    public class Test0 implements Serializable {
        public Test0() {
            System.out.println("Test0");
        public static void main(String[] args) throws Exception {
            Constructor<Test0> constr = reflectionFactory.newConstructorForSerialization(Test0.class, Object.class.getConstructor(new Class[0]));
            System.out.println(constr.newInstance(new Object[0]).getClass());
        private static final ReflectionFactory reflectionFactory = (ReflectionFactory)
         AccessController.doPrivileged(
             new ReflectionFactory.GetReflectionFactoryAction());
    }When you execute this piece you get:
    class Test0

  • How to make OBIEE reports available during the DB tables data refresh?

    Experts,
    We have our production ETL run for 2.5 days every month. OBIEE reports will not be available during the run. We have a requirement to make the reports available all 24 hrs 365 days. So, what we are trying is to copy all the fact/Dim tables to the new schema running in the same or different DB server and amend the connection pool to point this schema during the run. Here are my questions. Is this a workabale solution (or) is there better approach for meeting our requirement
    Regards,
    Sarvan

    I would suggest this option:
    Store the following connection pool values in a table and call them in your connection pool using Connection Pool Scripts
    Data Source Name
    User ID
    Pwd
    when ever you want to change db just you need to edit these values that would help your bi with no downtime.
    You might have to tweak it little bit if needed.
    More or less we have use sometime back to a client where they want to switch dbs dev to test to etc
    Try it out.
    BTW: 2.5 days load time for Full load or Incr?
    Edited by: Srini VEERAVALLI on Feb 1, 2013 8:40 AM

  • Extending object, without calling super constructor

    public class Object1
        byte index;
        public Object1(byte i)
            index = i;
    public class Object2 extends Object1
        private byte j;
        public Object2() {
            super((byte) 0);
        public void setIndex(byte i)
            j = i;
    import java.util.*;
    public class Test1
        private ArrayList<Object1> aList;
        public Test1()
            aList = new ArrayList<Object1>();
        public void run()
            for (byte i = 0; i < 10; i++)
                aList.add(new Object1(i));
        public ArrayList<Object1> getResults()
            return aList;
    import java.util.*;
    public class Test2
        ArrayList<Object1> results;
         * Constructor for objects of class Test2
        public Test2()
            Test1 t1 = new Test1();
            t1.run();
            results = t1.getResults();
        public void run()
            Iterator<Object1> i = results.iterator();
            while (i.hasNext())
                Object2 o2 = (Object2) i.next();
    public class Test3
        public static void main(String[] args)
            Test2 t2 = new Test2();
            t2.run();
    }There are two things with this code that I'm having problems with.
    1. I want to create an object of class Object1 in Test1. That works fine. In Test2 I then want to extract the object from the ArrayList, but since Object2 extends Object1, I want to get an Object2 out from the ArrayList. However with the code above, I get a ClassCastException. If I leave out the cast, I get an incompatible types error.
    2. I want Object2 to be an extension of Object1, that is, with more fields and methods. But I have no need to create an object of class Object2, since I know I already have an ArrayList of Object1. So I want to remove the constructor from Object2, seeing as I won't need it. However, if I remove the super part (which, again, is not needed, as I will already have created my needed objects of class Object1 when I get there, and only need to EXTEND my Object1 objects), I get a cannot find symbol, constructor Object1() error.
    I'm not sure that I can solve problem 2 without using a super. But I am convinced that I must be able to get the Object1 objects out as Object2 instead. I would just like some help with how to do that.

    ThemePark wrote:
    But I am convinced that I must be able to get the Object1 objects out as Object2 instead. I would just like some help with how to do that.Maybe you don't understand how inheritance works. Go read a basic tutorial on inheritance. You can use an Object2 as an Object1, but not an Object1 as an Object2. You either have to create Object2 objects in the first place; or have to make a wrapper class that takes an Object1 and passes things to the Object1 object; and use objects of this wrapper class.

  • WITH_ITEM table data created without taxcode for cleared credit memos

    Hi SAP experts,
    We are trying to update tax withholding information for credit memos which are already cleared using program RFWT0020.
    But this is not returning any information. When i debug the program i found out that in table WITH_ITEM,
    already entry exists for same document number but tax code is blank and all the other fields are also blank.
    This document number belongs to previous fiscal year.
    Can you please let me know why WITH_ITEM table is updated with blank values and is there  any way to update the table with correct
    taxwitholding data.
    Thanks in advance,
    Greeshma.

    Hi Greeshma,
    In your case the problem happened because of Withholding Tax code not yet selected while posting the document or manually tax code has been deleted while posting the document or Withholding tax code has not been assigned to Vendor master.
    Since the Percentage maintains at Withholding tax code level until unless WHT code is not selected it will not consider Withholding tax.
    You can see the same thing in the Table WITH_ITEM. For problem related documents you can't find Withholding tax code in the table WITH_ITEM.
    Even though automatic posted GL Account (withholding tax GL Account) also you can't find in the document level (FB03).
    The same document number should not be there in the transaction code J1INMIS also.
    For  Tax codes/type deleted in the Vendor master errors we can resolve the errors where as the above said problems it is not possible to update the With holding tax amount.
    Hence, it is not possible to bring the values.
    Please reverse the documents and post again with proper inputs.
    Thanks

  • Call mutiple tables data in single OData service call

    Hi,
    We have created a ZBAPI same as standard BAPI "ALM_PM_NOTIFICATION_GETDETAIL" for creating an ODATA service. But we are facing problem while calling the data from multiple tables in a single query/entity while creating that ODATA service using SEGW.
    Please guide me how can we do that or is this possible to do that.
    Thanks,
    Shrikant N.

    Hello Shrikant,
    You mean to say BAPI is returning multiple tables and you have to get all those table data in one call ??
    If this is the case you cannot get all the table data from that BAPI in one shot as you can map only 1 table as response table in GW.
    Assuming you are passing inputs A & B to your BAPI and it is returning 2 tables in the response,
    maintain a Parent entity ( dummy one ) and create association to those tables ( each table as different entity ).
    This way you get all the tables data in one go as GW calls your RFC 2 times.
    I mean to say you have 2 tables in the BAPI response , GW calls 2 times the same logic to get those 2 tables. i.e., Table 1 in 1st call and Table 2 in 2nd call.
    Your URL would be looking like this its just an example :
    http://<GW_Host>/sap/opu/odata/sap/<Service_Name>/<Parent>?$filter=A eq 'x' and B eq 'x'&$expand=Table1_Set,Table2_set
    where Table1_Set and Table2_Set are your navigation properties which you would have defined.
    Also note that here there is a performance trade-off here as GW calls 2 times the same logic and that is how GW calls BE on $expand.
    Suggestion is to have separate FM's to get those tables separately so that data retrieval is fasted and there is no overhead.
    Regards,
    Ashwin

  • Filter table data without calling BAPI

    Hi all,
    How I can filter VC table without calling BAPI or other backend? The objective is to bring a large data only once and allow to user filtering of this data.
    The problem is that the filter options are dynamic so I can't use "hidden tables" workarownd.
    Any ideas?
    Thanks,
    Ola

    Hi,
    I think this is not possible, because you can only filter the data once with the filter element. If you use a BI query you can use filters. Maybe you can bring the data to a hidden table and get the data again from this table with different filter elements resp. dynamic filter values, but I think this is very tricky and not a good solution.
    Best Regards,
    Marcel

  • Export table data in a flat file without using FL

    Hi,
    I am looking for options where I can export table data into a flat file without using FL(File Layout) i.e., by using App Engine only.
    Please share your experience if you did anything as this
    Thanks

    A simple way to export any record (table/view) to an csv fiel, is to create a rowset and loop through all record fields, like below example code
    Local Rowset &RS;
    Local Record &Rec;
    Local File &MYFILE;
    Local string &FileName, &strRecName, &Line, &Seperator, &Value;
    Local number &numRow, &numField;
    &FileName = "c:\temp\test.csv";
    &strRecName = "PSOPRDEFN";
    &Seperator = ";";
    &RS = CreateRowset(@("Record." | &strRecName));
    &RS.Fill();
    &MYFILE = GetFile(&FileName, "W", %FilePath_Absolute);
    If &MYFILE.IsOpen Then
       For &numRow = 1 To &RS.ActiveRowCount
          &Rec = &RS(&numRow).GetRecord(@("RECORD." | &strRecName));
          For &numField = 1 To &Rec.FieldCount
             &Value = String(&Rec.GetField(&numField).Value);
             If &numField = 1 Then
                &Line = &Value;
             Else
                &Line = &Line | &Seperator | &Value;
             End-If;
          End-For;
          &MYFILE.WriteLine(&Line);
       End-For;
    End-If;
    &MYFILE.Close(); You can of course create an application class for generic calling this piece of code.
    Hope it helps.
    Note:
    Do not come complaining to me on performance issues ;)

  • How to display table data without  using ALV  and table element.

    Hi,
            Its possible to display table data without using ALV  and table element.
           Every time i am fetching data based on (customer,status) fields and displaying these data in my output using alv
           (every time i am fetching single row data ),
           But problem is alv occupying more space in the output , i want to display data part only i dont want field names,
           settings and header data etc..things.
          Give solution to  display data part..
    Regards,
    Rakhi.

    Hi,
    Does you mean that you need ALV without default Function Toolbar...? If this is the case, the easy solution would have been to use Table Element rather. But, if you need to use ALV only without Function Toolbar, you can do away with that as well.
    In that case, after calling GET_MODEL, you need to add few more lines of codes to achieve your goal. Those lines are --
      DATA LV_VALUE TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
        LV_VALUE = LO_INTERFACECONTROLLER->GET_MODEL(
    * Standard Filter Function setting to FALSE
        LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_SORT_COMPLEX_ALLOWED( ABAP_FALSE ).
        LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_FILTER_COMPLEX_ALLOWED( ABAP_FALSE ).
        LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_FILTER_FILTERLINE_ALLOWED( ABAP_FALSE ).
        LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_DISPLAY_SETTINGS_ALLOWED( ABAP_FALSE ).
        LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_VIEW_LIST_ALLOWED( ABAP_FALSE ).
        LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_SORT_HEADERCLICK_ALLOWED( ABAP_FALSE ).
        LV_VALUE->IF_SALV_WD_STD_FUNCTIONS~SET_HIERARCHY_ALLOWED( ABAP_FALSE ).
    * Standard Filter Function setting to FALSE Ends
    Here as you can easily notice that LV_VALUE is instantiated on CL_SALV_WD_CONFIG_TABLE. Now, using this LV_VALUE, you set standard functions as False to dis-allow their display.
    Hope this answers your query.
    Thanks.
    Kumar Saurav.

  • Table data does not refresh

    Using LV2010.
    A table displays the test configuration that has been selected by the user.  This appeared to work fine until recently. 
    Nothing in that area of the code has changed .
    The issue is that although valid data exists on the wire and it even gets written to file, nothing is displayed in the table.
    The operator can click multiple times and nothing is displayed.  Even when running with highlight execution turned ON, the table does not get refreshed.
    Unfortunately, each time the operator click the button to insert the configuration, it does.  But it is not displayed.  The same list goes to the table.  You would expect the subsequent attempts would cause all the items to be displayed when it finally does, but no... only the last selection gets displayed.
    I've recently taken over the project and did notice that a previously working feature was not working.  That feature was to allow multiple selections to be inserted at once.  I suspect the feature still workes, but the table only displays a single line of data.
    I did find a thread that started to discuss a similar behavior with a link to a description of the bug, but that page appears to have dissappeared from the website.  It was discussed in 2005.
    Is there a way to force a refresh display on a table?  Another thought... Could it be that the table is displaying data from a portion further down the list which makes it appear as if there is no data?  As I said earlier, this section of code was not touched and it is the only area where the table data is updated and the display refreshed..
    Has anyone else seen this behavior?
    As can be seen above, the probe does "see" the data on the wire.  The screen capture was taken after the data flow had completed the entire state. The wire itself claims to have a 2D array of 1 X 11 elements.  Normally, this data would be displayed.  I can't think of why it wouldn't be displayed.  If I could, I wouldn't be posting this.. 
    I am curious if this is a LV bug...
    Attachments:
    TableDataInvisible.PNG ‏21 KB

    You know me & locals... 
    Plus the property node was used for something else.
    I fear using the VI Analyzer would... well... euh..  hummm...  how to say this,...
    blow up.. 
    LOL!! 

  • Detail table refreshing without partial trigger!!!

    Hi,
    my Jdeveloper version is 11.1.2.3.0
    I have a master detail structure on my page and i have two weird behaviors (that i guess are related).
    I created the master detail tables in the classic way:
    I dragged the master data control and doped it on the page as an ADF table (id t1)
    Then i dragged the detail data control (from inside the master data control) and drop it as an ADF table (id t2).
    I verified that the partial trigger property of the detail table does not contain the id of the master table (t1).
    however (the first weird behavior), at run time, the detail table shows always the right information of the selected master row.
    How can this happen?
    The second weird behavior is that i have createInsert button (created by drag and drop of the createInsert operation of the dataControl) in the toolbar of the master table.
    If i create a new row and fill the required data then navigate to another row, the detail table is refreshed correctly and shows the details of the newly selected row, but if i go back (re-select) the newly created row the detail table does not refresh and still shows the detail of the previous master row!!! (furthermore, i have input date in this newly create row, so if, at this stage, i click on the calendar icon to open it, the calendar doesn't open)
    I'm i doing something wrong? or should i change any property of the tables?
    Thanks for your help

    Hi Timo,
    Thank you for your reply.
    Actually no, i didn't commit the new record at this point and this is the problem.
    If i commit the new record (using the commit button created from the commit operation of the module), the page refreshes and works correctly.
    The problem occurs if i change the selected row (and then re-selected the newly created row) before committing the changes.
    Concerning the auto PPR, do you think that deactivating it may help? and if yes, how can i deactivated for this page only?
    I tried to change the "change event policy" property of both the master and the detail iterator in the page binding from ppr to "non" but nothing changed. The detail table still refreshes, and the problem with newly created master row still appears.
    One adiitinal note: i downloaded the sample from Andrejus Baranovskis's Blog
    http://andrejusb-samples.blogspot.com/2009/03/jdevadf-sample-create-operation-for.html
    and the page is working correctly. I also created a jsf page in this project with master detail using the same method i used in my project and this pages also works correctly.
    So this means that the problem is with the verision of jdev no? but what what is it???
    Thank you again
    Edited by: 997720 on Apr 5, 2013 8:48 AM

  • How 2 call BAPI & pass table name so that it will insert table data 2 SAP

    Hi guys,
    Has anyone tried calling BAPI from BODS; Please share screen shots and details. I want to call BAPI fron BODS which will take table name as a parameter and insert that table data to SAP.

    HI,
    in case you mean BusinessObjects Data Services with BODS then I would suggest you post your question into the EIM area of the SDN forums.
    Ingo

  • ADF table data not refresh

    hi,
    i am create a adf table using data control. value of adf table depend on view object. where i bind a variable in where clause.
    now i am giving the value of whereClauseParam using using view object instance in backing bean method.
    when i pressed command button method run properly but adf table not refresh and not showing data.
    thanks in Advance

    public void callData(ActionEvent ae) {
    String amDef = "com.jagran.in.model.view.updatable.AppModule";
    String config = "AppModuleLocal";
    ApplicationModuleHandle handle = null;
    ApplicationModule am;
    try {
    handle = Configuration.createRootApplicationModuleHandle
    (amDef, config);
    //am = Configuration.createRootApplicationModule(amDef,config);
    // ApplicationModule sam = handle.useApplicationModule();
    am=handle.useApplicationModule();
    am.processChangeNotifications();
    ViewObject svo = am.findViewObject("BindView1");
    svo.setNamedWhereClauseParam("id","JK0554");
    svo.executeQuery();
    ((ViewObjectImpl)svo).refreshCollection(null, false, false);
    am.processChangeNotifications();
    svo.reset();
    while (svo.hasNext()) {
    Row r = svo.next();
    System.out.println( (String)r.getAttribute(1));
    } catch(Exception e)
    System.out.println(e);
    finally {
    if (handle != null)
    Configuration.releaseRootApplicationModuleHandle(handle, false);
    }

  • Table data not refreshing

    Hi ,
    I have created a data control which calls procedure to fetch data ...
    I drag and drop that on the page and create a table.
    This table also includes checkbox to update the some fields of the table.
    When i click on any specific row to update data,data gets updated properly.
    If i move to any other tab and again come back to that tab data get messed up (for example all the
    rows of one column is showing same data.
    ANy one has seen this issue in the past as I am not sure what leads to this behaviour?
    Thanks,
    shubhangi

    Hi,
    to persist data values, you don't call a setter on the table cell renderer but update the model. Soif you have input text component to render the table cell, then updating and submitting the data herin will update the ADF model, not the persisting model
    See sample #038 on http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html that shows a similar use case
    Frank

  • External Data Refresh Failed. We cannot locate a server to load the workbook Data Model. ThisWorkBookDataModel

    Hi All,
    I have been trying to fix this for days now. I have tried solutions in many articles but to no avail. So while the error message is something you may have seen may times, I just can't find a solution in my case.
    This is the error:
    And in text just in case the image isn't viewable:
    "External Data Refresh Failed. We cannot locate a server to load the workbook Data Model. We were unable to refresh one or more data connections in this workbook. The following connections failed to refresh: ThisWorkBookDataModel."
    What is worse is I have checked the ULS (SharePoint Trace Logs), the Event Viewer Logs and the OWA Logs and I cannot find a specific error that would help pin point the problem.
    Excel Workbook
    So what am I doing? I have an Excel 2013 workbook and I create an "SQL Server" connection to the AdventureWorksDW database, add a pivot table and a pivot chart, test in in Excel and all works fine.
    I save the Excel workbook to SharePoint 2013 and then select "Data" then "Refresh All Connections" and then I get the error in the picture above.
    Even more puzzling is I have another Excel workbook that also has pivot tables and pivot charts in the AdventureWorksDW2012Multidimensional cube database in "SQL Analysis Services" and this works fine. Hmmm.
    My Environment
    My environment is Windows 2008 R2 Server, SharePoint 2013 with the April Service Pack1 and a separate server with OWA2013 SP1. It has an SQL Server 2008 R2 database which has been upgraded to SQL Server 2012.
    Data Model Settings
    In Excel Services this is set to my server name which is "server-name". As I do not have instances all I can enter is the server name. As this works everywhere else including the workbook outside of SharePoint I do not think this is the problem.
    But I could be wrong.
    Unattended Account
    I have set this up for the PowerPivot Services App and Excel Services App.
    ODC Connections in Excel
    I have tried all 3 authentication modes, Windows, Secure Store ID and "None" which is the unattended account. I have not tried the other connection types, should I?
    Not in WOPI
    I am not in WOPI mode.
    AD Accounts
    I have added permissions in the SharePoint Services and SQL Server, and as they work in Excel outside of SharePoint, I do not think it is a permissions issue. I could be wrong of course, but the problem is in one of SharePoint, OWA, AD,
    SQL Server, Excel, and Windows Server.
    Isolate the Error
    Below is a list of errors I think are relevant but they do not tell me much. The SharePoint logs are not really giving me an error that tells me what to do and where to do it, or even why it cannot refresh, (perhaps not noticeable by the untrained eye).
    Problem with SQL Server Not Analysis Services
    So my cube database in analysis services works fine in SharePoint/OWA but not the databases in sql server. This is my best clue but I have no idea what it means. Why would it work with an Analysis Services connection but not an "SQL Server" connection?
    It Works Outside of SharePoint
    If I run the excel worksheet outside of SharePoint all works fine. When inside OWA this is where the refresh error occurs.
    Errors from Event Viewer on SharePoint Server using ULS Viewer
    "Failed to create an external connection or execute a query. Provider message: There are no servers available or actively being initialized., ConnectionName: , Workbook:"
    "Refresh failed for 'ThisWorkbookDataModel' in the workbook 'http://server...'. [Session: 1.V22.26itT0lx8piNFeqtuGVhN214.5.en-US5.en-US36.98c0e158-9113-46e9-850e-edda81d9ed1c1.A1.N User: 0#.w|ad\testuser1]"
    And an error in the ULS under the "Data Model" category:
    "--> Check Deployment Mode (server-name): Fail (Expected: SharePoint, Actual: Multidimensional)."
    This last error, as it turned out, defined the problem concisely, although I was yet to work out what it meant in some detail.

    I finally solved this myself (or should I say with the help of several key articles).
    The refresh did not work because the database was not in "SharePoint Mode". Yes, SQL Server has modes, 3 of them in fact.
    If you installed SharePoint to the default SQL instance which would be called <servername> then you cannot use this default instance for Excel 2013 workbooks in OWA 2013 because the refresh only works if the database is in SharePoint mode.
    So what are these 3 modes? The Deployment Mode property in the msmdsrv.ini file has them as:
    0 = Multidimensional mode (the default whenever you install SQL Server normally)
    1 = PowerPivot for SharePoint mode
    2 = Tabular mode mode
    How do you know what mode you are in? That's easy, open SQL Studio Manager and connect to all your SQL database engine instances (ignore Analysis Services or SSRS as they are not database engines). If you only have the default instance then that is almost
    definately in Multidimensional mode which is the default and what SharePoint installs its databases to.
    You must have an instance called <servername>\POWERPIVOT. This instance is the "sharepoint mode" needed, and the default instance name when you install an SQL instance in this mode.
    If you don't see <servername>\POWERPIVOT in SQL server then you are not in "sharepoint mode". It is more accurate to say, you do not have an instance that is in sharepoint mode. This is because you cannot simply switch modes on an SQL server.
    You have to install a new instance in the required mode, thats the only way.
    That's easy enough. Load up the SQL Server setup CD and run setup. Install a brand new instance and select "SQL Server PowerPivot for SharePoint" when you get there in the wizard.
    Now you will have the default instance that stores all the SharePoint databases and that is in mode 0, and a new instance called <servername>\POWERPIVOT that is in mode 1. The "<servername>\POWERPIVOT" instance connection is what you
    will use for Excel 2013 when rendering in OWA 2013.
    You also need to ensure OWA 2013 is not in WOPI mode for Excel worksheets. See the last link below for more information about WOPI.
    Next you should go to the Excel Service App in CA and click Data Model Settings and add the <servername>\POWERPIVOT instance.
    Then you have to either turn off the firewall on the SQL server machine, or create an inbound rule on the Windows firewall to open the TCP port for the <servername>\POWERPIVOT instance:
    1. Start Task Manager and then click Services to get the PID of the MSOLAP$InstanceName.
    2. Run netstat –ao –p TCP from the command line to view the TCP port information for that PID.
    Finally, you can now create Excel 2013 workbooks that run in OWA without refresh errors, as long as you are connecting to the <servername>\POWERPIVOT instance. Hooray.
    REFERENCES
    Look for the string "There are no servers available or actively being initialized" in this article:
    http://blogs.msdn.com/b/analysisservices/archive/2012/08/02/verifying-the-excel-services-configuration-for-powerpivot-in-sharepoint-2013.aspx
    Determine the server mode:
    http://msdn.microsoft.com/en-au/library/gg471594(v=sql.110).aspx
    Install the SharePoint PowerPivot instance (aka SharePoint mode)
    http://msdn.microsoft.com/en-au/library/eec38696-5e26-46fa-bc83-aa776f470ce8(v=sql.110)
    Open the port for the new SQL instance:
    http://msdn.microsoft.com/en-us/library/ms174937(v=sql.110).aspx
    Turn Off WOPI for Excel OWA
    http://blogs.technet.com/b/excel_services__powerpivot_for_sharepoint_support_blog/archive/2013/01/31/powerpivot-for-sharepoint-browser-refresh-fails-data-refresh-not-supported-in-office-web-apps.aspx

Maybe you are looking for