JDev 11.1.2.1.0: Dealing with ADF_FACES-60003 Error: Component with ID: r1:1:cb1 not registered for Active Data.

The last couple of weeks I saw some questions on OTN JDev forum dealing with file and image handling in ADF applications. All of the needed information to do this is already published in various blog posts and tutorials, still I did not find a post covering all aspects with a single demo application.

I’m in the progress of writing a mini series about file handling (upload and download) and image handling in ADF applications providing exactly this demo application. If you are interested in this stay tuned, as the first part is almost ready to publish.

Now, while I assembled the demo application I stumbled upon this error:

java.lang.IllegalStateException: ADF_FACES-60003:Component with ID: r1:1:cb1 not registered for Active Data.
	at oracle.adfinternal.view.faces.activedata.PageDataUpdateManager.unregisterComponent(PageDataUpdateManager.java:600)
	at oracle.adfinternal.view.faces.context.RichPhaseListener.handleStartAndStopActiveData(RichPhaseListener.java:502)
	at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:479)
	at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:204)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
	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:122)
	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 weblogic.servlet.utils.FastSwapFilter.doFilter(FastSwapFilter.java:66)
	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
	at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
	at java.security.AccessController.doPrivileged(Native Method)
	at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
	at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
	at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
	at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
	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:136)
	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)
...

It happened when I used a af:fileDownloadActionListeneron a detail page fragment and navigated back to the master page fragment. As I never saw the error before and did not use ‘Active Data’ anywhere in my demo, I started digging.

There are some members of OTN hitting the same error (may be not under the exact same conditions) as this thread shows.
The thread points to an older post which mentions that this is caused by the bug 9218151 and is fixed in JDev 11.1.2.0.0. As I use JDev 11.1.2.1.0 this should not happen, or I see a regression of the bug in JDev 11.1.2.1.0. The bug database did not help either, as there is very little information on the bug itself.
The solution given in the thread to use a custom error handler (and ignore the error) did not seem right to me. I did not try the other solution to write a custom tag either, as it looks like overkill to me.

The normal debugging of this problem didn’t get me further to a solution. I tried a couple of things and even was able to get around the error with some hacks I will not publish here.

Luckily I met Frank Nimphius at the DOAG2011 and ask him about this bug (that’s what such events are for :)). He gave the right pointer to solve the problem.
With JDev 11.1.2.0.0 a new default ‘change event policy’ was introduced to the iterators and components. Now the policy is ‘ppr’ and not ‘none’ as before.
Jobinesh had blogged about the new ‘change event policy’ and its meaning here.

As I couldn’t reproduce this behavior in JDev 11.1.1.5.0 Franks suggestion was to set the change event policy back to none. After doing exactly this the error is gone, the application runs as expected.

The new policy can be changed (back to the old behavior) on a global level for applications you are building new under JDev 11.1.2.x. To do this open the adfc-config.xml file from the ‘Application Resources:

adfc-config.xml

adfc-config.xml

change to the ‘Overview’ tab and select the ‘Model’. Here you remove the selection from the check box:

adfc-Config.xml Change Event Policy

adfc-Config.xml Change Event Policy

If you already have done some work in your project, e.g. used some views on an UI page, you have to change the iterators one by one. For this open the bindings of the page and select an iterator:

Change Event Policy on Iterator

Change Event Policy on Iterator

You may let the default ‘change event policy’ be ‘ppr’ if you like, as there are some advantages (there must be a reason why Oracle changed it in the first place). Only if you hit the error you can change the policy for the iterators involved. Keep in mind, that changing the policy later may have some side effects to your existing pages. It’s up to you to decide and test this.

I’ll file an SR for this just to make sure that Oracle looks into this again. For me it looks like a bug as I don’t understand why I get an error at all.

14 thoughts on “JDev 11.1.2.1.0: Dealing with ADF_FACES-60003 Error: Component with ID: r1:1:cb1 not registered for Active Data.

  1. Hi Timo

    I hope you enjoyed DOAG.

    From experience the “not registered for Active Data” is a generic one the framework throws from time to time (kind of like the EL property exception equivalent), and as you indicated it can be raised in different circumstances. We recently stumbled across it when one of my colleagues had hand crafted a pageDef file with some sort of circular binding reference. While we hit the “not registered for Active Data” error, the problem was caused elsewhere in the pageDef configuration.

    Regarding “there must be a reason why Oracle changed it in the first place” …. I’m not so sure we want this on at all: https://forums.oracle.com/forums/thread.jspa?messageID=9814270&#9814270

    Thanks for the blog post 🙂

    CM.

    • Chris,
      thanks for pointing to the discussion. I’ve read it some time ago, but it never crossed my mind that this is a side effect of the change event policy when I hit the ‘Active Data’ error. I’m totally with you that we probably don’t need the flag.
      It’s annoying that we now have to set the policy back to ‘none’ right after staring a new project. I see trouble coming.
      This is the reason I’ll file an SR (you know the trouble involved:() on this.

      Timo

  2. Hi Timo,

    great work! A similar SR “3-4441272111: Component with ID: x not registered for Active Data upon switching tab”. With the status “32 – Not a Bug. To Filer” for Bug 12960446.

    kind regards

    • Martin,
      thank you for posting the bug number. Interestingly I searched MOS for bugs related to the problem and did not this one.
      The ‘nice’ thing about MOS, you see it’s not a bug, but not information why.
      Well, lets see where this ends 🙂

  3. Hello Timo!

    First of all I want to thank you on great work you’re doing. Although I’m new to the ADF and JDev I already ran into some ‘serious’ stuff. I liked very much your blog on handling images and files in ADF. I was looking through some threads on forums.oracle.com but there doesn’t seem to be a real solution to this PPR problem. I mean you can ‘play’ with changeEventPolicy settings but what happens when like in my case you are using some operations items on your page (panel tabbed –> form –> navigational buttons (first, previous, next, last)? And on those items you cannot set the changeEventPolicy setting ?! But when I comment them out, the thing works fine.

    I’m sorry maybe this is more like a question for the Oracle forums, but again I’m new to all this so many times I don’t really know where to turn to. Do you know if they (Oracle) made some progress regarding this PPR issue?

    Thanks in advance, Saša Jakovac.

    • Saša,
      I’m not even sure they have started looking into this 😦
      I would open a new thread in OTN JDev forum with your issue. You need to provide more info so that we better understand under which circumstances you get the error. This blog is not meant for this kind of help. If you have a test case available this would help too. You might consider joining theADF Enterprise Methodology Group and use the bug tracker provided (http://java.net/projects/adfemg)

      Timo

  4. Hi Timo,
    Thanks for your post
    I’m using Jdev 11.1..2.3 and in my project am using ADF task flow and JASPER for reporting so i have to use af:fileDownloadActionListeneron to export file in pdf format.
    this error appears and I did what you sad but the error persist

    rem: in jdev 11.1.2.3 the default value of Changing Event Policy is PPR

    what can be the solution ?

    thanks
    Fakhri

  5. Praise the google gods…
    I had the same error and it was driving me nuts to figure out how to fix it.
    I only had to change the iterator change event policy on the page using the download control to fix the problem.
    I’m using Jdev 11.1.2.3.0

  6. change event policy, yes it does fix the error, but in my case i have a delete operation on the same iterator , and it won’t refresh after delete if i change event policy to none

  7. Same problem with JDev 12c. In my case i only had to change the adf-config.xml. The iterators were set to none (on the ChangeEventPolicy).
    Thanks allot!

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.