5 Replies Latest reply: Oct 30, 2012 8:42 AM by 1644 RSS

    Mail using Procedure

    1644
      Hi All,

      I am new to ODI ,in my proces i need to send a mail,i try with odisendmail but it can not work,so now i a trying with Procedure,can any one help regarding how to write procedure using below code,i taken this code fro one of the post,but i dont know how to write procedure using this


      Host MAIL.xxx.COM
      Port <Default>:25
      SMTP Auth <Default>:Yes
      User xxx@xxx.com
      Password xxxxx
      To xxx@xxx.com
      From xxx@xxx.com
      Subject test
      LoadfromFile No
      FilePath D:\ODI_DATA_SERVER\TEST_ODI.TXT
      MessageText Test_Message
      Is HTML <Default>:Yes
      Attachments D:\ODI_DATA_SERVER\TEST_ODI.TXT
        • 1. Re: Mail using Procedure
          Bhabani Ranjan
          Try this
          http://bhabaniranjan.com/send-mail-in-odi-using-gmail-credentials/

          http://odiexperts.com/odi-parallel-2/#htmlemail

          Thanks.
          • 2. Re: Mail using Procedure
            1644
            Hi,Thanks for replay

            Where should we find the HTML mail in odi,please help me.
            • 3. Re:Jython HTML Mail  Procedure error
              1644
              Hi all ,I am using Send Jython html mail but iam getting below error any one can help regarding this

              org.apache.bsf.BSFException: exception from Jython:
              Traceback (most recent call last):
              File "<string>", line 25, in <module>
              IOError: (2, 'No such file or directory', '0')

                   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:2473)
                   at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:48)
                   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:561)
                   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:83)
                   at java.lang.Thread.run(Thread.java:662)
              Caused by: Traceback (most recent call last):
              File "<string>", line 25, in <module>
              IOError: (2, 'No such file or directory', '0')

                   at org.python.core.PyException.fillInStackTrace(PyException.java:70)
                   at java.lang.Throwable.<init>(Throwable.java:181)
                   at java.lang.Exception.<init>(Exception.java:29)
                   at java.lang.RuntimeException.<init>(RuntimeException.java:32)
                   at org.python.core.PyException.<init>(PyException.java:46)
                   at org.python.core.PyException.<init>(PyException.java:43)
                   at org.python.core.Py.IOError(Py.java:175)
                   at org.python.core.io.FileIO.<init>(FileIO.java:83)
                   at org.python.core.PyFile.file___init__(PyFile.java:157)
                   at org.python.core.PyFile$exposed___new__.createOfType(Unknown Source)
                   at org.python.core.PyOverridableNew.new_impl(PyOverridableNew.java:12)
                   at org.python.core.PyType.invoke_new_(PyType.java:432)
                   at org.python.core.PyType.type___call__(PyType.java:1397)
                   at org.python.core.PyType.__call__(PyType.java:1388)
                   at org.python.core.OpenFunction.__call__(__builtin__.java:1576)
                   at org.python.core.PyObject.__call__(PyObject.java:414)
                   at org.python.core.PyObject.__call__(PyObject.java:418)
                   at org.python.pycode._pyx34.f$0(<string>:30)
                   at org.python.pycode._pyx34.call_function(<string>)
                   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)
                   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)
                   ... 1 more

              Thnaks in Advance..

              Edited by: 1644 on Oct 30, 2012 2:38 AM
              • 4. Re:Jython HTML Mail  Procedure error
                SH
                The error seems pretty self explanatory - no such file or directory. Does the file exist in the specified location. If it does, is the agent you are using to execute this process running on the same server the file is located on?
                • 5. Re:Jython HTML Mail  Procedure error
                  1644
                  Hi,Thanks for reply,when i am not attaching any file ,that time i am getting this error,attachment is mandatory in this procedure?if i want to send only text mail using Jython HTML mail is possible or not?,Please guide to slove this issue..

                  Thanks in Advance