My Oracle Support Banner

"Undefined argument" Error when Using Java BeanShell in ODI 12.2.1.4.0 (Doc ID 2664201.1)

Last updated on JANUARY 25, 2021

Applies to:

Oracle Data Integrator - Version 12.2.1.4.0 to 12.2.1.4.200618 [Release 12c]
Information in this document applies to any platform.

Symptoms

When trying to assign a value to an Oracle Data Integrator (ODI) variable using Java BeanShell or printing a Java BeanShell string outside its declaration, the following error occurs:

oracle.odi.runtime.agent.exception.ExecutionEngineException: com.sunopsis.tools.core.exception.SnpsSimpleMessageException: ODI-17517: Error during task interpretation.
com.sunopsis.tools.core.exception.SnpsSimpleNLSMessageException: ODI-17810: Error during BeanShell evaluation: BeanShell script error: Sourced file: inline evaluation of: ``out.print(javaresult) ; ;'' : Undefined argument: javaresult : at Line: 1 : in file: inline evaluation of: ``out.print(javaresult) ; ;'' : ( javaresult )
BSF info: null at line: 0 column: columnNo, Pre-execution code:
out.print(javaresult) ;
at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.transform(SnpCodeInterpretor.java:550)
at oracle.odi.runtime.agent.execution.interpreter.SessionTaskCodeInterpreter.codeInterpretation(SessionTaskCodeInterpreter.java:186)
at oracle.odi.runtime.agent.execution.SessionTask.codeInterpretation(SessionTask.java:465)
at oracle.odi.runtime.agent.execution.cmd.TextCommand.doCodeInterpretation(TextCommand.java:126)
at oracle.odi.runtime.agent.execution.cmd.TextCommand.getTextCommandToExecute(TextCommand.java:181)
at oracle.odi.runtime.agent.execution.var.AssignVariableExecutor.execute(AssignVariableExecutor.java:72)
.........
Caused by: org.apache.bsf.BSFException: BeanShell script error: Sourced file: inline evaluation of: ``out.print(javaresult) ; ;'' : Undefined argument: javaresult : at Line: 1 : in file: inline evaluation of: ``out.print(javaresult) ; ;'' : ( javaresult )
BSF info: null at line: 0 column: columnNo
at bsh.util.BeanShellBSFEngine.eval(BeanShellBSFEngine.java:201)
at bsh.util.BeanShellBSFEngine.exec(BeanShellBSFEngine.java:209)
at com.sunopsis.dwg.codeinterpretor.SnpCodeInterpretor.transform(SnpCodeInterpretor.java:546)
... 22 more

Steps to reproduce the issue:

  1. Create an ODI variable
  2. Create an ODI procedure with a Java BeanShell step with code:
    <@ String javaresult="Hello world"; @>
  3. Add the procedure and variable into a package
  4. Set Variable value to:
    <@=javaresult@>
  5. Package execution results in error message: "Undefined argument: javaresult"

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.