ViewCriteria issue when using more than once attribute with LOV based on switcher (Oracle JDeveloper 12.2.1.0)

Rigas Papazisis Fusion Middleware, Oracle ADF 2 Comments

Almost a year ago I wrote this post about a ViewCriteria issue when using the same attribute twice in Oracle JDeveloper 12.1.3.0. Now I came across another issue with ViewCriteria, in Oracle JDeveloper 12.2.1.0 this time, again related with a multiple insertion of an attribute but with a more complex scenario this time.

Consider having an attribute with applied LOV that is selected from an lov switcher attribute and this lov switcher gets its value from an EL expression (or from java). I used the Oracle HR schema to reproduce this, so you need to have something like the following:

JobId attributeJobLovSwitcher attribute

Now create ViewCriteria for this viewObject and have JobId attribute more than once. Like the example:

employeesViewCriteria

If you create a query page on employees using this criteria and try to run it you will get an exception “oracle.jbo.NoDefException: JBO-25058: Definition JobLovSwitcher of type Attribute is not found in JobId.“. The same exception you will get if you are using criteria that contains the JobId only once and you try to add it more times through the Advanced -> Add fileds option on your page.

If no switcher is used everything works as should and the attribute can be selected many times. The issue is also reproduced if the switcher gets its value through java code. I cannot find a patch or a workaround for this in Oracle Support. In the unique scenario described though, you are going to need a different approach to query your data.

Rigas Papazisis

Rigas Papazisis

Senior Software Engineer at Nodalpoint Systems
Oracle ADF Certified Implementation Specialist.
In the application development world since 2011. Working with ADF/SOA/Unified BPM Suite, Oracle Weblogic, Oracle Database.
Rigas Papazisis

Leave a Reply

2 Comments on "ViewCriteria issue when using more than once attribute with LOV based on switcher (Oracle JDeveloper 12.2.1.0)"

Notify of
avatar
Sort by:   newest | oldest | most voted
saki
Guest

thanks for shared wonderful information of giving best information.its more useful and more helpful. great doing keep sharing

wpDiscuz