DataTable of List T gives empty results

Logs in tomcat shows that getList() in Beatles indeed logs the text of a List to tomcat, and, because it's a List<Beatles>, it must be "correct" in its model. Is there some reason why a DataTable wouldn't display such a List<Beatles>? The resulting view is just an empty table :(
login@dtc01l0471-05:~$
login@dtc01l0471-05:~$ nl NetBeansProjects/A00720398/src/java/managedBeans/Beatles.java
     1     /*
     2      * To change this template, choose Tools | Templates
     3      * and open the template in the editor.
     4      */
     5     package managedBeans;
     6     /**
     7      *
     8      * @author
     9      */
    10     import database.ParametersEnum;
    11     import java.util.ArrayList;
    12     import java.util.List;
    13     import java.util.logging.Level;
    14     import java.util.logging.Logger;
    15     import javax.faces.bean.ManagedBean;
    16     import javax.faces.bean.SessionScoped;
    17     import javax.faces.context.FacesContext;
    18     import javax.servlet.ServletContext;
    19     /**
    20      *
    21      * @author a00720398
    22      */
    23     @ManagedBean(name = "beatles")
    24     @SessionScoped
    25     public class Beatles<Beatle> {
    26         //public static final Beatles INSTANCE = new Beatles();
    27         private static Logger logger = Logger.getLogger(managedBeans.Beatles.class.getName());
    28         private List<Beatle> list = new ArrayList<Beatle>();
    29         private ParametersEnum initParams() {
    30             FacesContext fctx = FacesContext.getCurrentInstance();
    31             ServletContext servletContext = (ServletContext) fctx.getExternalContext().getContext();
    32             ParametersEnum mp = ParametersEnum.INSTANCE;
    33             mp.initializeDB(servletContext);
    34             return mp;
    35         }
    36         public Beatles() {
    37             logger.log(Level.INFO, "Beatles...");
    38             BeatlesOperations beatlesOperations = BeatlesOperations.getInstance();
    39             list = (List<Beatle>) beatlesOperations.populateBeatles(initParams());
    40         }
    41         public List<Beatle> getList() {
    42             logger.log(Level.INFO,  list.toString());
    43             return list;
    44         }
    45         public void setList(List<Beatle> list) {
    46             this.list = list;
    47         }
    48     }
login@dtc01l0471-05:~$
login@dtc01l0471-05:~$ nl NetBeansProjects/A00720398/src/java/managedBeans/Beatle.java
     1     /*
     2      * To change this template, choose Tools | Templates
     3      * and open the template in the editor.
     4      */
     5     package managedBeans;
     6     import data.AbstractDataType;
     7     import java.util.List;
     8     import java.util.logging.Level;
     9     import java.util.logging.Logger;
    10     import javax.faces.bean.ManagedBean;
    11     import javax.faces.bean.SessionScoped;
    12     /**
    13      *
    14      * @author
    15      */
    16     @ManagedBean(name = "beatle")
    17     @SessionScoped
    18     public class Beatle extends AbstractDataType {
    19         private int id;
    20         private String code, artist, title, year, time, total, label, comments;
    21         private static Logger logger = Logger.getLogger(managedBeans.Beatle.class.getName());
    22         /** Creates a new instance of Beatle */
    23         public Beatle() {
    24             logger.log(Level.INFO, "new beatle");
    25         }
    26         @Override
    27         public void set(List<String> record) {
    28             logger.log(Level.INFO, "set beatle as\n\n" + record.toString());
    29             code = record.get(0);
    30             artist = record.get(1);
    31             title = record.get(2);
    32             year = record.get(3);
    33             time = record.get(4);
    34             total = record.get(5);
    35             label = record.get(6);
    36             comments = record.get(7);
    37         }
    38         /**
    39          * @return the id
    40          */
    41         public int getId() {
    42             return id;
    43         }
    44         /**
    45          * @param id the id to set
    46          */
    47         public void setId(int id) {
    48             this.id = id;
    49         }
    50         private int getMaxId() {
    51             return 99;
    52         }
    53         /**
    54          * @return the code
    55          */
    56         public String getCode() {
    57             return code;
    58         }
    59         /**
    60          * @param code the code to set
    61          */
    62         public void setCode(String code) {
    63             this.code = code;
    64         }
    65         /**
    66          * @return the artist
    67          */
    68         public String getArtist() {
    69             return artist;
    70         }
    71         /**
    72          * @param artist the artist to set
    73          */
    74         public void setArtist(String artist) {
    75             this.artist = artist;
    76         }
    77         /**
    78          * @return the title
    79          */
    80         public String getTitle() {
    81             return title;
    82         }
    83         /**
    84          * @param title the title to set
    85          */
    86         public void setTitle(String title) {
    87             this.title = title;
    88         }
    89         /**
    90          * @return the year
    91          */
    92         public String getYear() {
    93             return year;
    94         }
    95         /**
    96          * @param year the year to set
    97          */
    98         public void setYear(String year) {
    99             this.year = year;
   100         }
   101         /**
   102          * @return the time
   103          */
   104         public String getTime() {
   105             return time;
   106         }
   107         /**
   108          * @param time the time to set
   109          */
   110         public void setTime(String time) {
   111             this.time = time;
   112         }
   113         /**
   114          * @return the total
   115          */
   116         public String getTotal() {
   117             return total;
   118         }
   119         /**
   120          * @param total the total to set
   121          */
   122         public void setTotal(String total) {
   123             this.total = total;
   124         }
   125         /**
   126          * @return the label
   127          */
   128         public String getLabel() {
   129             return label;
   130         }
   131         /**
   132          * @param label the label to set
   133          */
   134         public void setLabel(String label) {
   135             this.label = label;
   136         }
   137         /**
   138          * @return the comments
   139          */
   140         public String getComments() {
   141             return comments;
   142         }
   143         /**
   144          * @param comments the comments to set
   145          */
   146         public void setComments(String comments) {
   147             this.comments = comments;
   148         }
   149     }
login@dtc01l0471-05:~$

Here are the JSF components, which, from experience, I know work with this model. I'll go back to populating the data "by hand" just play around with it, but don't see how a change in how the list is populated would matter:
login@dtc01l0471-05:~$
login@dtc01l0471-05:~$ nl NetBeansProjects/A00720398/web/beatles/index.xhtml
     1     <?xml version='1.0' encoding='UTF-8' ?>
     2     <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     3     <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
     4                     template="./beatlesTemplate.xhtml">
     5        
     6         <ui:define name="top">
     7             top
     8         </ui:define>
     9         <ui:define name="content">
    10              <ui:include src="read.xhtml"/>
    11         </ui:define>
    12     </ui:composition>
login@dtc01l0471-05:~$
login@dtc01l0471-05:~$ nl NetBeansProjects/A00720398/web/beatles/read.xhtml
     1     <?xml version='1.0' encoding='UTF-8' ?>
     2     <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     3     <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
     4                     xmlns:h="http://java.sun.com/jsf/html"
     5                     xmlns:f="http://java.sun.com/jsf/core"
     6                     template="./beatlesTemplate.xhtml">
     7         <ui:define name="content">
     8             <h:dataTable value="#{beatles.list}"
     9                          var="name">
    10                 <h:column>
    11                     <h:outputText value="#{beatle.title}, "/>
    12                 </h:column>
    13                 <h:column>
    14                     <h:outputText value="#{beatle.comments}"/>
    15                 </h:column>
    16             </h:dataTable>
    17         </ui:define>
    18     </ui:composition>
login@dtc01l0471-05:~$
login@dtc01l0471-05:~$ nl NetBeansProjects/A00720398/web/beatles/beatlesTemplate.xhtml
     1     <?xml version='1.0' encoding='UTF-8' ?>
     2     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     3     <html xmlns="http://www.w3.org/1999/xhtml"
     4           xmlns:ui="http://java.sun.com/jsf/facelets"
     5           xmlns:h="http://java.sun.com/jsf/html">
     6        
     7         <h:head>
     8             <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
     9             <link href="./../resources/css/default.css" rel="stylesheet" type="text/css" />
    10             <link href="./../resources/css/cssLayout.css" rel="stylesheet" type="text/css" />
    11             <title>Facelets Template</title>
    12         </h:head>
    13        
    14         <h:body>
    15            
    16             <div id="top" class="top">
    17                 <ui:insert name="top">Top</ui:insert>
    18             </div>
    19            
    20             <div id="content" class="center_content">
    21                 <ui:insert name="content">Content</ui:insert>
    22             </div>
    23            
    24         </h:body>
    25        
    26     </html>
login@dtc01l0471-05:~$ the resulting html is just an empty table:
login@dtc01l0471-05:~$
login@dtc01l0471-05:~$ curl http://localhost:8084/A00720398/
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link href="./../resources/css/default.css" rel="stylesheet" type="text/css" />
        <link href="./../resources/css/cssLayout.css" rel="stylesheet" type="text/css" />
        <title>Facelets Template</title></head><body>
        <div id="top" class="top">
        top
        </div>
        <div id="content" class="center_content"><?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link href="./../resources/css/default.css" rel="stylesheet" type="text/css" />
        <link href="./../resources/css/cssLayout.css" rel="stylesheet" type="text/css" />
        <title>Facelets Template</title></head><body>
        <div id="top" class="top">
        top
        </div>
        <div id="content" class="center_content"><table>
<tbody>
<tr><td></td></tr></tbody>
</table>
        </div></body>
</html>
        </div></body>
</html>login@dtc01l0471-05:~$

Similar Messages

  • Custom Content Presenter Template gives Empty result

    Hi All,
    I am Using Jdev 11.1.1.6 and am trying to display UCM content via a custom template using content presenter.
    I have a page with the following:
    <af:region value="#{bindings.doclibcontentpresenter1.regionModel}" id="r1"/>
    The bindings for the content presenter taskflow:
    <taskFlow id="doclibcontentpresenter1"
    taskFlowId="/oracle/webcenter/doclib/view/jsf/taskflows/presenter/contentPresenter.xml#doclib-content-presenter"
                  activation="deferred"
                  xmlns="http://xmlns.oracle.com/adf/controller/binding">
          <parameters>
            <parameter id="taskFlowInstId" value="${'photo'}"/>
            <parameter id="datasourceType" value="${'dsTypeQueryExpression'}"/>
            <parameter id="datasource"
                       value="#{backingBeanScope.NewsBean.photoContentQuery}"/>
            <parameter id="templateCategory" value="${''}"/>
            <parameter id="templateView" value="${'templates.photos.list'}"/>
            <parameter id="regionTemplate" value="${false}"/>
          </parameters>
    </taskFlow>
    And the photoContentQuery bean method return result of the Query i.e  SELECT * FROM ora:t:IDC:GlobalProfile WHERE ora:p:xRegionDefinition = 'PHOTO_REG_DEF' AND ora:p:xArchiveFlag<>'No' ")
    I have a fragment with the portal resource attributes set as:
    Category name = Default Templates
    Category ID = oracle.webcenter.content.templates.default.category
    Category Default View = true
    View ID = templates.photos.list
    The above fragment has this code: I also made this fragment has portal resource.
    <dt:contentListTemplateDef var="nodes">
            <af:panelGroupLayout id="pnlContainer" layout="vertical"
                                 >
                <af:iterator id="pagList" value="#{nodes}" var="node" >
                    <af:panelGroupLayout layout="horizontal" rendered="false">
                    </af:panelGroupLayout>
                        <af:panelGroupLayout id="pnlContent" layout="vertical">
                         <dt:contentTemplate node="#{node}"
                              view="template.photo"
                                nodesHint="#{nodes}"/>
                    </af:panelGroupLayout>
                </af:iterator>
                </af:panelGroupLayout>
      </dt:contentListTemplateDef>
    and
    <dt:contentTemplate node="#{node}"
                              view="template.photo"
                                nodesHint="#{nodes}"/>  this is another pagefragment contains the following code.
    <dt:contentTemplateDef var="node">
        <af:panelGroupLayout id="pgl2">
          <af:panelGroupLayout id="pgl1" layout="vertical" styleClass="photoImg">
            <af:outputText value="#{node.propertyMap['PHOTO_REG_DEF:PHOTO'].asTextHtml}"
                           id="ot1" escape="false"/>
          </af:panelGroupLayout>
        </af:panelGroupLayout>
      </dt:contentTemplateDef>
    When I run my project on the Integrated WebLogic Server and when I click on my page, the data is coming empty.
    When I see the Administrator console, this content presenter template is in Hidden by default. I just edit the template and made it availabe. But still am unable to get result in the required template.
    On my page, if I do not specify the  <parameter id="templateView" value="${'templates.photos.list'}"/>, then I will get the result with default content presenter template.
    Could any one please help me out?
    Thanks
    Kotresh

    Hi,
    I am able to get the result with required custom content presenter template. But every time when I run the project , I need to explicitly need to make it "show" my custom content presenter display template i.e. in the Administration console, initially it is in Hidden state, I need to edit and make it show.
    I already made this template as portal resource  but why it is still be in Hidden state. what extra step do I need to make in order to move it to "show" state?
    Thanks
    Kotresh

  • Empty results while importing outlook contact list with PHP

    Hello. Could you help me with such problem:
    I'm always receiving an empty result while importing contact list from my outlook mail account.
    I've had successfully created live app (https://account.live.com/developers/applications). I'm using REST api (https://apis.live.net/v5.0/me/contacts?&access_token=" . $access_token) and successfully received "access_token". But in the end
    I receive empty result in such form:
    { ["data"]=> array(0) { } ["paging"]=> array(0) { } } (certainly, I have few contacts in my outlook contact list)

    Desktop Manager is not contact manager. Restore it from Backup to a HH and then sync it with contacts in Outlook at home for example. Extract contacts to PST file. Import those to new company outlook contacts and they will sync over the air with handheld.

  • Calling PL/SQL Procedure In Another Schema Gives Unexpected Result

    I have a SQL Script that does this:
    conn pnr/<password for user pnr>;
    set serveroutput on;
    exec vms.disable_all_fk_constraints;
    SELECT owner, constraint_name, status FROM user_constraints WHERE constraint_type = 'R';
    and the disable_all_fk_constraints procedure that is owned by user 'vms' is defined as:
    create or replace
    procedure disable_all_fk_constraints is
    v_sql   VARCHAR2(4000);
    begin
    dbms_output.put_line('Disabling all referential integrity constraints.');
    for rec in (SELECT table_name, constraint_name FROM user_constraints WHERE constraint_type='R') loop
    dbms_output.put_line('Disabling constraint ' || rec.constraint_name || ' from ' || rec.table_name || '.');
    v_sql := 'ALTER TABLE ' || rec.table_name || ' DISABLE CONSTRAINT ' || rec.constraint_name;
    execute immediate(v_sql);
    end loop;
    end;
    When I run the SQL script, the call to vms.disable_all_fk_constraints disables the FK constrains in the 'vms' schema, whereas I wanted it to disable the FK constraints in the 'pnr' schema (the invoker of the procedure). I know that I could make this work by copying the disable_all_fk_constraints procedure to the 'pnr' schema and calling it as "+exec disable_all_fk_constraints;+" from within the SQL script but I want to avoid having to duplicate the PL/SQL procedure in each schema that uses it.
    What can I do?
    Thank you

    You have two issues to solve.
    First you need to write a packaged procedure that works with INVOKER rights. The default is DEFINER rights.
    The difference is excatly what you need. Usually the package has the rights from the schema where it is defined (=Definer rights). In your case schema VMS. Whereas you need the privileges from the user that calls the package (PNR).
    => Check out the documentation for INVOKER rights
    The second problem is that the view "user_constraints" will not give the results you expect when called from inside a procedure in another schema. An alternative could be to use the view DBA_CONSTRAINTS with a filter on the owner (where owner = 'PNR'). Not sure if there are other working possibilities. Well you could create a list of constraint names that you want to disable, instead of creating the list dynamically.
    And you could have another potential disaster creeping up upon you. If you run this thing, then at this moment you don't have any referential integrity anymore. You can't be sure that you can create the FKs again after this action. This is EXTREMLY DANGEROUS. I would never ever do this in any kind of production or test database. I would be very careful when I do it on a development database.

  • 0I_FYPER - Variable in BEx gives no result

    Hello all,
    I have a problem in BEx-reporting after a releasechange from BW3.5 to BI7.0 and at the same time SEM-BCS4.0 to SEM-BCS6.0 which belongs to the variable 0I_FYPER. I use this variable in the columns (only) in order to give the user the possibillity to define which periods to show. In the rows I use the rest for defining which numbers to bring up. It worked in BW3.5/SEM-BCS4.0 fine.
    I debuged the content of the variable in user-exit ZXRSRU01 (after processing the selection screen) and could find the data I entered but the query gives no result. Any ideas?
    Thank you for any feedback,
    Chris

    Hi Guru,
    We have a work around for your issue. Just create a customer Exit variable on the calendar month and use it in the filter.
    In the customer Exit variable read the Plant variable and if it is empty populate # as result. Else read the calmonth input variable and populate it as the result.
    Use the following snippet to read input ready variables.
    DATA: loc_var_range LIKE rrrangeexit.
    READ TABLE i_t_var_range WITH KEY vnam = 'VARNAME' INTO loc_var_range.
    (loc_var_range-low will have the value of the variable)
    Hope this helps.
    Regards.
    Shafi.

  • SM20 report shows empty result

    Hi All,
    Issue in Audit sm20:
    one of the account with special privileges which was set open for doing changes directly in production for a limited time.
    When i tried to run an SM20 report to list the actions I did but I get an empty result.Where as able to get other information except that particular user.
    Findings:
    1.Able to identify transaction used in st03 for that user.
    2, logs were returned on that particular date.
    3.cheked in sm19 all activities were active.
    4.all related parameters were set accordingly.
    PLease help me out in finding out the result and to solve the issue

    > When i tried to run an SM20 report to list the actions I did but I get an empty result.Where as able to get other information except that particular user.
    >
    --> I believe you were able to view other users' activities during the same time, but specifically not for one user ?
    In case there are many instances in your SAP system, could you check for all instances individually from SM20 ?
    Also Security Audit logs cease to write when the audit log max size is achieved / quota for the day is done. Even this is instance specific and hence you need to verify this for the instance to which user logged on.
    There are also occurances of Audit logs not being written owing to product error. Could you go through the following SAP Notes , in case the SAP release mentioned in the notes match with that of yours ?
    SAP Note 763159 - Security Audit Log: some transaction starts not audited
    SAP Note 710138 - Security Audit Log: Transactions are not recorded (3)
    SAP Note 317883 - SecAudit: Transactions are not recorded
    SAP Note 483953 - Security Audit Log: AU9 and AUA events are not recorded
    SAP Note 840798 - SecAudit: Transaction code sometimes missing
    cheers !
    PRADi

  • Select for update gives wrong results. Is it a bug?

    Hi,
    Select for update gives wrong results. Is it a bug?
    CREATE TABLE TaxIds
    TaxId NUMBER(6) NOT NULL,
    LocationId NUMBER(3) NOT NULL,
    Status NUMBER(1)
    PARTITION BY LIST (LocationId)
    PARTITION P111 VALUES (111),
    PARTITION P222 VALUES (222),
    PARTITION P333 VALUES (333)
    ALTER TABLE TaxIds ADD ( CONSTRAINT PK_TaxIds PRIMARY KEY (TaxId));
    CREATE INDEX NI_TaxIdsStatus ON TaxIds ( NVL(Status,0) ) LOCAL;
    Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (100101, 111, NULL);
    Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (100102, 111, NULL);
    Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (100103, 111, NULL);
    Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (100104, 111, NULL);
    Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (200101, 222, NULL);
    Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (200102, 222, NULL);
    Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (200103, 222, NULL);
    --Session_1 return TAXID=100101
    select TAXID from TAXIDS where LOCATIONID=111 and NVL(STATUS,0)=0 AND rownum=1 for update
    --Session_2 waits commit
    select TAXID from TAXIDS where LOCATIONID=111 and NVL(STATUS,0)=0 AND rownum=1 for update
    --Session_1
    update TAXIDS set STATUS=1 Where TaxId=100101;
    commit;
    --Session_2 return 100101 opps!?
    --Session_1 return TAXID=100102
    select TAXID, STATUS from TAXIDS where LOCATIONID=111 and NVL(STATUS,0)=0 AND rownum=1 for update
    --Session_2 waits commit
    select TAXID, STATUS from TAXIDS where LOCATIONID=111 and NVL(STATUS,0)=0 AND rownum=1 for update
    --Session_1
    update TAXIDS set STATUS=1 Where TaxId=100102;
    commit;
    --Session_2 return 100103                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    This is a bug. Got to be a bug.
    This should be nothing to do with indeterminate results from ROWNUM, and nothing to do with read consistency at the point of statement start time in session2., surely.
    Session 2 should never return 100101 once the lock from session 1 is released.
    The SELECT FOR UPDATE should restart and 100101 should not be selected as it does not meet the criteria of the select.
    A statement restart should ensure this.
    A number of demos highlight this.
    Firstly, recall the original observation in the original test case.
    Setup
    SQL> DROP TABLE taxids;
    Table dropped.
    SQL> 
    SQL> CREATE TABLE TaxIds
      2  (TaxId NUMBER(6) NOT NULL,
      3   LocationId NUMBER(3) NOT NULL,
      4   Status NUMBER(1))
      5  PARTITION BY LIST (LocationId)
      6  (PARTITION P111 VALUES (111),
      7   PARTITION P222 VALUES (222),
      8   PARTITION P333 VALUES (333));
    Table created.
    SQL>
    SQL> ALTER TABLE TaxIds ADD ( CONSTRAINT PK_TaxIds PRIMARY KEY (TaxId));
    Table altered.
    SQL>
    SQL> CREATE INDEX NI_TaxIdsStatus ON TaxIds ( NVL(Status,0) ) LOCAL;
    Index created.
    SQL>
    SQL>
    SQL> Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (100101, 111, NULL);
    1 row created.
    SQL> Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (100102, 111, NULL);
    1 row created.
    SQL> Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (100103, 111, NULL);
    1 row created.
    SQL> Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (100104, 111, NULL);
    1 row created.
    SQL> Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (200101, 222, NULL);
    1 row created.
    SQL> Insert into TAXIDS (TAXID, LOCATIONID, STATUS) Values (200102, 222, NULL);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> Original observation:
    Session1>SELECT taxid
      2  FROM   taxids
      3  WHERE  locationid    = 111
      4  AND    NVL(STATUS,0) = 0
      5  AND    ROWNUM        = 1
      6  FOR UPDATE;
         TAXID
        100101
    Session1>
    --> Session 2 with same statement hangs until
    Session1>BEGIN
      2   UPDATE taxids SET status=1 WHERE taxid=100101;
      3   COMMIT;
      4  END;
      5  /
    PL/SQL procedure successfully completed.
    Session1>
    --> At which point, Session 2 returns
    Session2>SELECT taxid
      2  FROM   taxids
      3  WHERE  locationid    = 111
      4  AND    NVL(STATUS,0) = 0
      5  AND    ROWNUM        = 1
      6  FOR UPDATE;
         TAXID
        100101
    Session2>There's no way that session 2 should have returned 100101. That is the point of FOR UPDATE. It completely reintroduces the lost UPDATE scenario.
    Secondly, what happens if we drop the index.
    Let's reset the data and drop the index:
    Session1>UPDATE taxids SET status=0 where taxid=100101;
    1 row updated.
    Session1>commit;
    Commit complete.
    Session1>drop index NI_TaxIdsStatus;
    Index dropped.
    Session1>Then try again:
    Session1>SELECT taxid
      2  FROM   taxids
      3  WHERE  locationid    = 111
      4  AND    NVL(STATUS,0) = 0
      5  AND    ROWNUM        = 1
      6  FOR UPDATE;
         TAXID
        100101
    Session1>
    --> Session 2 hangs again until
    Session1>BEGIN
      2   UPDATE taxids SET status=1 WHERE taxid=100101;
      3   COMMIT;
      4  END;
      5  /
    PL/SQL procedure successfully completed.
    Session1>
    --> At which point in session 2:
    Session2>SELECT taxid
      2  FROM   taxids
      3  WHERE  locationid    = 111
      4  AND    NVL(STATUS,0) = 0
      5  AND    ROWNUM        = 1
      6  FOR UPDATE;
         TAXID
        100102
    Session2>Proves nothing, Non-deterministic ROWNUM you say.
    Then let's reset, recreate the index and explicity ask then for row 100101.
    It should give the same result as the ROWNUM query without any doubts over the ROWNUM, etc.
    If the original behaviour was correct, session 2 should also be able to get 100101:
    Session1>SELECT taxid
      2  FROM   taxids
      3  WHERE  locationid    = 111
      4  AND    NVL(STATUS,0) = 0
      5  AND    taxid         = 100101
      6  FOR UPDATE;
         TAXID
        100101
    Session1>
    --> same statement hangs in session 2 until
    Session1>BEGIN
      2   UPDATE taxids SET status=1 WHERE taxid=100101;
      3   COMMIT;
      4  END;
      5  /
    PL/SQL procedure successfully completed.
    Session1>
    --> so session 2 stops being blocked and:
    Session2>SELECT taxid
      2  FROM   taxids
      3  WHERE  locationid    = 111
      4  AND    NVL(STATUS,0) = 0
      5  AND    taxid         = 100101
      6  FOR UPDATE;
    no rows selected
    Session2>Of course, this is how it should happen, surely?
    Just to double check, let's reintroduce ROWNUM but force the order by to show it's not about read consistency at the start of the statement - restart should prevent it.
    (reset, then)
    Session1> select t.taxid
      2   from
      3    (select taxid, rowid rd
      4      from   taxids
      5      where  locationid = 111
      6      and    nvl(status,0) = 0
      7      order by taxid) x
      8   ,  taxids t
      9   where t.rowid = x.rd
    10   and   rownum = 1
    11   for update of t.status;
         TAXID
        100101
    Session1>
    --> Yes, session 2 hangs until...
    Session1>BEGIN
      2   UPDATE taxids SET status=1 WHERE taxid=100101;
      3   COMMIT;
      4  END;
      5  /
    PL/SQL procedure successfully completed.
    Session1>
    --> and then
    Session2> select t.taxid
      2   from
      3    (select taxid, rowid rd
      4      from   taxids
      5      where  locationid = 111
      6      and    nvl(status,0) = 0
      7      order by taxid) x
      8   ,  taxids t
      9   where t.rowid = x.rd
    10   and   rownum = 1
    11   for update of t.status;
         TAXID
        100102
    Session2>Session 2 should never be allowed to get 100101 once the lock is released.
    This is a bug.
    The worrying thing is that I can reproduce in 9.2.0.8 and 11.2.0.2.

  • Fn_my_permissions returns empty result yet my account is a member of sysadmin?

    I was trying to see what permissions I had on another server using fn_my_permissions 
    USE Database_name_here         
    SELECT * FROM sys.fn_my_permissions(NULL, 'SERVER')  
    USE Database_2_name_here         
    SELECT * FROM sys.fn_my_permissions(NULL, 'SERVER')  
    The one DB that returns the expected list of permissions is the only DB where I am the owner.  Others return an empty result.
    My (domain) account is in the local administrators group which is in the sysadmin server role.  
    Whats going on here?  Does my account have to be explicitly granted permissions to those schemas?  Is role membership not enough?

    Hi,
    SELECT * FROM fn_my_permissions(NULL, 'SERVER') returns a list of the effective permissions of the caller on the server.
    For the server itself, a null value (meaning "current server") is required and fn_my_permissions cannot check permissions on a linked server.
    In my option, the server level permission should not change with the databases you specified. You can re-run the code and see if it returns empty by chance.
    To return a list of the effective permissions of the caller on the AdventureWorks2012 database:
    USE AdventureWorks2012;
    SELECT * FROM fn_my_permissions (NULL, 'DATABASE');
    GO
    sys.fn_my_permissions (Transact-SQL)
    http://technet.microsoft.com/en-us/library/ms176097.aspx
    Tracy Cai
    TechNet Community Support

  • [solved]lspci gives strange results

    I just reinstalled, and am trying to get my wireless card up and running.  I ran lspci, then lspci -nn, and it gives unexpected results.  Instead of listing things like vendors and such as intel, and ralink, it just lists non-useful stuff in a format like this:
    xx.xx.x Class [xxxx] Device [xxxx:xxxx] rev 40
    (where all x's are digits)
    what does this mean?  where is the useful information that I was expecting to find (like actual device names)?  What did I forget to do?
    edit:
    Now I have Xorg up, so I'll post the output:
    lspci
    00:00.0 Class 0600: Device 1002:5957
    00:02.0 Class 0604: Device 1002:5978
    00:09.0 Class 0604: Device 1002:597e
    00:0a.0 Class 0604: Device 1002:597f
    00:11.0 Class 0106: Device 1002:4390 (rev 40)
    00:12.0 Class 0c03: Device 1002:4397
    00:12.2 Class 0c03: Device 1002:4396
    00:13.0 Class 0c03: Device 1002:4397
    00:13.2 Class 0c03: Device 1002:4396
    00:14.0 Class 0c05: Device 1002:4385 (rev 42)
    00:14.1 Class 0101: Device 1002:439c (rev 40)
    00:14.3 Class 0601: Device 1002:439d (rev 40)
    00:14.4 Class 0604: Device 1002:4384 (rev 40)
    00:14.5 Class 0c03: Device 1002:4399
    00:15.0 Class 0604: Device 1002:43a0
    00:16.0 Class 0c03: Device 1002:4397
    00:16.2 Class 0c03: Device 1002:4396
    00:18.0 Class 0600: Device 1022:1200
    00:18.1 Class 0600: Device 1022:1201
    00:18.2 Class 0600: Device 1022:1202
    00:18.3 Class 0600: Device 1022:1203
    00:18.4 Class 0600: Device 1022:1204
    01:00.0 Class 0c03: Device 1033:0194 (rev 03)
    02:00.0 Class 0200: Device 10ec:8168 (rev 06)
    03:00.0 Class 0c00: Device 1106:3403 (rev 01)
    04:00.0 Class 0300: Device 10de:0e22 (rev a1)
    04:00.1 Class 0403: Device 10de:0beb (rev a1)
    05:05.0 Class 0280: Device 1814:0301
    05:06.0 Class 0401: Device 1102:0004 (rev 04)
    05:06.1 Class 0980: Device 1102:7003 (rev 04)
    05:06.2 Class 0c00: Device 1102:4001 (rev 04)
    Last edited by Convergence (2012-06-07 02:48:41)

    Falconinidy:  You're right!  That was a  bad move.  Thanks!

  • Convert DataTable to List

    Hi, I have a method that returns List<DocumentsRecentsItem> but the result I got is a DataTable. How can I convert a DataTable to List<DocumentsRecentsItem>?
    public List<DocumentsRecentsItem> GetLastDocuments(uint rowLimit)
    SPSiteDataQuery query = new SPSiteDataQuery{
    Webs = "<Webs Scope='Recursive' />",
    Lists = "<Lists ServerTemplate='850'/>",
    RowLimit = rowLimit,
    Query = string.Format("<OrderBy> <FieldRef Name='Created' Ascending='FALSE' /> </OrderBy>"),
    ViewFields = FieldsConverter.ToViewfields(DocumentsRecentsFields.AllFields)
    DataTable result = SPContext.Current.Web.GetSiteData(query);
    return .....;
    Thanks

    You're going to have to write a conversion method, or extension method on the datatable so that you can call DataTable.ToDocumentsRecentsItemList
    and then in your extension method, tell c# how to turn one of your table rows into a DocumentsRecentsItem, and add it to the list.  There is no easy button for this that will get you around writing a conversion method.  :(
    Also, this is more of a c# question than a specific to SharePoint question, so you may get a better response out of a programming forum than out of a SharePoint forum.

  • ITSM Search on status with "is not" gives incorrect results due to SLA statuses

    Hi,
    When executing a search on Solution Manager ITSM tickets, on the search criterion Status and with operator "is not", the result list does not give correct results.
    For example, an incident with status "Confirmed IRT Exceeded" does show up when searching with criterion "Status is not Confirmed".
    Is there any solution for this behaviour?
    Kind Regards,
    Joyca

    Hi Vivek,
    Thanks for the Knowledge Article.
    The content of the document would indeed help if we only wanted to find "not confirmed" tickets.
    However, the same thing is happening on other statuses. For example searching for "status is not proposed solution" is still not possible with the descriptions in the knowledge document, since the user status "proposed solution" is linked to system status "in process" (I1003), like all the other in-between user statuses such as "customer action" and "in process" etc.
    The only workaround that I see is to use only "is" as operator and never "is not". However, the underlying problem remains. I think it should be possible to use also "is not" without having issues due to those SLA statuses...
    Kr,
    Joyca

  • I want to put all my music onto an external hard drive.  But I can't get it to put music on my itunes.  The music list is completely empty and so is my IPOD.

    I want to put all my music onto an external hard drive.  But I can't get it to put music on my itunes.  The music list is completely empty and so is my IPOD.  How do I do this?  I have a PC with Windows.

    You say the music is not on the external HD, the music list (iTunes?) is empty, and it is not on the iPOd. Then where is the music you want to move to the external HD?
    You can redownlaod iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • Custom search using boolean attribute set to True gives no result

    I am setting up an auto-query using the custom search portlet. This is to show all items where a boolean custom attribute is checked, ie = True.
    In step 3 I have tried to set the operator to Equals to and the default value to True. This gives no results even though several items have this attribute set to True.
    The Auto Query check box is checked.

    Found that True = 1 in database. When set to this the search works.

  • Printer List (Default) is empty

    When trying to add a new printer the default printer list comes up empty. I have not deleted any drivers, they are all still in /Library/Printers. I have tried reinstalling the drivers from the install disk, and repairing disk permissions, to no avail. Can anyone help?

    With the Print & Fax window open, point your mouse to the empty printer list then hold down Control and then click your mouse. The 'Reset printing system' dialog should appear. Select this and then restart your Mac. Now once restarted, open Print & Fax again and select to add. Select the printer from the default view or enter your network details and then see if the Print using menu has any models listed.

  • P/L A/c for a single day gives different results for different users

    Hi!
         We have SAP B1 8.81 (PL 09) in our office. P/L Account for a particular date gives different value for a single account (Other Income Account) for one user and a consistent value for all other users. The user in question is a super user and does not seem to pick a specific entry posted in the Other Income Account for that day thus giving erroneous result. I have checked the Trial Balance for that day and it gives proper result. Only the P/L account gives erroneous data. Could anyone help with the reason for this.
    Thanks
    Sreekumar

    Hi Jitin,
              Thanks for your reply.
              I tried the way you mentioned. However, the result is the same.
              The entry that I'm talking about is an automatic journal entry posted through the Outgoing Payment option.
              To make it more clear, an outgoing payment to a vendor was posted on 05/19/11 for 1,42,178.32. The check was drawn only for 71,089.16 which was the correct amount and the remaining amount (71,089.16) got posted in the Other Income account. The P/L account for this date is not picking the amount of 71,089.16 in the Other Income Account.
    Thanks & Regards
    Sreekumar
    Edited by: Sreekumar on Jan 31, 2012 5:58 PM

Maybe you are looking for

  • Controlfile corrupted when creating a database - ORA-00202

    Hi Oracle experts, I have two virtual machines, the clusterware installed fine and is accessing shared disks, also ASM is running fine. When I created the database using dbca everything went fine until the very last end, I saw a window indicating tha

  • Profile option for online tax declaration and payslip.

    Hi, any body help on setting the profile options for online tax declaration and online payslip for india localization. Regards, krishna

  • New MBP 15 inch - new SDRAM

    Hi everybody! Yesterday I ordered my new MBP 15 inch with standard 2 x 1GB SDRAM. When my new MBP arrives, can I immediately replace the SDRAM by 2 x 2GB SDRAM or do I first have to load the battery and check if everything works right out of the box?

  • PDP issue - ext reqts missing in SRM system

    We are using SRM 4.0 and R/3 release 4.7 and implementing the PDP (plan driven procurement) scenario. The purchase req is sent from R/3 to SRM, but this requisition is not going as an external reqt in the SRM system. We get an error in SLG1 - "Enter

  • HELP..my 3 year old got his hands on my Computer....

    I know,,,stupid...what can i say. Anyway, he was messing around...clicking on things...he "dissconnected"..or "dis-associated" everything. I-Photo, I-tunes, MAIL...everything is asking me to set up new accounts,,start over!! I was able to reconnect I