ODIExperts.com

The blog for Oracle Data Integrator ( ODI )

Jython Scripts fails to recognize the module during scenario run in ODI 11g

Hi Friends!

2011… we are back! πŸ˜‰

During a recent Oracle forum question i was looking at an interesting question where the user said the ODI Scenarios throws the error ‘ No module names re ‘ . Initially i thought might be the user is making some mistake but then he also wrote ‘the codes are working perfectly in the Designer’. Strange .

I thought let me do a faster run in ODI 11g and check if that is really the case and I wrote a small Jython procedure based on ‘re’ module and ran via designer no issue. Now i made the scenario and ran via startscen . Hmm same error as the user reported.

I thought ok it looks like some issue with odiparams and initial scan made me realize that path is taking <WEBLOGIC_HOME>Oracle_ODI1oraclediagent as ODI_HOME and its reading directories in it namely lib,drivers and bin . I drilled and started looking for other such path and found that <WEBLOGIC_HOME>Oracle_ODI1oracledi.sdklib had the Jython.jar and folder Lib had required Jython module , which gave me the hint that becuase of odiparams the startscen is reading from the agent directory and there is no Jython modules present so i copied the folder to under lib/Lib with all the modules and re ran the scenarios and it worked. πŸ™‚

Although i thought of changing the path of odiparams but then it might cause other links broken so copying the Lib folder from Oracle_ODI1oracledi.sdklib to Oracle_ODI1oraclediagentlib is the easiest solution.

Thank you for following ODIExperts.com

7 Comments

  1. Hi,

    I am facing the below error while running an interface in ODI. Can anyone help me out plz..
    I even tried invoking the essbase client separately which works, I have checked the environment variables, those are also fine.

    Session Failed :720080 : ODI-1217: Session INT007_AR_IBRO (720080) fails with return code 7000.
    ODI-1226: Step INT007_EXTRACT_ALIAS_CS1 fails after 1 attempt(s).
    ODI-1240: Flow INT007_EXTRACT_ALIAS_CS1 fails while performing a Integration operation. This flow loads target table VIP_FL_FLData.
    Caused By: org.apache.bsf.BSFException: exception from Jython:
    Traceback (most recent call last):
    File “”, line 87, in
    at com.hyperion.odi.essbase.ODIEssbaseConnection.executeMaxl(Unknown Source)
    at com.hyperion.odi.essbase.AbstractEssbaseWriter.beginLoad(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)

    com.hyperion.odi.essbase.ODIEssbaseException: com.hyperion.odi.essbase.ODIEssbaseException: Cannot run program “essmsh”: CreateProcess error=2, The system cannot find the file specified

    at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
    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:2128)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1930)
    at oracle.odi.runtime.agent.processor.impl.StartScenRequestProcessor$2.doAction(StartScenRequestProcessor.java:580)
    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
    at oracle.odi.runtime.agent.processor.impl.StartScenRequestProcessor.doProcessStartScenTask(StartScenRequestProcessor.java:513)
    at oracle.odi.runtime.agent.processor.impl.StartScenRequestProcessor$StartScenTask.doExecute(StartScenRequestProcessor.java:1073)
    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
    at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$1.run(DefaultAgentTaskExecutor.java:49)
    at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
    at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor.executeAgentTask(DefaultAgentTaskExecutor.java:41)
    at oracle.odi.runtime.agent.processor.TaskExecutorAgentRequestProcessor.doExecuteAgentTask(TaskExecutorAgentRequestProcessor.java:92)
    at oracle.odi.runtime.agent.processor.TaskExecutorAgentRequestProcessor.process(TaskExecutorAgentRequestProcessor.java:83)
    at oracle.odi.runtime.agent.support.DefaultRuntimeAgent.execute(DefaultRuntimeAgent.java:68)
    at oracle.odi.runtime.agent.servlet.AgentServlet.processRequest(AgentServlet.java:562)
    at oracle.odi.runtime.agent.servlet.AgentServlet.doPost(AgentServlet.java:516)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:389)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
    at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:879)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
    at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
    Caused by: Traceback (most recent call last):
    File “”, line 87, in
    at com.hyperion.odi.essbase.ODIEssbaseConnection.executeMaxl(Unknown Source)
    at com.hyperion.odi.essbase.AbstractEssbaseWriter.beginLoad(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)

    com.hyperion.odi.essbase.ODIEssbaseException: com.hyperion.odi.essbase.ODIEssbaseException: Cannot run program “essmsh”: CreateProcess error=2, The system cannot find the file specified

    at org.python.core.PyException.fillInStackTrace(PyException.java:70)
    at java.lang.Throwable.(Throwable.java:181)
    at java.lang.Exception.(Exception.java:29)
    at java.lang.RuntimeException.(RuntimeException.java:32)
    at org.python.core.PyException.(PyException.java:46)
    at org.python.core.PyException.(PyException.java:43)
    at org.python.core.Py.JavaError(Py.java:455)
    at org.python.core.Py.JavaError(Py.java:448)
    at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:177)
    at org.python.core.PyObject.__call__(PyObject.java:355)
    at org.python.core.PyMethod.__call__(PyMethod.java:215)
    at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:221)
    at org.python.core.PyMethod.__call__(PyMethod.java:206)
    at org.python.core.PyObject.__call__(PyObject.java:397)
    at org.python.core.PyObject.__call__(PyObject.java:401)
    at org.python.pycode._pyx72.f$0(:87)
    at org.python.pycode._pyx72.call_function()
    at org.python.core.PyTableCode.call(PyTableCode.java:165)
    at org.python.core.PyCode.call(PyCode.java:18)
    at org.python.core.Py.runCode(Py.java:1204)
    at org.python.core.Py.exec(Py.java:1248)
    at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:172)
    at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:144)
    … 42 more
    Caused by: com.hyperion.odi.essbase.ODIEssbaseException: Cannot run program “essmsh”: CreateProcess error=2, The system cannot find the file specified
    at com.hyperion.odi.essbase.ODIEssbaseConnection.executeMaxl(Unknown Source)
    at com.hyperion.odi.essbase.AbstractEssbaseWriter.beginLoad(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:175)
    … 56 more
    Caused by: com.essbase.api.base.EssException: Cannot run program “essmsh”: CreateProcess error=2, The system cannot find the file specified
    at com.hyperion.odi.essbase.wrapper.EssbaseConnection.executeMaxl(Unknown Source)
    … 62 more

  2. Hi,
    How do I find out the location where the weblogic server (j2ee agent) looks for the jar files?
    Jython code fails with error : Caused By: org.apache.bsf.BSFException: exception from Jython:
    Traceback (most recent call last):
    File “”, line 1, in
    ImportError: No module named ls

  3. Hi,
    I am trying to write xls file using procedure in ODI but it fails with error –
    org.apache.bsf.BSFException: exception from Jython:
    Traceback (most recent call last):
    File “”, line 5, in
    ImportError: No module named xlsxwriter

    Jython code in procedure –

    import string
    import java.sql as sql
    import java.lang as lang
    import re
    import xlsxwriter
    import time
    from java.sql import DriverManager
    count = 0
    row = 0
    column = 0
    sourceConnection = DriverManager.getConnection(“jdbc:oracle:thin:@xxxx:xxxx:xxxxx”,”xxxxx”,”xxxxxx”)
    sqlstring = sourceConnection.createStatement()
    localtime = time.asctime( time.localtime(time.time()) )
    sqlstmt=”select distinct session_no from xxxxxx where session_no=47004005 and interface_id=15″
    result=sqlstring.executeQuery(sqlstmt)
    while (result.next()):
    count=result.getInt(“session_no”)
    if count == 47004005 :
    workbook = xlsxwriter.Workbook(‘C:\temp\ErrorReport.xlsx’)
    worksheet = workbook.add_worksheet()
    worksheet.write(‘A1’, ‘/*————————————————————————————————————————————————*/’,bold)
    worksheet.write(‘A2′,’ Execution Report for scenario : xlsxreport’,bold)
    worksheet.write(‘A3′,’/*————————————————————————————————————————————————*/’,bold)
    worksheet.write(‘A4′,’Key_Value’,bold)
    worksheet.write(‘B4′,’Key_Value1’,bold)
    worksheet.write(‘C4′,’Key_Value2’,bold)
    worksheet.write(‘D4′,’ERR MESSG’,bold)
    worksheet.write(‘E4′,’INTERFCE NAME’,bold)
    worksheet.write(‘F4′,’INTERFACE ID’,bold)
    worksheet.write(‘G4′,’SESSION NO’,bold)

    sqlstmt=”select INTERFACE_ID, \
    INTERFACE_NAME, \
    ERR_MESS, \
    CREATE_DATE, \
    SESSION_NO, \
    CONS_NAME, \
    KEY_VALUE,\
    KEY_VALUE1, \
    KEY_VALUE2, \
    KEY_VALUE3 \
    from xxxxxxx where session_no=47004005 and interface_id=15 \
    order by session_no”

    result=sqlstring.executeQuery(sqlstmt)
    while (result.next()):
    interfaceid=result.getString(“INTERFACE_ID”)
    interfacename=result.getString(“INTERFACE_NAME”)
    errmesg=result.getString(“ERR_MESS”)
    createdate=result.getString(“CREATE_DATE”)
    sessionno=result.getString(“SESSION_NO”)
    keyvalue=result.getString(“KEY_VALUE”)
    keyvalue1=result.getString(“KEY_VALUE1”)
    keyvalue2=result.getString(“KEY_VALUE2”)

    workbook.close()
    sourceConnection.close()

    Any pointers why could this be failing? Is xlsx supported with Jython and ODI?

  4. Hello when we use a dedicated scenario which call another scenario it works uneder standard agent but no with a JEE agent.
    In this scenario we have a jython procedure with specific jar classes.
    The error is the following :
    ODI-1217: Echec de la session RUNUBE + GET PDF (7249002) avec le code retour 7000.
    ODI-1226: Echec de l’Γ©tape R0010P_XJDE0001_avec_modif_OP_Recup_PDF aprΓ¨s 1 tentative(s).
    ODI-1232: Echec de l’exΓ©cution de la procΓ©dure R0010P_XJDE0001_avec_modif_OP_Recup_PDF.
    Caused By: org.apache.bsf.BSFException: exception from Jython:
    Traceback (most recent call last):
    File “”, line 2, in
    ImportError: No module named jdedwards

    at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
    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:558)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
    at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: Traceback (most recent call last):
    File “”, line 2, in
    ImportError: No module named jdedwards

    My jar jdeedwards is under C:\Oracle\Middleware\Oracle_ODI1\oracledi\agent\lib
    Thanks a lot.

    • You need to find out where the jar file is exactly please check with the if the weblogic is reading the exact path or not.

  5. Hi ,

    Sorry to Comment on the wrong post.
    It would be very helpful if anyone can help me out with the below request.

    Does ODI 11g supports IDOC for SAP integration via Oracle Open Connector.?

    Regards,
    Chary

Leave a Reply

Required fields are marked *.