Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ViewObject is null in groovy

John SubinMar 3 2015 — edited Mar 30 2015

Hi,

I am using JDeveloper 11.1.1.7

I have written  groovy expression for a bind variable in my view object  like this.

adf.object.applicationModule.findViewObject("TestView1").first().getAttribute("attribute1")

It's throwing error on UI sometimes, not always. The error is "Cannot invoke method first() on null object".

TestView1 is already available ready in the appModule. TestView1 is shuttled already in appModule.

TestView1 has a simple query . It must always have a row for sure.

Anyone faced the same problem anywhere.

How should I solve this problem. Kindly help.

LOG:

<ExprEval> <internalEvaluateGroovyScript> [14189] java.lang.NullPointerException: Cannot invoke method first() on null object

  at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:77)

  at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:750)

  at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:727)

  at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:17)

  at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)

  at org.codehaus.groovy.runtime.callsite.PogoInterceptableSite.call(PogoInterceptableSite.java:51)

  at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:121)

  at bc4j.CoaRuleId.gs.run(bc4j.CoaRuleId.gs.groovy:1)

  at oracle.jbo.ExprEval.internalEvaluateGroovyScript(ExprEval.java:1471)

  at oracle.jbo.ExprEval.doEvaluate(ExprEval.java:1564)

  at oracle.jbo.ExprEval.evaluate(ExprEval.java:1271)

  at oracle.jbo.ExprEval.evaluate(ExprEval.java:1248)

  at oracle.jbo.common.VariableImpl.evaluateTransientExpression(VariableImpl.java:1738)

  at oracle.jbo.common.VariableValueManagerImpl.accessValue(VariableValueManagerImpl.java:152)

  at oracle.jbo.common.VariableManagerImpl.getValueRaw(VariableManagerImpl.java:508)

  at oracle.jbo.common.VariableValueManagerImpl.getVariableValueRaw(VariableValueManagerImpl.java:254)

  at oracle.jbo.server.ViewRowSetImpl.getWhereClauseParamsFromVars(ViewRowSetImpl.java:4762)

  at oracle.jbo.server.ViewRowSetImpl.getParameters(ViewRowSetImpl.java:6465)

  at oracle.jbo.server.ViewRowSetImpl.getRowFilter(ViewRowSetImpl.java:653)

  at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1144)

  at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1084)

  at oracle.jbo.server.ViewRowSetImpl.getRowCount(ViewRowSetImpl.java:2617)

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 27 2015
Added on Mar 3 2015
9 comments
584 views