Hi all,
ODI 12.1.3 on Windows Server 2012 R2
Can anyone tell me why this works when run as local (no agent) but fails when run on the agent?
I have this in a bigger ODI procedure to do some logging tasks. I have tested as local but when I then try to run it on my agent (agent is on the same server as the db) it fails with the error:
ODI-1226: Step Prc_CutDownConnectionForTesting fails after 1 attempt(s).
ODI-1232: Procedure Prc_CutDownConnectionForTesting execution fails.
ODI-1590: The execution of the script failed.
Caused By: org.apache.bsf.BSFException: exception from Groovy: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Make_connection: 20: unexpected token: select 1 from dual @ line 20, column 25.
parLogId = con.rows "select 1 from dual"
^
1 error
The code can just be dropped into a proc if anyone is kind enough to confirm it for me.
import groovy.sql.Sql
import oracle.odi.core.OdiInstance
import oracle.odi.core.config.OdiInstanceConfig
import oracle.odi.core.config.MasterRepositoryDbInfo
import oracle.odi.core.config.WorkRepositoryDbInfo
import oracle.odi.core.security.Authentication
import oracle.odi.core.config.PoolingAttributes
import oracle.odi.domain.runtime.session.finder.IOdiSessionFinder
import oracle.odi.domain.runtime.session.OdiSession
import java.util.Collection
import java.io.*
def ds = odiRef.getJDBCConnectionFromLSchema("ORCL_SCHEMA") // CHANGE TO A LOGICAL ORACLE SCHEMA IN YOUR REPO
def con = new Sql(ds)
//Parent Insert
parLogId = con.rows "select 1 from dual"
assert parLogId.size() == 1
con.close()
(Ignore the imports - this is a cutdown)
Thanks
D.