2 Replies Latest reply: Jan 24, 2013 10:53 PM by user2294357 RSS

    ExportCollectionActionListener and a User Friendly Error message(I wish)

    user2294357
      I am a newbie to ADF and I am in the process of trying out the tutorial "Developing Ajax-Based User Interfaces with ADF Faces Rich Client Components" http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_56/jdtut_11r2_56.html

      I stumbled up on an issue with Step 5, this step is to implement a menu item for Exporting the contents displayed on screen to Excel. I did not read the instructions properly; the instruction very clearly tells you to drop the
      "Export Collection Action Listener" under the menu item; I did not read the key word "under"; instead I dropped right at the same level. Then I tried to run the page and got this very user friendly error that I have been struggling with for the last 4 days. I couldn't figure out what in the world this error message is trying to tell me. Reached a point where I started thinking, this isn't for me.

      So today, I decided to save a copy of the page and started reversing the changes; deleted the objects in the reverse order and luckily I figured out what is wrong. I said to myself, Man it shouldn't be this complex. I am sure there is an easier way to figure this out. Now after figuring out what is wrong, when I look at the error stack, I do see the reference to ExportCollectionActionListenerHandler, but that is after 3-4 days of struggle. So can one of you please tell me how in the world I could make heads or tails out of the following error message (due to the fact I did not drop the Export Collection Action Listener on the menu item). Are there any indications of this error in the IDE (JDeveloper). How could I have figured out what is wrong?

      java.lang.NullPointerException
           at oracle.adfinternal.view.faces.util.rich.LoggerUtils.getMessage(LoggerUtils.java:26)
           at oracle.adfinternal.view.faces.util.rich.LoggerUtils.getMessage(LoggerUtils.java:36)
           at oracle.adfinternal.view.faces.facelets.rich.BaseActionListenerHandler.apply(BaseActionListenerHandler.java:43)
           at oracle.adfinternal.view.faces.facelets.rich.ExportCollectionActionListenerHandler.apply(ExportCollectionActionListenerHandler.java:84)
           at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
           at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
           at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
           at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
           at com.sun.faces.facelets.tag.jsf.core.FacetHandler.apply(FacetHandler.java:104)
           at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
           at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
           at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
           at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
           at com.sun.faces.facelets.tag.jsf.core.FacetHandler.apply(FacetHandler.java:104)
           at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
           at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
           at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
           at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
           at com.sun.faces.facelets.tag.jsf.core.FacetHandler.apply(FacetHandler.java:104)
           at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
           at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
           at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
           at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
           at com.sun.faces.facelets.tag.jsf.core.FacetHandler.apply(FacetHandler.java:104)
           at oracle.adfinternal.view.faces.facelets.rich.IncludeHandler._apply(IncludeHandler.java:128)
           at oracle.adfinternal.view.faces.facelets.rich.IncludeHandler.includeDefinition(IncludeHandler.java:156)
           at oracle.adfinternal.view.faces.facelets.rich.FacetRefHandler.applyNextHandler(FacetRefHandler.java:41)
           at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
           at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
           at com.sun.faces.facelets.tag.jsf.core.FacetHandler.apply(FacetHandler.java:104)
           at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
           at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
           at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
           at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
           at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
           at oracle.adfinternal.view.faces.facelets.rich.IncludeDefHandler.apply(IncludeDefHandler.java:68)
           at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
           at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
           at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:82)
           at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:308)
           at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:367)
           at com.sun.faces.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:346)
           at com.sun.faces.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:199)
           at oracle.adfinternal.view.faces.facelets.rich.IncludeHandler.applyNextHandler(IncludeHandler.java:77)
           at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
           at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
           at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
           at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
           at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
           at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
           at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
           at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137)
           at oracle.adfinternal.view.faces.facelets.rich.RichDocumentHandler.applyNextHandler(RichDocumentHandler.java:68)
           at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:184)
           at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
           at com.sun.faces.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:186)
           at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93)
           at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:98)
           at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:82)
           at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:152)
           at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:744)
           at org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ChangeApplyingVDLWrapper.buildView(ViewDeclarationLanguageFactoryImpl.java:341)
           at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:990)
           at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:342)
           at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:236)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:509)
           at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
           at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
           at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
           at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
           at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
           at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
           at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
           at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
           at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
           at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
           at java.security.AccessController.doPrivileged(Native Method)
           at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
           at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
           at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
           at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
           at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
           at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
           at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
           at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
           at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
           at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
           at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
           at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
           at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
           at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
           at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)




      Thanks
      A Sreedhar
        • 1. Re: ExportCollectionActionListener and a User Friendly Error message(I wish)
          Frank Nimphius-Oracle
          Hi,

          note that exceptions bubble up the stack and though you see it in the component you work with, they display as they are (this is how Java works and underlying classes don't have access to a user friendly dictionary). I agree this is not the most compelling feature in Java, but you will learn to get along. In JDeveloper we try to assist new users with audit rules (see Preferences --> Audit) so we catch misplaced components at earliest opportunity and flag them as a red icon on the code editor (for this you need to have a look at the page source editor though)

          Frank
          • 2. Re: ExportCollectionActionListener and a User Friendly Error message(I wish)
            user2294357
            Frank,

            Once again thank you.

            Per your suggestion, I enabled the Audit IDE options (for each of the profiles, selected/enabled IDE);

            Also changed, the Code assist profile from default value to "Audit Rules"

            Opened the page in question, it displayed 4 warnings in the log; but none of them are related to the ExportCollectionActionListener being in the wrong level. Similarly there are couple of yellow boxes displayed on the design and source window (right next to edge), they are also pointing out 4 warnings, again none of those are about the ExportCollectionActionListener.

            What am I missing?

            Warnings displayed in the yellow box next to the design/source window ( I couldn't figure out a way to copy these warnings)
            The table should have at least one column with rowHeader set to 'true' or 'unstyled', along with a child output component
            The 'summary' attribute should be present and describe the purpose of the table/tree
            The 'title' attribute should be set and non empty
            The 'shortDesc' attribute should be specified. If the image is used for decorative purposes, it can be empty.


            Listed below are the warnings dispayed in the messages log

            Jan 24, 2013 10:31:12 PM org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl _checkTimestamp
            WARNING: Apache Trinidad is running with time-stamp checking enabled. This should not be used in a production environment. See the org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION property in WEB-INF/web.xml
            Jan 24, 2013 10:31:13 PM oracle.security.jps.internal.common.util.StrictValidationEventHandler handleEvent
            WARNING: Failed to validate the xml content. SchemaLocation: schemaLocation value = 'http://xmlns.oracle.com/oracleas/schema/11/jps-config-11_1.xsd' must have even number of URI's. Location: unavailable.
            Jan 24, 2013 10:31:13 PM oracle.adfinternal.view.faces.lifecycle.LifecycleImpl _initializeTrinidadFrameBustingAppMapValue
            WARNING: The framebusting context param 'oracle.adf.view.rich.security.FRAME_BUSTING' has been deprecated. Since there is a non-null value for the context param 'org.apache.myfaces.trinidad.security.FRAME_BUSTING' the value of 'oracle.adf.view.rich.security.FRAME_BUSTING' will be ignored. Please remove 'oracle.adf.view.rich.security.FRAME_BUSTING' from the web.xml.
            Jan 24, 2013 10:31:13 PM oracle.security.jps.internal.common.util.StrictValidationEventHandler handleEvent
            WARNING: Failed to validate the xml content. SchemaLocation: schemaLocation value = 'http://xmlns.oracle.com/oracleas/schema/11/jps-config-11_1.xsd' must have even number of URI's. Location: unavailable.
            Jan 24, 2013 10:31:16 PM org.apache.myfaces.trinidad.component.UIXEditableValue _isBeanValidationAvailable
            WARNING: A Bean Validation provider is not present, therefore bean validation is disabled


            A Sreedhar