Wednesday, September 16, 2020

Cannot find matching method oracle.jbo.server.SequenceImpl

 Error(10,1): [Static type checking] - Cannot find matching method oracle.jbo.server.SequenceImpl#<init>(java.lang.String, java.lang.Object). 

Please check if the declared type is right and if the method exists.


Solution 1:

Check if there is residue in meta data for groovy that was recently removed in VO/EO

Eg: VOOperations.xml in my case (12c)

Solution 2:

In VO source code check for trustMode. If any expression has untrusted, set it to default(trusted).

<TransientExpression

      Name="ExpressionScript"

      trustMode="untrusted"

      CodeSourceName="VORow"/>


If that doesn't work follow the below steps

a) Add import in .bcs file 

import groovy.transform.TypeChecked;

import groovy.transform.TypeCheckingMode;

b) add this annotation before def ...expression()

@TypeChecked(TypeCheckingMode.SKIP)

Wednesday, September 9, 2020

Subquery in ADF ViewCriteria using IsSqlFragment

 In the ViewCriteriaItem we have a property IsSqlFragment which is used to substitute literal value as query.

For Eg: To create a view criteria for below query

https://docs.oracle.com/middleware/1213/adf/api-reference-model/oracle/jbo/ViewCriteriaItem.html

select * from Dept where deptSal > (select avg(sal) from Emp)

<ViewCriteria Name="DeptSalCriteria"

 <ViewCriteriaRow

      Name="VOCriteria_row_0"

      UpperColumns="1"

      Conjunction="OR">

  <ViewCriteriaItem

        Name="DeptSalary"

        ViewAttribute="DeptSal"

        Operator=">"

        Conjunction="AND"

        Value="(select avg(sal) from Emp)"

        Required="Optional" IsSqlFragment="true"/>

  </ViewCriteriaRow>

</ViewCriteria>

Assisted By: Jagadeesh Bandaru