Jython FTP Error in ODI

Hi All,
I am using jython code to ftp to a server. When i hard code the username and password it works fine, but when i try to read the username and password from a file, it doesnt work, i get the following error:
org.apache.bsf.BSFException: exception from Jython: Traceback (innermost last):
File "<string>", line 3, in ?
File "C:\ODI\oracledi\bin\..\lib\scripting\Lib\snpsftp.py", line 51, in __init__
File "C:\ODI\oracledi\bin\..\lib\scripting\Lib\snpsftp.py", line 79, in login
File "C:\ODI\oracledi\bin\..\lib\scripting\Lib\ftplib.py", line 318, in login
File "C:\ODI\oracledi\bin\..\lib\scripting\Lib\ftplib.py", line 229, in sendcmd
File "C:\ODI\oracledi\bin\..\lib\scripting\Lib\ftplib.py", line 202, in getresp
error_perm: 530 Login Failed for User username
     at org.apache.bsf.engines.jython.JythonEngine.exec(Unknown Source)
     at com.sunopsis.dwg.codeinterpretor.k.a(k.java)
     at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java)
     at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
     at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java)
     at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
     at com.sunopsis.dwg.dbobj.SnpSessTaskSqlS.treatTaskTrt(SnpSessTaskSqlS.java)
     at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
     at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
     at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
     at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
     at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
     at com.sunopsis.dwg.cmd.e.i(e.java)
     at com.sunopsis.dwg.cmd.g.y(g.java)
     at com.sunopsis.dwg.cmd.e.run(e.java)
     at java.lang.Thread.run(Unknown Source)
Below is my source code :
import snpsftp
fsrc = open('C:\ODI\DebtorInfo_Properties2.txt', 'r')
ftp = snpsftp.SnpsFTP(fsrc.readline(),fsrc.readline(),fsrc.readline())
ftp.setmode('ASCII')
ftp.mput(fsrc.readline(), 'DEBITEUR.dat',fsrc.readline())
ftp.close()
fsrc.close()
My file structure looks like this :
100.200.3.45
username
password
C:\ODI\oracledi\demo\file
/ftpfolder/share/
I tried reading the file and writing the file to verify the data is correct and it is. If i hard code the username and password, it works fine e.g.
import snpsftp
fsrc = open('C:\ODI\DebtorInfo_Properties2.txt', 'r')
ftp = snpsftp.SnpsFTP('100.200.3.45','username','password')
ftp.mput('C:\ODI\oracledi\demo\file', 'DEBITEUR.dat','/ftpfolder/share/')
ftp.close()
fsrc.close()
Any help on this matter would be much appreciated. I have been struggling with this for the past 2 days. Im new to ODI so any help would be greatful
Thanks

One of the best ways of debugging jython code is to use the print statemnent.
I suggest that you change the code to something like:
import snpsftp
fsrc = open('C:\ODI\DebtorInfo_Properties2.txt', 'r')
ftpserver=fsrc.readline()
username=fsrc.readline()
password=fsrc.readline()
print "ftpserver '%s'" % ftpserver
print "username '%s'" % username
print "password '%s'" % password
ftp = snpsftp.SnpsFTP(ftpserver,username,password)
ftp.setmode('ASCII')
ftp.mput(fsrc.readline(), 'DEBITEUR.dat',fsrc.readline())
ftp.close()
fsrc.close()
Run it in an agent, and you will the print statements in the agent log. You may need to strip() what you read from the file.

Similar Messages

  • Error in ODI while configuring ERPi  Source system

    Hi All,
    Hyperion Version : Hyperion 11.1.2.1
    OS: windows 2008
    I'm getting the following Error in ODI while configuring ERPi Source system in workspace.
    "942 : 42000 : java.sql.SQLException: ORA-00942: table or view does not exist
    java.sql.SQLException: ORA-00942: table or view does not exist "
    can anyone guide how can achieve this. thanks in advance.
    Regards,
    Ravi

    Hi All,
    Please find the below error log from ERPi configurator [Workspace] and let me know further steps to solve this issue....
    ERPI Process Start, Process ID: 71
    ERPI Logging Level: DEBUG (5)
    ERPI Log File: C:\Windows\TEMP\2\/aif_71.log
    Jython Version: 2.1
    Java Platform: java1.4.2_08
    COMM Create Process Detail - Create Process Detail - START
    COMM Create Process Detail - Create Process Detail - END
    Error in Start PS HCM Setup Source System
    java.lang.Exception: The scenario did not end properly.
    at com.sunopsis.dwg.dbobj.SnpScen.a(SnpScen.java)
    at com.sunopsis.dwg.dbobj.SnpScen.localExecuteSync(SnpScen.java)
    at com.sunopsis.dwg.tools.StartScen.actionExecute(StartScen.java)
    at com.sunopsis.dwg.function.SnpsFunctionBaseRepositoryConnected.execute(SnpsFunctionBaseRepositoryConnected.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execIntegratedFunction(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSqlS.treatTaskTrt(SnpSessTaskSqlS.java)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
    at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand(DwgCommandScenario.java)
    at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
    at com.sunopsis.dwg.cmd.e.i(e.java)
    at com.sunopsis.dwg.cmd.h.y(h.java)
    at com.sunopsis.dwg.cmd.e.run(e.java)
    at java.lang.Thread.run(Unknown Source)
    ERPI Process End, Process ID: 71
    Thanks
    Ravi

  • Script error through ODI

    Hi,
    I am calling a Python script from odi through odi os command.
    But if an error occurs internally in the script the ODI is unable to show that error in the Opertor .It is simply showing "Odi os command returns 1".
    The error file is made at different location.
    But i need to show all the script error through odi operator.
    Is there any utility or something like that which can catch the error and shows through odi operator.
    Please reply....
    Thanks

    Is there a difference between print and raise.
    I ran the code with raise but it is showing error like:
    org.apache.bsf.BSFException: exception from Jython:
    SyntaxError: ("mismatched input 'raise' expecting INDENT", ('<string>', 4, 0, 'raise ("\\n\\n\\n Match found \\n\\n\\n")\n'))
         at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
         at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine(SnpScriptingInterpretor.java:346)
         at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.exec(SnpScriptingInterpretor.java:170)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java:2457)
         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:2906)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2609)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:537)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:453)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1740)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:338)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:214)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:272)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:263)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:822)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:123)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
         at java.lang.Thread.run(Thread.java:662)
    ------------------------------------------------------------------------------------------------------------------------------------

  • Can we assign jython variable value into ODI variable?

    Hi Team,
    We are trying to save jython variable value into ODI variable so that ODI variable can use in later steps.
    we are facing failure regards same.
    Please suggest us so that we can use ODI variable value in later steps.
    Thanks
    Ankush.

    See if this post help you :- How to assign value for a ODI variable from Jython Script
    Doc id 424579.1 on metalink should help.

  • How can get Dreamweaver to stop error message: an ftp error has occurred- cannot connect to host?

    Dreamweaver is locking me out when I try to connect to the host via ftp. I get the error message: "An ftp error has occurred - cannot make connection to host". This error message started yesterday when I used the wrong host ftp address too many times. I have since received the correct ftp address from my website host, but the system won't even let me log in...it just gives me that error message when I click the connection button on the panel. My website host recommends that I uninstall Dreamweaver and re-install it again. My concern is, if I un-install the Dreamweaver app, which I downloaded from the Cloud, will the Cloud know I've un-installed Dreamweaver and allow me to download it again? Please help.

    See my response in your most recent thread. Please don't double post like that - it can confuse things considerably when replies come in to both threads.

  • An FTP Error occured - cannot make connection to host. No response from the server

    "An FTP Error occured - cannot make connection to host. No response from the server".
    As of today this is all i get when trying to connect to every single ftp account i have. It's not the server cause it's every one and there is several different. Tried passive and non-passive same result. I've connected fine with other FTP clients. So this must be another dreamweaver bug. Anyone know what to do?

    Very hard to diagnose these problems, particularly as you can connect using a 3rd party program.
    See if the 'timeout' issue could be at play here:
    http://forums.adobe.com/message/708941#708941

  • File/FTP error

    Hi,
    Iam using a J2se file adapter for connecting to a FTP and picking the files.The following error has been shown and could't process the files-
    13:09:40 (4029): Process 1 file(s):
    13:09:40 : example.txt
    13:09:58 (4030): Start processing "BIN" file "example.txt" size 69426 in "EO mode
    13:09:58 (4032): Sending binary message "c7e7c0e2-7023-3800-88e2-2edf80d48360" type "application/xml" to Integration Engine... (message size: 69426 bytes, URL: " http://*************** "
    13:09:59 (4076): ERROR: Finished sending to Integration Engine with error "java.net.SocketException: Software caused connection abort: socket write error". Skip confirmation and quit this loop
    13:09:59 (4077): Retry  mode -  wait 7200 sec, 0 msec interval before retry
    I tried using j2ee file adapter instead, but the channel has shown the FTP error:530.
    we could login into FTP through command promt and have correct login credentials.
    There is no firewall blocking.
    does anyone have idea on this error? plz reply me ASAP.
    Thanks..

    Hi
    Check Read / write / delete permision for the folder in the FTP Server
    Paste u r Connection parameters in the FTP
    Reagrds
    Srinivas

  • FTP error: Receiver Communication Channel

    Hello Experts,
    I am getting the following FTP error in my Receiver Communication Channel.
    Error occurred while connecting to FTP server:  Peer certificate rejected by ChainVerifier
    Please suggest.
    Thanks,
    Anup

    Hi Anup,
    Problem is with FTPS and not FTP.The SSL handshake needs to confirm that the FTPS client is using the FTPS server's DNS name to access the FTP service since only the DNS name of the FTPS server is stored in the certificate signed by the trusted CA (e.g. VeriSign). it's the way the Certification Authorities works.
    If you are using any IP address then try with your host name.
    Regards,
    Madan

  • I am getting an FTP error message when publishing, it goes okay until it reaches home page.  The home page does not appear correctly.  Any help greatly appreciated

    I have a website using iweb and am having problems publishing.  When I try to publish it appears to be going through then stops at home page and I get an FTP error message.  I talked to my website host and they checked it from their end on two brosers and it is fine.  There suggestion was to contact this support group.  They thought it had something to do with iweb code writing.

    What version of iWeb are you using?  What are you using to upload the site files to your FTP server?
    I talked to my website host and they checked it from their end on two brosers and it is fine
    What did they check?  Have you tried viewing your site that's online to see if the changes went thru?  Before you do so clear your browser's cache (Command+Option+E for Safari) and then load the site.
    OT

  • Godaddy is showing that the businesscatayst has been redirected correctly but when i link to remote from dreaweaver it shows a ftp error

    dreamweaver connects to server correctly, godly is showing my business catalyst site has been redirected correctly but when i access remote from dreamweaver it says there is a ftp error. How do i resolve this

    Apologies
    Http://www.whanaucentred.com <http://www.whanaucentred.com/>
    I can access it from the web but enter the url.
    When I try to  upload from dreamsweaver it says ftp error even though:
    -Server password and other info is set correctly in dw . and dw says it has link to the server correctly
    - but When i edit site in dw and upload the changes, it says ftp error.
    -When I login to businesses catalyst site on line, i can edit it from there and link to the site from there.
    - when i log into godaddy it says domain is configured correctly.
    Sent from my iPhone

  • FTP error cannot make connection to host, ftp not working in browsers

    hi
    bear with me as im not webmaster, using dreamweaver mx and
    today i cant up load anything just keep getting ftp error occurred
    - cannont make connection to host.
    so figured to was a problem with my hosts and its all fine
    their end, ive tryed it in passive and not passive. And if i try to
    view the ftp in a browser (ie7 and firefox) not the site but
    ftp.mysite.com (im sure theres a tech name for it i dont no)
    nothing is displaying, now this is only happening on my computer
    and my isp(rang them they say its fine).
    how to i fix this is it a dreamweaver problem a browser
    problem or just some box i need to tick on my comp??
    Hope you can help, will be a life saver

    hi
    bear with me as im not webmaster, using dreamweaver mx and
    today i cant up load anything just keep getting ftp error occurred
    - cannont make connection to host.
    so figured to was a problem with my hosts and its all fine
    their end, ive tryed it in passive and not passive. And if i try to
    view the ftp in a browser (ie7 and firefox) not the site but
    ftp.mysite.com (im sure theres a tech name for it i dont no)
    nothing is displaying, now this is only happening on my computer
    and my isp(rang them they say its fine).
    how to i fix this is it a dreamweaver problem a browser
    problem or just some box i need to tick on my comp??
    Hope you can help, will be a life saver

  • Oracle error in ODI

    HI All,
    I am using ODI 11.
    I have a requirment where i need to see oracle error in ODI operator .
    Suppose the error is Format/Datatype/or etc error then it will show as the error with the error code in Operator.
    Plz let me know how to do this in ODI.
    Thanks,
    Lony

    Store the error in to java variable or odi variable.
    Then in procedure use below codes to print error into operator.
    throw new Exception("<@=java_variable@>"); or
    throw new Exception(" #odi_variable");

  • Errors in odi 11g

    hi friends.
    what are the errors in odi 11g and how to handle these errors??
    please refer some site for it.
    thanks.

    HI Soumya,
    please refer below link:
    http://docs.oracle.com/cd/E17904_01/core.1111/e10113/chapter_odi_messages.htm
    Regards,
    Surya

  • How do i fix this: error message- index.html - error occurred - An FTP error occurred - cannot put index.html. Access denied. The file may not exist, or there could be a permission problem. Make sure you have proper authorization on the server and the ser

    that is...
    index.html - error occurred - An FTP error occurred - cannot put index.html. Access denied. The file may not exist, or there could be a permission problem. Make sure you have proper authorization on the server and the server is properly configured.
    File activity incomplete. 1 file(s) or folder(s) were not completed.
    Files with errors: 1
    index.html
    thanks!

    It's under More Options triangle in the Manage Sites panel.  See screenshot:
    Nancy O.

  • FTP Error - Mac, DW_CS6

    Due to upgrading my MAC from S.Leopard to M.Lion I've lost the use of DWmx04, a programme I have used for a long time, so thought instead of going through the stress of reinstalling S.Leopard I would embrace the change. So have downloaded the trial version of DWcs6, all going well until testing the FTP. Got all the necessary FTP details for my site, but I get the message 'An FTP error occurred - cannot make connection to host. The remote host cannot be found.' I might of had a similiar problem when originally started with mx04 but can't remember how I solved it. I understand that there are many perameters, any advice would be helpful.
    This might be a long shot but until very recently I was using MX04 successfully, is there anyway of transfering mysite  FTP details from there?
    I've checked previous posts but haven't found a definitive answer.

    mx04 was working on the same machine (mac pro) until the upgrade (1month ago). Due to it being a Power PC program it refuses to load, but all the databases are still on my system, will have a look at your link.
    I successfully loaded mysite files into DWcs6 but it would be good if I could access my previous DW04 FTP settings, to see where and if I have made a mistake.
    Thought it would be an easier way than just constantly changing and testing individual FTP settings.
    Thanks

Maybe you are looking for

  • Why can't I use my icloud feature?

    I cannot use my icloud feature?  It says I need to verify my email/password, but I've check my email and it tells me it's been verified.  Am I missing something?  I've been trying to use it for 3 days

  • Windows Server 2012 and win 8 app on terminal server

    On a windows 2012 server, is it possible to install a windows 8 app that can be accessed (via terminal services/remote desktop) by client computers running prior version of Windows, such as 7, Vista and maybe XP? (Obviously without the touch capabili

  • Extreme, express, airtunes & no airport card?

    I have a new Mac Pro on the way without an airport card. It will be connected to an Airport Extreme. My stereo is connected to an Airport Express for airtunes, currently via my G4 (with an airport card). Is it possible to connect to the Express via t

  • EP integration with third party BI tools

    Hi, I was looking for information and pointers on EP integration with third party BI tools like Business Objects etc.  Would be grateful. Thanks, Madhu

  • VLC audio problems on T400 - DPC Latency Issue?

    Hi Folks, When I try to use VLC player to play any video on my T400, I get audio stutters and other strange effects.  I'm wondering if it might have to do with all the audio DPC Latency issues this model has had.  Does anyone else have these issues?