That means that the smtplib module is not in the Jython search path for modules for your 'windows agent' for one reason or another.
You could troubleshoot by importing the sys module and then check the contents of the current search path contained in sys.path when running with local agent. That would let you see which locations are in the search path and find out where smtplib.py lives. You could then add the location to the search path of Jython with sys.append("/path/to/module") or possibly place an existing copy of this module into the current search path.
FYI - I find smtplib in oracledi/client/jdev/extensions/oracle.odi.navigator/scripting/Lib/smtplib.py & oracledi.sdk/lib/Lib/smtplib.py
I Tried both paths you said but unfortunaly it didn't work.
Could you please guide me on how to do this: "You could troubleshoot by importing the sys module and then check the contents of the current search path contained in sys.path when running with local agent. That would let you see which locations are in the search path and find out where smtplib.py lives." i have no idea how to do it.
Thanks in advance,
Please check below points, hope this may helps you
1.Please check the ODI Agent in Topology Manager to determine on which host it is running then proceed to its installation folder and verify that Jython is included with the Agent installation folders: ◦In oracledi\bin - jython.sh
--> In oracledi\lib\scripting - jython.jar, cachedir, and lib
--> In oracle\lib\scripting\lib - numerous jython .py files
2.Also give Unix user account full permissions to every file and folder in the Agent installation and the java installation.
3.Restart the Agent.
4.Test the Agent in Topology Manager (ensure that the hostname is correct). If the test is successful, retest the Package/Scenario.
I mean that to find the current search path you could use something like this to list out the current search path entries to C:\temp\tempSearchPath.txt when running with the local agent and then compare with the other agent:
import sys searchPath = sys.path o = open(r"C:\temp\tempSearchPath.txt", "w") if len(searchPath) == 0: o.write("Nothing in the search path") else: for f in searchPath: o.write(f + "\n") o.flush() o.close()
You would then either need to make sure that the smptplib.py module is available in one of the locations that are written out to file for the non-working agent or you could add the current location of the module to the search path by adding something like this to your current script if you have the module in C:\smtplib:
import sys sys.append('C:\smtplib') import smtplib
Unfortunately I couldn't find the paths that you said in the server.
what concerns me is that when I execute the package directly on the server that have the odi istalled, using the local agent, it works fine.
But when I try to execute using the windows agent (it is running in the same server) returns that error.
Any idea ?
Thanks in advance
Hi Agostinho ,
Could find any solution to this issue . we are also having similar issue .
We need to include certain jar files
when I placed the ODI files in following directory
But the agent was not working .
When I removed the jar files the agent ran successfully .
I placed the file in below folder and tried running local agent but no luck
It is throwing following error
ODI-1590: The execution of the script failed.
Caused By: org.apache.bsf.BSFException: BeanShell script error: Sourced file: inline evaluation of: ``import oracle.odi.km.exception.OdiKmException; // ToDo: Enter the Java packages . . . '' : Typed variable declaration : Class: MasterController