This discussion is archived
5 Replies Latest reply: Dec 12, 2012 3:37 AM by 879338 RSS

ORDER BY in cmis query

879338 Newbie
Currently Being Moderated
I have a custom metadata field in ucm and I need to sort content presenter result based on that field. I have followed http://yonaweb.be/using_dynamic_queries_content_presenter_0 document and used cmis query to show content. My getter method of query looks like

public String getContentQuery(){
StringBuffer query = new StringBuffer();

query.append("SELECT * FROM ora:t:IDC:GlobalProfile WHERE ora:p:xRegionDefinition = 'UPDATE_REG_DEF'");


String contentType= (String)ADFUtil.evaluateEL("#{viewScope.pLinkSelectionType}");
if("News".equals(contentType)){
query.append( " and ora:p:xUpdateContentType = 'News'");
}
if("Event".equals(contentType)){
query.append( " and ora:p:xUpdateContentType = 'Event'");
}
if("Insight".equals(contentType)){
query.append( " and ora:p:xUpdateContentType = 'Insight'");
}

query.append(" ORDER BY ora:p:xDocumentSortDate DESC");

return query.toString();
}

It works fine when load the page first time but after that if we change value of documentsortdate in ucm and try to reload the page, it shows same result. Looks like result is getting cached. On reloading my getContentQuery method is getting called so I believe content presenter flow is getting executed.



Thanks
Sanjeev.
  • 1. Re: ORDER BY in cmis query
    jiri.machotka Guru
    Currently Being Moderated
    IMHO it might have nothing to do with ORDER BY - have you tried to add/delete content item(s) according to the criteria? Has it got refreshed?

    Take a look at this post: http://fusione2o.blogspot.co.uk/2011/07/content-presenter-cmis-complete.html

    Among other details it defines the Refresh parameter of the taskflow (the value there is "ifNeeded"). I'd focus on this one.
  • 2. Re: ORDER BY in cmis query
    879338 Newbie
    Currently Being Moderated
    I tried to introduce a delete button to delete content. I set a refresh condition on contentpresenter task-flow as #{requestScope.pRefreshUpdateSection == 'Y'}. Now on delete button I am calling following bean method.


    public void deleteContent(ActionEvent actionEvent) {
    // Add event code here...
    String dID = ((ValueWrapperImpl)ADFUtil.evaluateEL("#{node.propertyMap['dID'].value}")).getStringValue();
    String dDocName = ((ValueWrapperImpl)ADFUtil.evaluateEL("#{node.propertyMap['dDocName'].value}")).getStringValue();
    String user = (String)ADFUtil.evaluateEL("#{securityContext.userName}");
    RIDCUtil ridc;

    try {
    ridc = new RIDCUtil();
    ridc.deleteDocument(user, dDocName, dID);
    ADFUtil.getRequestFlowScope().put("pRefreshUpdateSection", "Y");
    } catch (IdcClientException e) {
    String errorMessage = "An unexpected error occured while deleting document. Please contact the System Administartor." + e.getCause();
    throw new JboException(errorMessage);
    }
    }

    RIDC is able to delete content successfully but when contentpresenter binding is getting executed, its still looking for old content. Ideally it should start executing new query and start showing content as per new query. I get following error instead.

    <UIXRegion> <_warn> Error processing viewId: /doclib-content-presenter/presenter-multi-node-view URI: /oracle/webcenter/doclib/view/jsf/taskflows/presenter/presenterMultiView.jsff actual-URI: /oracle/webcenter/doclib/view/jsf/taskflows/presenter/presenterMultiView.jsff.
    oracle.webcenter.content.integration.RepositoryRuntimeException: Dec 10, 2012 1:49:50 PM oracle.webcenter.content.integration.spi.ucm.NodeOps getVcrGetDocumentByNameDataBinder
    SEVERE: Unable to fetch document in repository UCM with dDocName VMOHSKEND03633000335. When calling service VCR_GET_DOCUMENT_BY_NAME, as user sponsor, at timestamp 12/10/12 1:49 PM, recieved status code -16.

         at oracle.webcenter.content.integration.Node.getProperties(Node.java:867)
         at oracle.webcenter.content.integration.Node.getProperties(Node.java:795)
         at oracle.webcenter.content.integration.Node.getProperty(Node.java:692)
         at oracle.webcenter.content.integration.el.support.NodeWrapperImpl.getProperty(NodeWrapperImpl.java:278)
         at oracle.webcenter.content.integration.el.support.ContentPropertyMap.getProperty(ContentPropertyMap.java:159)
         at oracle.webcenter.content.integration.el.support.ContentPropertyMap.get(ContentPropertyMap.java:90)
         at oracle.webcenter.content.integration.el.support.ContentPropertyMap.get(ContentPropertyMap.java:46)
         at javax.el.MapELResolver.getValue(MapELResolver.java:164)
         at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:173)
         at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:200)
         at com.sun.el.parser.AstValue.getValue(Unknown Source)
         at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)
         at org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:68)
         at oracle.adfinternal.view.faces.renderkit.rich.ValueRenderer.getValue(ValueRenderer.java:184)
         at oracle.adfinternal.view.faces.renderkit.rich.ValueRenderer.getConvertedString(ValueRenderer.java:145)
         at oracle.adfinternal.view.faces.renderkit.rich.OutputTextRenderer.encodeAll(OutputTextRenderer.java:148)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:341)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:405)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeHorizontalChild(PanelGroupLayoutRenderer.java:499)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$100(PanelGroupLayoutRenderer.java:30)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:659)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:601)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
         at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:358)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:341)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:405)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:432)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$300(PanelGroupLayoutRenderer.java:30)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:682)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:601)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
         at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:358)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:341)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:405)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:432)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$300(PanelGroupLayoutRenderer.java:30)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:682)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:601)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
         at oracle.webcenter.content.internal.view.template.TemplateSwitcher.processFlattenedChildren(TemplateSwitcher.java:161)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:160)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
         at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:358)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:341)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:405)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:432)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$300(PanelGroupLayoutRenderer.java:30)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:682)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:601)
         at org.apache.myfaces.trinidad.component.UIXIterator$1.process(UIXIterator.java:163)
         at org.apache.myfaces.trinidad.component.UIXIterator$Runner.processComponent(UIXIterator.java:566)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
         at org.apache.myfaces.trinidad.component.UIXIterator$Runner.run(UIXIterator.java:535)
         at org.apache.myfaces.trinidad.component.UIXIterator.processFlattenedChildren(UIXIterator.java:166)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:160)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
         at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:358)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:341)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
         at org.apache.myfaces.trinidad.component.UIXGroup.encodeChildren(UIXGroup.java:138)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:405)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:421)
         at oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer._encodeChildren(RegionRenderer.java:278)
         at oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer.encodeAll(RegionRenderer.java:201)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:341)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
         at oracle.adf.view.rich.component.fragment.UIXRegion.encodeEnd(UIXRegion.java:300)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:405)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:432)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$300(PanelGroupLayoutRenderer.java:30)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:682)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:601)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
         at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:358)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:341)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:405)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:432)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$300(PanelGroupLayoutRenderer.java:30)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:682)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:601)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
         at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:358)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:341)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:405)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:432)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$300(PanelGroupLayoutRenderer.java:30)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:682)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:601)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
         at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:358)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:341)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:405)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:432)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$300(PanelGroupLayoutRenderer.java:30)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:682)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:601)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
         at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:358)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:341)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:405)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
         at oracle.adfinternal.view.faces.renderkit.rich.customizable.PanelCustomizableRenderer.encodeChildrenVertically(PanelCustomizableRenderer.java:1053)
         at oracle.adfinternal.view.faces.renderkit.rich.customizable.PanelCustomizableRenderer.encodeAll(PanelCustomizableRenderer.java:356)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:341)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:405)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
         at oracle.adfinternal.view.page.editor.renderkit.PageCustomizableRenderer.encodeAll(PageCustomizableRenderer.java:323)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:341)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:405)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:432)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$300(PanelGroupLayoutRenderer.java:30)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:682)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:601)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:170)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
         at org.apache.myfaces.trinidad.component.UIXGroup.processFlattenedChildren(UIXGroup.java:96)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:160)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
         at oracle.adfinternal.view.faces.taglib.region.IncludeTag$FacetWrapper.processFlattenedChildren(IncludeTag.java:675)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:160)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:290)
         at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:255)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:358)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:341)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
    <removed some log>
    Caused by: oracle.webcenter.content.integration.NoSuchNodeException: Dec 10, 2012 1:49:50 PM oracle.webcenter.content.integration.spi.ucm.NodeOps getVcrGetDocumentByNameDataBinder
    SEVERE: Unable to fetch document in repository UCM with dDocName VMOHSKEND03633000335. When calling service VCR_GET_DOCUMENT_BY_NAME, as user sponsor, at timestamp 12/10/12 1:49 PM, recieved status code -16.

         at oracle.webcenter.content.integration.spi.ucm.NodeOps.getVcrGetDocumentByNameDataBinder(NodeOps.java:1683)
         at oracle.webcenter.content.integration.spi.ucm.NodeOps.getUCMNodeWithId(NodeOps.java:1569)
         at oracle.webcenter.content.integration.spi.ucm.NodeOps.getProperties(NodeOps.java:385)
         at sun.reflect.GeneratedMethodAccessor758.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at oracle.webcenter.content.integration.federated.internal.delegate.LatestInterfaceVersionWrapper.invoke(LatestInterfaceVersionWrapper.java:73)
         at $Proxy188.getProperties(Unknown Source)
         at oracle.webcenter.content.integration.federated.internal.filter.logging.NOPSLoggingFilter.getProperties(NOPSLoggingFilter.java:371)
         at sun.reflect.GeneratedMethodAccessor757.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at oracle.webcenter.content.integration.federated.internal.delegate.LatestInterfaceVersionWrapper.invoke(LatestInterfaceVersionWrapper.java:73)
         at $Proxy188.getProperties(Unknown Source)
         at oracle.webcenter.content.integration.federated.internal.filter.validation.NOPSValidationFilter.getProperties(NOPSValidationFilter.java:379)
         at sun.reflect.GeneratedMethodAccessor756.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at oracle.webcenter.content.integration.federated.internal.delegate.LatestInterfaceVersionWrapper.invoke(LatestInterfaceVersionWrapper.java:73)
         at $Proxy188.getProperties(Unknown Source)
         at oracle.webcenter.content.integration.federated.internal.filter.cache.NOPSCacheFilter.getProperties(NOPSCacheFilter.java:457)
         at sun.reflect.GeneratedMethodAccessor755.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at oracle.webcenter.content.integration.federated.internal.delegate.LatestInterfaceVersionWrapper.invoke(LatestInterfaceVersionWrapper.java:73)
         at $Proxy188.getProperties(Unknown Source)
         at oracle.webcenter.content.integration.federated.internal.delegate.LatestNodeOpsDelegate.getProperties(LatestNodeOpsDelegate.java:585)
         at oracle.webcenter.content.integration.Node.getProperties(Node.java:833)
         ... 277 more
    Caused by: oracle.stellent.ridc.protocol.ServiceException: Unable to retrieve information for 'VMOHSKEND03633000335'. Unable to find latest released revision for item 'VMOHSKEND03633000335'.
         at oracle.stellent.ridc.protocol.ServiceResponse.getResponseAsBinder(ServiceResponse.java:142)
         at oracle.stellent.ridc.protocol.ServiceResponse.getResponseAsBinder(ServiceResponse.java:108)
         at oracle.webcenter.content.integration.spi.ucm.UCMBridge.executeRequest(UCMBridge.java:778)
         at oracle.webcenter.content.integration.spi.ucm.NodeOps.getVcrGetDocumentByNameDataBinder(NodeOps.java:1671)
         ... 304 more


    Pagedef binding looks like

    <taskFlow id="doclibcontentpresenter2"
    taskFlowId="/oracle/webcenter/doclib/view/jsf/taskflows/presenter/contentPresenter.xml#doclib-content-presenter"
    activation="deferred"
    xmlns="http://xmlns.oracle.com/adf/controller/binding"
    Refresh="ifNeeded"
    RefreshCondition="#{requestScope.pRefreshUpdateSection == 'Y'}">
    <parameters>
    <parameter id="taskFlowInstId" value="${'myinst'}"/>
    <parameter id="datasourceType" value="${'dsTypeQueryExpression'}"/>
    <parameter id="datasource"
    value="#{backingBeanScope.NewsAndEventBean.contentQuery}"/>
    <parameter id="templateCategory" value="${''}"/>
    <parameter id="templateView" value="${'templates.news.list'}"/>
    <parameter id="regionTemplate" value="${'false'}"/>
    <parameter id="maxResults" xmlns="http://xmlns.oracle.com/adfm/uimodel"
    value="#{backingBeanScope.NewsAndEventBean.contentMaxResult}"/>
    </parameters>


    getContentQuery method of bean returns query and getContentMaxResult method returns number of max result as

    public Long getContentMaxResult(){
    String contentType= (String)ADFUtil.evaluateEL("#{viewScope.pLinkSelectionType}");
    if("News".equals(contentType) || "Event".equals(contentType) || "Insight".equals(contentType)){
    return 5L;
    }
    else
    return 15L;

    }


    public String getContentQuery(){
    StringBuffer query = new StringBuffer();
    query.append("SELECT * FROM ora:t:IDC:GlobalProfile WHERE ora:p:xRegionDefinition = 'REL3_UPDATE_REG_DEF'");



    String contentType= (String)ADFUtil.evaluateEL("#{viewScope.pLinkSelectionType}");
    if("News".equals(contentType)){
    query.append( " and ora:p:xUpdateContentType = 'News'");
    }
    if("Event".equals(contentType)){
    query.append( " and ora:p:xUpdateContentType = 'Event'");
    }
    if("Insight".equals(contentType)){
    query.append( " and ora:p:xUpdateContentType = 'Insight'");
    }

    query.append(" ORDER BY ora:p:xDocumentSortDate DESC");

    return query.toString();
    }


    As content presenter is looking for old file, I think some kind of caching is going on.

    Thanks
    Sanjeev
  • 3. Re: ORDER BY in cmis query
    jiri.machotka Guru
    Currently Being Moderated
    The error only confirms that there is a problem with refresh ('caching').

    I found another article by Yannick Ongena which covers this topic: http://yonaweb.be/using_dynamic_queries_content_presenter_0

    It seems you are on the right track, but possibly made a flaw somewhere. As it might be quite challenging to track it down, I'd recommend to start from Yannick's working example and then modify it to meet your needs.
  • 4. Re: ORDER BY in cmis query
    Jaap Spiering Explorer
    Currently Being Moderated
    I am having a similar issue. The query keeps requesting a content item that was just deleted. I have yet to find a good workaround for this, we are keeping track of deleted Content ID's and explicitly excluding them from our query.

    Perhaps you could configure the Cache Invalidation Interval, I have not tested this yet and I don't know if it works with deletions as well.
    http://docs.oracle.com/cd/E23943_01/webcenter.1111/e12405/wcadm_documents.htm#BABIFHEE
  • 5. Re: ORDER BY in cmis query
    879338 Newbie
    Currently Being Moderated
    A workaround for this issue:

    I tried with many caching settings available in UCM but nothing works. Finally I figure out that UCM caches query+result. If somehow I can change query, result will not be picked from cache. I added a custom metadata field in ucm and defaulted in with current date. In CMIS query I added ' xDocumentSortDate < TIMESTAMP current_time_stamp' and it worked. Every time when user runs this query timestamp gives new value and query changes. UCM does not show results from cache.

    Thanks
    Sanjeev.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points