javax.script.ScriptException: value XYZ is not a member of Object in my dynamic script

Hello!

I use scala as dynamic language (JSR-223) in some java application (Oracle sqlcl).
But unfortunately, objects from application NOT published to script.

For example: sqlcl published object “ctx”. When I try use this object, error appear:
_javax.script.ScriptException: value write is not a member of Object in _
ctx.write(“Hello World”)

The same work fine in Jython:
def hello(v_pStr)
** return (v_pStr + " World!\n");**

ctx.write(hello(“Hello”));

How Scala can reference to object in application, if scala use as dynamic script in java application?

Thanx!

Best Regards
Igor Melnikov