Monday 17 November 2014

ADF: javax.faces.FacesException: javax.el.PropertyNotFoundException: Target Unreachable

Hi,

Today i have faced two issues,
1)javax.faces.FacesException: javax.el.PropertyNotFoundException: Target Unreachable, identifier 'XXXDefPageBean' resolved to null

2) javax.el.PropertyNotFoundException: Target Unreachable, identifier 'bindings' resolved to null

So i am documenting the possible cause and solution which i did with respect to my case. I will going to update this if i found same issue with different case.

1)javax.faces.FacesException: javax.el.PropertyNotFoundException: Target Unreachable, identifier 'XXXDefPageBean' resolved to null

Reason: In my case i have page fragment and i dropped it as a view activity in bounded task flow. I have defined managed bean to programmatically handle things like, value change listener, launch pop up etc . Initially i have defined  the managed bean scope as 'Request scope' but later i found that as a best practice, it is better if we set all our managed bean to backingBean scope (The backing bean scope is comparable to the request scope, with the difference in that it exists for a specific client component. In general, all managed beans used in reusable components should be configured to backingBean scope. For example, bounded task flows that are designed to be regions on a page should use the backingBean scope if more than one instance of the task flow is expected to be on a single page.)

I have changed the scope from request scope to backingBeanScope in my taskflow but forget to change the scope in el expression of bean reference in my pageFragment

Initially all the reference in my pagefragment to managed bean are some thing as shown below

#{XXXDefPageBean.launchPopup}

In JDeveloper code editor window also, it was clearly stating that reference not found hence i got above error.

Solution: I have changed all the references by adding backingBeanScope (since the managed bean defined with scope 'backingBeanScope') something as shown below

#{backingBeanScope.XXXDefPageBean.launchPopup} it solves my error.



2) javax.el.PropertyNotFoundException: Target Unreachable, identifier 'bindings' resolved to null

Reason: In my case, I have a bounded task flow and added method call but some how its databindings (pageDef which is responsible for dataSourece for this method) got deleted from dataBindings.cpx file while resolving conflicts and also there was no pageDef for this method call activity in the taskflow ,hence i got this error.

Solution: I have opened my task flow and created pageDef for my method call activity by right clicking on method call activity and choosed 'create pageDef ' option and it solves my error.

So, As you observer from both error that, "javax.faces.FacesException: javax.el.PropertyNotFoundException: Target Unreachable'" something is not able to access  in adf life cycle phases. If you carefully observe the exception message and analysed what might have caused the problem it would be easy to resolve error. JDevloper is smart enough to point out our mistake, we need to carefully observe by opening our page fragment or taskflow in source editior.

I will update this, if i faced the above error with different cases.

1 comment:

  1. I feel that is among the a lot vital info for me. And I’m happy studying your article. However want to commentary on few normal things, the website taste is great, the articles is in reality excellent: D. Good process, cheers.
    Large Pillow Boxes wholesale

    ReplyDelete