Disclaimer

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Thursday, October 29, 2015

Oracle ADF Jdeveloper 12c Groovy Expression to Generate Sequence no longer works

Until Jdeveloper 12c for supplying primary key to your entity creation you could simply add a groovy expression in the primary key attribute's default expression like:

(new oracle.jbo.server.SequenceImpl("", adf.object.getDBTransaction())).getSequenceNumber()

However, running the same code in Jdeveloper 12 will throw following runtime exception:

General error during semantic analysis: JBO-25152: Calling the constructor for class oracle.jbo.server.SequenceImpl is not permitted.

Solution:

  • Open EO in the source view.
  • Search for trustMode="untrusted"
  • Change it to trustMode="trusted"
This should work now.

No comments: