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


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");**


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


Best Regards
Igor Melnikov