Posted by : Arjun Lagisetty Saturday, February 1, 2014


This exception is specific to windows. It should file perfectly in a UNIX system (I did not test it) .
ODI introduced log for a row by row incremental update KM. This is very exciting as it would help keep track all the rows which miss during update.
To understand this blog post we have to understand the concept of path separators, typically we use backslash as a path separator in windows i.e. when we are referring to a file we use '\' to specify the path to the file from root directory.


IKM in question fetches the path and the separator from the Java properties the default value is 
 <default>:<?= java.lang.System.getProperty("user.home")?><?=java.lang.System.getProperty("file.separator") ?>ikm_rowbyrow.log
Please see the screenshot below.
 

This default value gets translated to the path  C:\Users\xxxxx\ikm_rowbyrow.log




This value causes the following error in interface execution:

org.apache.bsf.BSFException: exception from Groovy: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Insert_flow_into_I$_table: 6: unexpected char: '\' @ line 6, column 18.
   logFileName = 'C:\Users\xxxxx\ikm_rowbyrow.log'
                    ^

1 error

    at org.codehaus.groovy.bsf.GroovyEngine.exec(GroovyEngine.java:110)
    at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine(SnpScriptingInterpretor.java:322)
    at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.exec(SnpScriptingInterpretor.java:170)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java:2472)
    at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:47)
    at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:1)
    at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:577)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:468)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:376)
    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:309)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:301)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:865)
    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:137)
    at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
    at java.lang.Thread.run(Thread.java:662)
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Insert_flow_into_I$_table: 6: unexpected char: '\' @ line 6, column 18.
   logFileName = 'C:\Users\lagiseta\ikm_rowbyrow.log'
                    ^

1 error

    at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:296)
    at org.codehaus.groovy.control.ErrorCollector.addFatalError(ErrorCollector.java:143)
    at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:113)
    at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:125)
    at org.codehaus.groovy.control.SourceUnit.addError(SourceUnit.java:353)
    at org.codehaus.groovy.antlr.AntlrParserPlugin.transformCSTIntoAST(AntlrParserPlugin.java:100)
    at org.codehaus.groovy.antlr.AntlrParserPlugin.parseCST(AntlrParserPlugin.java:72)
    at org.codehaus.groovy.control.SourceUnit.parse(SourceUnit.java:249)
    at org.codehaus.groovy.control.CompilationUnit$1.call(CompilationUnit.java:158)
    at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:814)
    at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:511)
    at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:487)
    at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:464)
    at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
    at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:279)
    at groovy.lang.GroovyShell.parseClass(GroovyShell.java:727)
    at groovy.lang.GroovyShell.parse(GroovyShell.java:739)
    at groovy.lang.GroovyShell.evaluate(GroovyShell.java:574)
    at groovy.lang.GroovyShell.evaluate(GroovyShell.java:614)
    at groovy.lang.GroovyShell.evaluate(GroovyShell.java:595)
    at org.codehaus.groovy.bsf.GroovyEngine.exec(GroovyEngine.java:108)
    ... 19 more


It seems like there is a problem with Groovy and it does not seems to accept "\" as the file seperator.

Changing the file separator to "/" (forward slash seems to work)
Interface options have to changed as shown below: In the following example I specified absolute path in the interface options for convenience but its recommended to use a variable value to specify the log path.

 





Leave a Reply

Subscribe to Posts | Subscribe to Comments

Popular Post

Labels

Blog Archive

Copyright © ODI Pundits - Oracle Data Integrator - Maintained by Arjun Lagisetty