Forum Stats

  • 3,855,322 Users
  • 2,264,499 Discussions
  • 7,905,968 Comments

Discussions

11g to 12C Upgrade Issue - Export Table Functionality Broken

Srini Mad
Srini Mad Member Posts: 631
edited Nov 9, 2017 4:23AM in JDeveloper and ADF

Version: Upgraded from 11.1.1.7.1 to 12.2.1.2

We have upgraded to 12.2.1.2 and are doing a round of regression testing. We find that the export table functionality is broken. The export opens a spreadsheet with just the first row on the table and a message:

pastedImage_1.png

The export works fine if the first column 'My ID' alone is present and rest of the columns are hidden!

I am trying to debug this - but thought would check with the community as I am debugging this.

Tagged:

Best Answer

Answers

  • Timo Hahn
    Timo Hahn Senior Principal Technical Consultant - Oracle ACE Director Member, Moderator Posts: 38,777 Red Diamond
    edited Jul 25, 2017 2:13AM

    Well, to get into this we need more info about the tabel you try to export, the data in the table and how you export the table.

    Timo

  • Srini Mad
    Srini Mad Member Posts: 631
    edited Jul 25, 2017 2:49AM

    The default ADF Export Cllection Action Listener is being used and table details are below. This worked perfectly fine in 11.1.1.7.1 and is broken ever since the upgrade.

    <af:panelCollection id="pc1" styleClass="AFStretchWidth"                          featuresOff="freeze wrap formatMenu">        <f:facet name="toolbar">          <af:toolbar id="t1">            <af:commandButton text="Export" id="cb2" immediate="true"                              rendered="#{securityContext.userGrantedResource['resourceName=Export;resourceType=ActionPermission;action=enabled']}">              <af:exportCollectionActionListener exportedId="t5"                                                type="excelHTML"                                                title="MYEXPORT"                                                filename="QueueExport.xls"/>            </af:commandButton>          </af:toolbar>        </f:facet>        <af:table value="#{bindings.QueueVO.collectionModel}" var="row"                  rows="#{adfFacesContext.outputMode eq 'printable'? bindings.QueueVOIterator.estimatedRowCount : bindings.QueueVO.rangeSize}"                  emptyText="#{bindings.QueueVO.viewable ? 'No data to display.' : 'Access Denied.'}"                  fetchSize="#{adfFacesContext.outputMode eq 'printable'? -1 : bindings.QueueVO.rangeSize}"                  rowBandingInterval="1" rowSelection="single"                  columnSelection="single" allDetailsEnabled="true"                  autoHeightRows="0"                  filterModel="#{bindings.QueueVOQuery.queryDescriptor}"                  queryListener="#{bindings.QueueVOQuery.processQuery}"                  filterVisible="false" varStatus="vs" id="t5"                  selectedRowKeys="#{bindings.QueueVO.collectionModel.selectedRow}"                  selectionListener="#{bindings.QueueVO.collectionModel.makeCurrent}"                  partialTriggers=":::soc1 ::cb3" clientComponent="true"                  displayRow="selected">          <af:column sortProperty="#{bindings.QueueVO.hints.MyId.name}"                    filterable="true" sortable="true"                    headerText="#{bindings.QueueVO.hints.MyId.label}"                    id="c11" width="50" align="center">            <af:clientListener method="moveColumn" type="propertyChange"/>            <af:serverListener method="#{backingBeanScope.QueueBackingBean.moveTableColumn}"                              type="retainScrollBar"/>            <af:commandLink action="showDetail" text="#{row.MyId}" id="edl53">              <af:setPropertyListener from="EDIT" to="#{pageFlowScope.viewtype}"                                      type="action"/>              <af:setPropertyListener from="#{row.MyId}"                                      to="#{pageFlowScope.MyId}"                                      type="action"/>              <af:setPropertyListener from="#{row.Rownu}"                                      to="#{pageFlowScope.userKey}"                                      type="action"/>            </af:commandLink>          </af:column>          <af:column sortProperty="#{bindings.QueueVO.hints.LastName.name}"                    filterable="true" sortable="true"                    headerText="#{bindings.QueueVO.hints.LastName.label}"                    id="c12" filterFeatures="caseInsensitive">            <af:clientListener method="moveColumn" type="propertyChange"/>            <af:serverListener method="#{backingBeanScope.QueueBackingBean.moveTableColumn}"                              type="retainScrollBar"/>            <af:inputText value="#{row.bindings.LastName.inputValue}"                          label="#{bindings.QueueVO.hints.LastName.label}"                          required="#{bindings.QueueVO.hints.LastName.mandatory}"                          columns="#{bindings.QueueVO.hints.LastName.displayWidth}"                          maximumLength="#{bindings.QueueVO.hints.LastName.precision}"                          shortDesc="#{bindings.QueueVO.hints.LastName.tooltip}"                          id="it5" readOnly="true">              <f:validator binding="#{row.bindings.LastName.validator}"/>            </af:inputText>          </af:column>
  • Florin Marcus
    Florin Marcus Member Posts: 553 Silver Badge
    edited Jul 25, 2017 2:59AM

    I’ve seen this problem with migrating to 12.2.1.2 before.
    In my case it was a date column, like:

    <af:outputText value="#{row.DateOfBirth}" id="ot4">

                            <af:convertDateTime pattern="#{row.bindings.DateOfBirth.hints.format}"/>

    </af:outputText>

    I’ve had to remove the af:convertDateTime tag for the export to work.

    The tag is unnecesarry if you use Business Components (and you should use ADF BC when you build a large enough applications in ADF).

    You can replace it with a View Object attribute formatter.

    Srini Mad
  • Srini Mad
    Srini Mad Member Posts: 631
    edited Jul 25, 2017 5:13AM

    On enabling finest level logs, I have two suspects:

    1. <org.apache.myfaces.trinidad.component.UIXCollection> <UIXCollection> <_verifyComponentInContext> <The row key or row index of a UIXCollection component is being changed outside of the components context. Changing the key or index of a collection when the collection is not currently being visited, invoked on, broadcasting an event or processing a lifecycle method, is not valid. Data corruption and errors may result from this call. Turn on fine level logging for a stack trace of this call. Component ID: pt1:r1:0:pc1:t5>

    2.

    <oracle.adf.common> <ADFContext> <logDiagnosticsInternal> <>> Allocation logger invoked:  ALLOCATION BUFFER EXCEEDED, STARTING OVER

    Set Count=1 Remove Count=1

    Current external context:

    Context:  [email protected][app:SMIS module:smis path:/smis spec-version:3.1]

    Request:  null

    >> Allocation stacks:

    >>>> Set ADFContext:

    Current external context:

    Context:  [email protected][app:SMIS module:smis path:/smis spec-version:3.1]

    Request:  null

    So I went ahead and applied some filters on the table to reduce the resultset to less than table range size (say less than 15) and now it works fine again!

  • Srini Mad
    Srini Mad Member Posts: 631
    edited Jul 31, 2017 6:47AM
    On enabling FINEST logs at 'org.apache.myfaces.trinidad.component'. The below stack shows the exact line that fails in the ExportActionListener:

    Still trying to figure out what could be the cause of the issue as a standalone test case does not reproduce the issue.
    <org.apache.myfaces.trinidad.component.UIXCollection> <UIXCollection> <_verifyComponentInContext> <The row key or row index of a UIXCollection component is being changed outside of the components context. Changing the key or index of a collection when the collection is not currently being visited, invoked on, broadcasting an event or processing a lifecycle method, is not valid. Data corruption and errors may result from this call. Turn on fine level logging for a stack trace of this call. Component ID: pt1:r1:0:pc1:t5> 

      at org.apache.myfaces.trinidad.component.UIXCollection._verifyComponentInContext(UIXCollection.java:2289)
      at org.apache.myfaces.trinidad.component.UIXCollection.setRowKey(UIXCollection.java:560)
      at org.apache.myfaces.trinidad.component.UIXTable.setRowKey(UIXTable.java:793)
      at oracle.adfinternal.view.faces.export.CollectionExportDirector._renderDataRows(CollectionExportDirector.java:641)
      at oracle.adfinternal.view.faces.export.CollectionExportDirector._renderContent(CollectionExportDirector.java:144)
      at oracle.adfinternal.view.faces.export.CollectionExportDirector.export(CollectionExportDirector.java:123)
      at oracle.adfinternal.view.faces.export.ExportCollectionActionListener.processAction(ExportCollectionActionListener.java:207)
      at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)

  • Brenden Anstey
    Brenden Anstey Member Posts: 1,123 Silver Badge
    edited Nov 8, 2017 8:11PM Answer ✓

    Apply patch: 23699918

    23699918: EXPORT TO EXCEL SHOWING BLANK VALUE FOR ORGANIZATION DETAILS

    Applicable for 12.2.1.0, 12.2.1.1 and 12.2.1.2.

This discussion has been closed.