Error in Jython code

Dear All,
I am facing on issue in my jython procedure;
Getting following error;
Message:
org.apache.bsf.BSFException: exception from Jython:
Traceback (most recent call last):
File "<string>", line 10, in <module>
IOError: (2, 'No such file or directory', '/oracle/app/OracleDataLZ/CCO/CIS/CA_TO_CRMoD/Staging/LEADS-HD4 -I.chk')
Code:
import string
import java.sql as sql
import java.lang as lang
source_file_name = "#GLOBAL.GV_FILE_SERVER_LOCATION"+"/Staging/"+"#NL_TO_CRMOD.LV_ODL_CSV_FILENAME"
#raise source_file_name
source_file_name=source_file_name[:-4]+".chk"
#raise source_file_name
source_file = open(source_file_name, 'r')
number_of_jobs=int(source_file.readline())
sourceConnection = odiRef.getJDBCConnection("SRC")
sqlstring = sourceConnection.createStatement()
curr_line=source_file.readline()
for x in range(number_of_jobs):
     curr_line=source_file.readline()
     odl_job_id=curr_line[0:string.find(curr_line,",")]
     chunk_file=curr_line[string.find(curr_line,",")+1:string.find(curr_line,".csv,")+4]
     if (odl_job_id == '' or len(odl_job_id)==0):
          odl_job_id="NOT_EXECUTED"
     sqlstmt ="INSERT INTO CZ_NAB_CRMOD_ODL_JOBS_GT (SESSION_NUM,CHUNK_FILE_NAME,ODL_JOB_ID,OBJ_TYPE,STATUS) VALUES ('" + str(#NL_TO_CRMOD.LV_CURRENT_EXECUTION_SESSION_NUMBER) + "','" + chunk_file + "','" + odl_job_id + "','"+"#NL_TO_CRMOD.LV_ODL_OPERATION"+"','Unchecked')"
     #raise sqlstmt
     result=sqlstring.executeUpdate(sqlstmt)
source_file.close()
Please help me to resolve this issue;
Thanks and Regards
san

The IOError indicates that file "/oracle/app/OracleDataLZ/CCO/CIS/CA_TO_CRMoD/Staging/LEADS-HD4 -I.chk" does not exist. Please check if it exists or is it visible to ODI agent (file access permissions).

Similar Messages

  • ODI Var not being substituted in Jython code

    Hi all,
    I have an option VAR in a interface which value is a variable #A_VAR1
    Within a KM, the jython code has the line
    x = r"<%s=snpRef.getOption("VAR")%>"
    My Interface is raising an error. I can see in Operator .... x=r"#PROJECT.A_VAR1"
    If I put in the option the explicit value is working fine.
    How can we get the var value from Jython?
    Thanks

    Hi,
    Have a look at the below thread,
    Re: ODI 11g | Passing ODI variable value to procedure option
    Thanks,
    Guru

  • Using jython code in ODI

    Hi,
    I have made one simple jython code in odi procedure which will read the script file from one location and if there is some error in the script then that error will be displayed in the odi operator.
    This work has been done in place of using ODI os command which can call the script from a particular location but cannot revert back with the error in ODI operator.It only shows odi os command return 1.
    here is the code:
    Step 1 in odi procedure--
    import os
    from subprocess import Popen
    from subprocess import PIPE
    ScriptFile = '<%=odiRef.getOption("ScriptFile")%>'.strip()
    if (ScriptFile == "") or (os.path.isfile(ScriptFile) == 0):
    raise IOError("The script file " + ScriptFile + " does not exist.")
    Step 2:
    args = [ScriptFile]
    #raise IOError(args)
    process = Popen(args, stdout=PIPE, stderr=PIPE)
    output, oerr = process.communicate()
    if (process.returncode != 0):
    stdOutString = str(output)
    stdErrorString = str(oerr)
    raise IOError([stdOutString,stdErrorString])
    else:
    pass
    Here the ScriptFile is the option set in procedure where i am passing the script file location.

    Yes it was done through that.
    One more question is to how we can pass the parameters to this script ?
    I need to pass some parameters which will be internally used in the script.

  • Mix jython code with sql

    Hi,
    I have just read the following sentence in the odi jyhon reference:
    "Oracle Data Integrator users may write procedures or knowledge modules using Jython, and may mix Jython code with SQL, PL/SQL, OS Calls, etc."
    Does anyone of you know how jython can be mixed with SQL in a knowledge module? I just know how to embed java code with the <% %> tag. But how about jython (e.g. when used in a knowledge module task with technology = "Oracle"?
    I appreciate your help.
    best regards,
    Hans

    So Firstly I have never done this in KM but it works well in Procedure so I think it would work in a KM but I'm not sure.
    So I will show you an exemple which will be easyer than lot of explanation.
    This exemple is a step of a procedure which is supposed to send an email if there is an error in an execution.
    This Step retrieve informations about the execution as the error message or the execution context...
    In the Target Command :
    Technology= Jython
    I have :
    EmailBody = EmailBody + r'''<TR><TD><CENTER>#NO</CENTER></TD><TD>#SESS_NAME</TD><TD>#STEP_NAME
    </TD><TD>#CONTEXT</TD><TD>#DEBUT</TD><TD>#MSG</TD></TR>'''
    Contexte = '#CONTEXT'.
    --> the #variable are the informations that I will extract in the source.
    In the Source Command :
    Technology = Oracle .
    SELECT L.SESS_NO || ' / ' || L.NNO "NO", STEP_NAME, SESS_NAME, SS.CONTEXT_CODE "CONTEXT", L.STEP_BEG "DEBUT", X.TXT "MSG", L.step_rc "RC"
    FROM <%=snpRef.getObjectName("L", "SNP_STEP_LOG", "D")%> L,
    <%=snpRef.getObjectName("L", "SNP_SESS_STEP", "D")%> SS,
    <%=snpRef.getObjectName("L", "SNP_SESSION", "D")%> S,
    <%=snpRef.getObjectName("L", "SNP_EXP_TXT", "D")%> X
    WHERE L.SESS_NO = <%=snpRef.getSession("SESS_NO")%> AND
    L.SESS_NO = SS.SESS_NO AND L.NNO = SS.NNO AND S.SESS_NO = L.SESS_NO AND
    STEP_STATUS = 'E' and L.I_TXT_STEP_MESS=X.I_TXT and X.TXT_ORD=0
    And with this the Jython keep the information of the Query...
    So I would like to apologize cause in my last post I have inversed the Target and the Source... Sorry. Hope that your problem didn't come from here...
    Evidently you will have SQL as Source and Jython as Target...

  • Error in Tax code while creating a PO in T.code ME21n

    Hi,
    I am trying to create purchase Order, I am getting an error when while entering this
    Tax Code : v1
    Jurisdict. Code: RS14902
    The error is "Tax code v1 in procedure TAXBRJ is Invalid"
    How to rectify this error. Or
    What can be other way of entering the tax code and jurisdict code

    Hi,
    Go to the Table T007A, where you find the tax codes.
    Input & out put taxes are the tax types.
    In FTXP T.code give the tax code and  click on the
    Input tax codes are used for purchase cycle and out put taxes are for sales cycle. I Hope you have given the sales related tax code. Thats why system is giving the error message.
       In T007 Table give the proper input and get the details.
    Regards,

  • Error while generating code in brf+ function

    Hi all,
    i am getting error while generating code in function in bRF+
    am using weight fields ..if i dont use quantity fields am able to generate code .
    please help.
    Thanks.

    Can you provide more details? What exactly is the error?
    I think we have provided a note for the issue. With the details it should be possible to identify the note number.

  • I have a an iMac 27" and am trying to import some videos of a friends wedding into iMovie however one of the movies won't import. It doesn't say why or give any error message or codes. All of the other movies on the card download with out a problem.

    I have an iMac 27" and am trying to import some videos of a friends wedding into iMovie however one of the movies won't import. It doesn't say why or give any error message or codes.
    All of the other movies on the card download with out a problem. The movie in question is not 'corrupt' as you can watch it in iMovie direct from the SD card but as soon as you try to import it, it  just says 'error'. iIve tried moving the file to an external drive ( and other variations on this theme) then importing but have had no luck.
    Can anyone please help me.

    The mystery remains....
    Thanks for the pointers. The file type is .mts (a proprietry sony one).
    I have now found some video converter software (Wondershare and iSkysoft) at a cost. Either will convert this file for me into .mp4. This I can then import into iMovie without any problems. I've checked this on the trial versions and it worked well but without paying am left with a giant watermark in the video
    The mystery (which I still havent solved) is why did 20 other .mts files import fine and then this one not?
    If you could point me in the direction of some free .mts converter software that would be the cherry on the cake.
    Thanks

  • Adobe Print Form Error - Invalid Response Code: (401) Unauthorized

    Hi, I've just configured ADS on Netweaver 2004s. I've run through the config guide and everything works ok including the form generation test report FP_TEST_00 which outputs PDF without issue. I have two problems:
    -When I run a "test connection" on the RFC destination 'ADS' using the ADSUSER for the login details, I get a 403 not authorized error. Changing this user to J2EE_ADMIN resolves the issue and I get a 302 redirect. I've tried adding other permissions to the ADSUSER without any luck.
    -Running a report on the Portal under e.g. Executive Reporting and attempting to just right-click and hit "Print Version" results in a 401 error for request "http://hostXX:portXX/AdobeDocumentServices/Config?style=document" exactly as per this thread: Re: Adobe Form Creation Error - Invalid Response Code: (401) Unauthorized. However, I've double-checked all user details in Visual Administrator (ADS_AGENT) and on the ABAP stack side in su01 and sm59. I also tried changing the users to dialog with no effect. If I go directly to that URL and log in with ADSUSER I get a 403 not authorised error (using J2EE_ADMIN is again successful). I've noticed that in the http access log the HTTP protocol used is 1.1 when using the web browser and 1.0 when using the sm59 connection test. I've heard of problems with using HTTP/1.1, but when I change the options on IE8 to use HTTP/1.0, it changes for all other requests except the request for "http://hostXX:portXX/AdobeDocumentServices/Config?style=document", which is still submitted as HTTP/1.1. Conversely, in sm59 if I specify that it should use HTTP/1.1 under Special Options, I can see from the access log that it is in fact still using HTTP/1.0. Could this be related to the 401 error code that I'm seeing?
    Any help would be appreciated. Thanks,
    John

    I think I've ruled out the HTTP protocol version as being an issue here. However I may have found more useful information on the actual issue.
    In the security log under usr\sap\<SID>\DVEBMGS00\j2ee\cluster\server0\log\system I see a different message for the unsuccessful report PDF generation attempt to that of a direct query to the same URL with the same web browser, as below. The unsuccessful attempt appears to forget the ADSUSER credentials and resort to the default J2EE_GUEST which has no authorisations and therefore fails. The direct query doesn't lose the ADSUSER credentials and I think this is because it prompts for the user/password when needed. Does anyone know why this happens for a direct query to this URL but not for the PDF generation attempt?
    Resulting logs from unsuccessful PDF generation attempt:
    #1.5 #005056AF1EB300750000002D0000142000048B4D2208F055#1279063306899#/System/Security/WS/SecurityProtocol#sap.com/irj#com.sap.security.core.client.ws.AuthenticationContext.setDestination#AICL0001#622##<host>_<sid>_3576650#AICL0001#4c1a62608ed511dfbe2a005056af1eb3#SAPEngine_Application_Thread[impl:3]_5##0#0#Info#1#com.sap.security.core.client.ws.AuthenticationContext#Java###An destination was set with the following properties:
    {0}.#1#{PROXY_ENABLED=false, CLIENT_AUTHENTICATION_KEYSTORE_VIEW=, SAP_SID=, SLD_URL=, USERNAME=ADSUSER, SLD_WS_NAME=, URL=http://<host>:50000/AdobeDocumentServices/Config?style=document, PROXY_URL=, SSL_SERVER_AUTHENTICATION=IGNORE, SLD_WS_SYSTEM_NAME=, PASSWORD=XXX, SLD_WS_PORT=, SAP_CLIENT=, DEFAULT_URL=http://localhost:50000/AdobeDocumentServices/Config?style=document, Authentication=BASIC, CLIENT_AUTHENTICATION_KEYSTORE_CERTIFICATE=, URL_CHOICE=Custom, SAP_LANGUAGE=}#
    #1.5 #005056AF1EB30072000000250000142000048B4D220A12ED#1279063306977#/System/Security/Authentication##com.sap.engine.services.security.authentication.logincontext#J2EE_GUEST#0##<host>_<sid>_3576650#Guest#4c1a62608ed511dfbe2a005056af1eb3#SAPEngine_Application_Thread[impl:3]_24##0#0#Info#1#com.sap.engine.services.security.authentication.logincontext#Plain###LOGIN.FAILED
    User: N/A
    Authentication Stack: com.adobe/AdobeDocumentServices*AdobeDocumentServices_Config
    Login Module                                                               Flag        Initialize  Login      Commit     Abort      Details
    1. com.sap.engine.services.security.server.jaas.BasicPasswordLoginModule   SUFFICIENT  ok          exception             true       Authentication did not succeed.#
    Successful direct access of URL http://<host>:50000/AdobeDocumentServices/Config?style=document (click on rpData test and manually log in as ADSUSER):
    #1.5 #005056AF1EB30070000000250000142000048B4D3E260016#1279063778670#/System/Security/Authentication##com.sap.engine.services.security.authentication.logincontext#ADSUSER#675##<host>_<sid>_3576650#Guest#812f72008ed611dfa62d005056af1eb3#SAPEngine_Application_Thread[impl:3]_14##0#0#Info#1#com.sap.engine.services.security.authentication.logincontext#Plain###LOGIN.OK
    User: ADSUSER
    Authentication Stack: com.adobe/AdobeDocumentServices*AdobeDocumentServices_Config
    Login Module                                                               Flag        Initialize  Login      Commit     Abort      Details
    1. com.sap.engine.services.security.server.jaas.BasicPasswordLoginModule   SUFFICIENT  ok          true       true                 
    Central Checks                                                                                true                  #
    #1.5 #005056AF1EB30070000000260000142000048B4D3E2666A6#1279063778702#/System/Security/Audit/J2EE##com.sap.engine.services.security.roles.audit#ADSUSER#675##<host>_<sid>_3576650#ADSUSER#812f72008ed611dfa62d005056af1eb3#SAPEngine_Application_Thread[impl:3]_14##0#0#Info#1#com.sap.engine.services.security.roles.audit#Java###{0}: Authorization check for caller assignment to J2EE security role [{1} : {2}].#3#ACCESS.OK#SAP-J2EE-Engine#all#

  • Is there a error with this code

    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    public class ClickMe extends Applet implements MouseListener {
    private Spot spot = null;
    private static final int RADIUS = 7;
    public void init() {
    addMouseListener(this);
    public void paint(Graphics g) {
    //draw a black border and a white background
    g.setColor(Color.white);
    g.fillRect(0, 0, getSize().width - 1, getSize().height - 1);
    g.setColor(Color.black);
    g.drawRect(0, 0, getSize().width - 1, getSize().height - 1);
    //draw the spot
    g.setColor(Color.red);
    if (spot != null) {
    g.fillOval(spot.x - RADIUS, spot.y - RADIUS, RADIUS * 2, RADIUS * 2);
    public void mousePressed(MouseEvent event) {
    if (spot == null) {
    spot = new Spot(RADIUS);
    spot.x = event.getX();
    spot.y = event.getY();
    repaint();
    public void mouseClicked(MouseEvent event) {}
    public void mouseReleased(MouseEvent event) {}
    public void mouseEntered(MouseEvent event) {}
    public void mouseExited(MouseEvent event) {}
    When I compile the the code I get a "cannot resolve symbol"
    private Spot spot = null;
    spot = new Spot(RADIUS);
    I don't know if these are errors in the code

    'cannot resolve symbol' errors usually mean a problem with the declarations and initialisations at the start of your class. This is specifically to do with your line private Spot spot = null;
    i haven`t much time to look at your code, but i would suggest getting rid of the null initialisation here, and do you ever actually change this value? after a quick look it seems that you only query it to see if the variable spot is null. if you never affect this value, then it will always be null and only one if statement will ever be executed.
    but as i said i haven`t any time, so could be off here
    boutye - boss is coming bak argh!

  • Error while running code template mapping between two oracle tables

    Hello All
    Iam getting the following error while running code template mapping between two oracle tables. Using OWB 11gR2 and oracle 11gR2 DB.
    java.sql.SQLException: ORA-20001: The active workspace is not valid as a target for this mapping
    c: at "OWBSYS.WB_RT_MAPAUDIT_UTIL", line 1065
    ORA-06512: at "OWBSYS.WB_RT_MAPAUDIT_UTIL", line 1087
    ORA-06512: at "SOURCE.FILENET_EX_UNIT_3", line 555
    ORA-06512: at line 4                                        
    Job 51 error: java.sql.SQLException: ORA-20001: The active workspace is not valid as a target for this mapping
    ORA-06512: at "OWBSYS.WB_RT_MAPAUDIT_UTIL", line 1065
    ORA-06512: at "OWBSYS.WB_RT_MAPAUDIT_UTIL", line 1087
    ORA-06512: at "SOURCE.FILENET_EX_UNIT_3", line 555
    ORA-06512: at line 4
    Quick help is highly appreciated.

    Dera Dallan
    its only a target user for the workspace where you are deploying the mapping from.
    I have two repositories for two different projects. each repositary has its own workspace.
    ex:-
    Project 1
    Work space bpms_rep_owner
    Repositary owner bpms_rep_owner
    Repositary user bpms_rep_user
    Project 2
    Work space dem_rep_owner
    Repositary owner dem_rep_owner
    Repositary user dem_rep_user
    Reg
    S.Gyazuddin

  • Error FF753 Tax code 01 not appear in any G/L account item with FM Active

    Hi
    We have fund management configured for one of the company code, while creating billing document through VF01/VF02 we are  getting the Error FF753 Tax code 01 not appear in any G/L account item.
    This error however does not appear when posting directly from FI with the same tax code.
    I have tried to change the message control in which case i am getting a dump pointing to PSM-FM.
    Please advise.
    Regards
    Sandeep

    Hi:
              If you could please refer to the contents of  OSS Note 112609 - How are tax codes transferred to conditions ?
    "Symptom
    If a billing document is transferred to accounting the system displays error messages. Transferring tax codes from tax conditions into the pricing conditions and discounts does not function as expected.
    Other terms
    FF805, FF747, FF753, MWSKZ, MWSK1, tax code
    Reason and Prerequisites
    The tax condition in the SD pricing procedure contains incorrect reference steps, there are several tax conditions in the pricing procedure of which the tax codes overwrite each other or a program error exists.
    Solution
    In the accounting document for a billing document, the different G/L account line items are provided with a tax code. The tax code of the G/L accounts is transferred from the tax condition(s) of the billing document. How are the tax codes of the tax conditions transferred into the other conditions of a billing document ?
    Basically:
    The conditions of a billing document are read from top to bottom. As soon as an active tax (inactive = ' ') is read, the system transfers the tax code of this tax into the non-tax conditions as follows:
        1. The reference steps (From-step, To-step) are read (the reference steps are defined in the pricing procedure).
        2. The tax code is transferred into all conditions, for which
        the step number of the condition lies in the pricing procedure between "From-step" and "To-step",
        the condition is not inactive (exactly: the inactive flag is not equal to A (Condition exclusion), M (Inactive due to manual entry), or X (Incorrect)),
        the condition is not statistical (if it is no invoice list condition),
        the condition is no tax condition.
    After the transfer of the tax code the system searches for the next active tax. If further taxes are found, their tax code is again transferred according to the above procedure. If the reference steps of different taxes overlap, tax codes that have already been transferred are overwritten. To all non-tax conditions which in the pricing procedure stand after the last tax condition the tax code of the last active tax condition is transferred if they are not statistical.
    Special features:
        1. If the "From-step" of a tax condition refers to a subtotal of the pricing procedure, the tax code of the tax is not only transferred into the conditions with step number between From-step and To-step but into all non-tax conditions for which
        the step number of the condition in the pricing procedure is lower than the "To-step" of the tax condition.
        the condition is not statistical (if it is no invoice list condition).
        the condition is not a tax condition.
        2. If the "To-step" of the tax condition is smaller than the "From-step", then the system sets "To-step = From-step".
    Notes:
        1. As of Release 4.0 the tax code is no longer transferred in pricing but only when the billing document is released to accounting.
        2. If you use several taxes and tax codes and Customizing is incorrect for the release of billing documents to accounting, among others the system may display error message FF747.
        3. If there are several taxes in the pricing procedure refer to Notes 72173 and 82091 for Releases 3.0D - 3.1G. For Release 3.1H, only note 82091 is relevant.
        4. For conditions which are transferred into accounting (thus not statistical, not inactive conditions) and do not contain a tax code, the system searches for a default tax code which in Accounting Customizing can be set depending on the company code (tax code for non-taxable transactions). This applies to releases up to and including Release 4.5B. For Release 4.6, refer to Note 385127."
    Regards

  • Error in T-Code: F.5E

    Dear all,
    I am getting the following errors while executing T-Code: F.5E
    01. No postings can be created for company code 4000
    02. Errors occur when determining adjustment accounts
    03. Correct the error
    04. Run report SAPF180K
    and i didn't get any error in T-Code: F.5D
    Please help me in this.
    Regards
    JS

    Dear,
    Try to use transaction F.5G -> Redetermine Adjustment Accounts for Balance Sheet Selection.
    This report will display what is wrong with your account determination.
    If you have any problems with account determination go to transaction FBKP > Automatic Posting > Financial statement readjustment.
    I hope It helps you.
    Att.
    Cássio Moreira

  • While Printing Stock Transfer PO giving error message " Tax code in procedu

    Dear SAP MM Cons,
    I want see the print preview of stock transfer purchase order but i getting following error.
    Tax code in procedure TAXINN is invalid
    Where we need not require to give any tax code in the stock transfer PO. Can any body help me to see the printpreview of STO.
    Reagrds
    Abhishek Tiwari

    Kedarji
    Thank you.Urgent please.
    Regards
    venkat
    Edited by: garapati on Feb 15, 2008 12:06 PM

  • ORA-01403: no data found Error in PLSQL code raised during plug-in processing.

    Hello OTN community,
    We are having the access to APEX problem. a New user was setup to access the APEX application. When I test to login as a new user, I get the message "ORA-01403: no data found Error in PLSQL code raised during plug-in processing.". When click OK to the disply message, the application will take me out of the sstem. I need help to even understand what is happening. I didn't develop the application, there is no documentation for this application, I am just supporting the application whenever there is a problem and I am new to APEX. As you can see I need help to figure this thing out. Your help is dearly appreciated.
    Thank you OTN

    Try to check the query that is executed and check if there is data or not

  • By the today e-received updates for Adobe Photoshop Elemenst 12.1 and Adobe Premiere Elements 12.1 I got this error messages: Failure code = U44M1P2003. What to do? System = Window7 64bit.

    By the today e-received updates for Adobe Photoshop Elemenst 12.1 and Adobe Premiere Elements 12.1 I got this error messages: Failure code = U44M1P2003. What to do? System = Window7 64bit.

    Sometimes the Adobe servers used for the updates can get busy and it’s necessary to try a couple of times. Also make sure you don’t have a firewall which may be blocking the connection. It sometimes helps to temporarily disable internet security/anti-virus software. Because the Organizer is shared by both programs it often helps to do the PSE update first, followed by the PRE update in that order.
    Select the 12.1 update for PSE from the updater dialog and ensure everything else is unchecked.  Quit PSE and PRE if you have it running and then start the update.
    If PSE updates properly to 12.1 repeat the process for PRE.

Maybe you are looking for

  • Reconcilation

    Hello All, I am running the two reports mentioed below S_ALR_87012082 ( Vendor Balances in local currency) S_ALR_87012277 ( G/L Account Balances) But when i compare both of these reports for eg choosing one of the Vendor reonciliatoin Account i see s

  • Loose Screen on Macbook Pro with Retina Display

    I ordered my Macbook Pro with Retina display on the very day Apple announced the release in 2012; I received it about a month afterwards and I soon noticed that the screen was slightly loose. It did not bother me at the time because it jiggled only s

  • Pdf documents to be printed appear as a black screen, what setting do i need to alter

    when i attempt ot print a pdf either a doc on the iMac or as a print option from an internet page, the preview displays a totally black page

  • BADI   "EXIT_SAPLFMWR_002"  is not working

    Hi All, We have upgraded from 4.6C to 6.0 and BADI   "EXIT_SAPLFMWR_002"  is not working . please suggest some solution for this.

  • Error -- 36: DEFINITE BUG

    Using Snow Leopard 10.6.2, I copied 5.2g of files in a variety of folders from a FAT32 flash drive to a temp folder on my desktop. I then erased the flash drive so I could use all its capacity on a Windows machine. After erasing the temporary content