I was trying to define a groovy expression for creating a sequence for one of my entity object attribute.
But while trying to create a new record using BC Tester I am getting the following exception.
General error during semantic analysis: JBO-25152: Calling the constructor for class oracle.jbo.server.SequenceImpl is not permitted.
oracle.jbo.ExprSecurityException: JBO-25152: Calling the constructor for class oracle.jbo.server.SequenceImpl is not permitted.
After debugging for some time, I have found a resolution for this. While defining a groovy expression for an entity object attribute, the source code is generated as below.
<TransientExpression trustMode="untrusted"><![CDATA[(new oracle.jbo.server.SequenceImpl("SEQ_NAME", adf.object.getDBTransaction())).getSequenceNumber()]]></TransientExpression>
In order to resolve the above issue we need to make the trustMode attribute to trusted or remove the attribute trustMode as the default value for this attribute is trusted.
<TransientExpression><![CDATA[(new
oracle.jbo.server.SequenceImpl("SEQ_NAME",
adf.object.getDBTransaction())).getSequenceNumber()]]></TransientExpression>
No comments:
Post a Comment