Get error in the procedure of Jython

Hi all

I m writing this code in the procedure of ODI with technology like Jython target and ignore the errors checked.

filesrc = open (was: \MyFile.txt ',' r')
First = filesrc. ReadLine()
lines = 0
all first:
lines += 1
First = filesrc. ReadLine()
def intWithCommas (x):
If not in kind (x) [type (0), type(0L)]:
raise TypeError ("parameter must be an integer.")
If x 0 are:
return '-' + intWithCommas (x)
result = "
While x > = 1000:
x, r = divmod (x 1000)
result = ', % 03d %s' % (r, result)
return '%d %s' % (x, result)
S1 = Str (intWithCommas (Lines))
S2 = "\n\n and the first line of the file is - > > \n\n"
filesrc. Seek (0)
S3 = STR (filesrc. ReadLine())
final = s1 + s2 + s3
raise "\n\n are the number of lines in the file - > > ', final"

but this error:

org.apache.bsf.BSFException: exception of Jython:
Traceback (innermost last):
(no object code) on line 0
SyntaxError: ('invalid syntax', ('< string >", 5, 1, ' lines += 1'))

at org.apache.bsf.engines.jython.JythonEngine.exec(JythonEngine.java:146)
at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine(SnpScriptingInterpretor.java:345)
at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.exec(SnpScriptingInterpretor.java:169)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java:2374)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java:1615)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execScriptingOrders(SnpSessTaskSql.java:1580)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java:2755)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2515)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:534)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:449)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1954)
to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:322)
at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:224)
at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:246)
to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:237)
to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:794)
at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:114)
to oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$ 2.run(DefaultAgentTaskExecutor.java:82)
at java.lang.Thread.run(Thread.java:619)

Please help me with this...

Hello

You are able to run this code directly from Jython?

What you can do is to copy this code into a text file and name it say sample_jython.py.

Now, open a command prompt and navigate to the \oracledi\bin

Issue the following command

Jython \sample_jython.py

Thank you
Fati

Tags: Business Intelligence

Similar Questions

  • error in the procedure 'Send Jython HTML Email'

    I used the procedure to "Send the Email of HTML Jython" to send an email to ODI 11 g.

    Options:

    The entries I used are

    Host: Address of the SMTP server

    < Default > port: 25

    < Default > SMTP Auth: Yes

    User:

    Password *.

    At ***@***.com

    Of ***@***.com

    Test of the object

    LoadfromFile No.

    FilePath D:\

    MessageText Test_Message

    Is < default > HTML: Yes

    Spare D:\


    Error message after I got to the step "to create a complete message:

    "

    org.apache.bsf.BSFException: exception of Jython:

    Traceback (most recent call changed):

    File "< string >", line 25, < module >

    IOError: (21, "Is a directory", ")

    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:2093)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ 2.doAction(StartSessRequestProcessor.java:376)

    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)

    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:309)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$ 0 (StartSessRequestProcessor.java:301)

    to oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$ StartSessTask.doExecute (StartSessRequestProcessor.java:865)

    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:137)

    to 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 changed):

    File "< string >", line 25, < module >

    IOError: (21, "Is a directory", ")

    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)

    to java.lang.RuntimeException. < init > (RuntimeException.java:32)

    to org.python.core.PyException. < init > (PyException.java:46)

    to org.python.core.PyException. < init > (PyException.java:43)

    at org.python.core.Py.IOError(Py.java:175)

    to org.python.core.io.FileIO. < init > (FileIO.java:77)

    at org.python.core.PyFile.file___init__(PyFile.java:157)

    to 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)

    to org.python.pycode._pyx1609.f$ 0 (< string >: 30)

    to org.python.pycode._pyx1609.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)

    ... 19 more

    "

    Hi 2782749,

    It seems that this has to do with the path of the attachment. Could you try giving a full path to the file to see if it works? It is perhaps required in this procedure.

    Could you post the code of procedure you?

    Best regards

    JeromeFr

  • Getting errors on the 3 Windows updates: 2699988, 270162, 2685939. On the first try error codes were 0 x 80246007 and 0x8007010B

    Getting errors on the 3 Windows updates: 2699988, 270162, 2685939.  On the first try error codes have been 0 x 80246007 for all 3, try subsequent was 0x8007010B.

    Configuration is Windows XP SP3 with MSIE6 (test the system reads old browser).  Any suggestions?

    Original title: get errors on the 3 Windows updates

    Maybe: http://support.microsoft.com/kb/958042

    When you try to install the updates on the Windows Update Web site or the Microsoft Update Web site, you may receive a "0 x 80246007" error code

  • Get errors for the user input data filter no KB 911895 HID

    OT: iI have windows xp S/P 3 installed also apple i pad I get errors for the user input data filter no KB 911895 HID
    What should I do to get rid of this popup that wizzard windows keeps giving me?

    Hi Graybeard,

    What is the exact error message you get?

    HID Non-User Input data filter is an optional update. I suggest you try the steps from the following link:

    The screen saver does not start after the installation of a wireless pointing device
    http://support.Microsoft.com/kb/913405

    What version of the operating system Windows am I running?
    http://Windows.Microsoft.com/en-us/Windows7/help/which-version-of-the-Windows-operating-system-am-i-running

    Troubleshooting Windows Update or Microsoft Update when you are repeatedly offered an update
    http://support.Microsoft.com/kb/910339

  • I can't send an e-mail as a group, with or without an attachment, I always get error 0x800CCC0B the message, I have outlook express.

    cannot send error 0x800CCC0B group

    I can't send an e-mail as a group, with or without an attachment, I always get error 0x800CCC0B the message, I have outlook express (not sure which version) under XP, I used to be able to send a group with 500 more emails in it, I tried to narrow the group to 200, but it makes no difference can anyone help?
    Check out this link. Apparently there is a max of 100 recipients simultaneously and they also will disable your account temporarily if you try many times.
     
     
  • I recently upgraded to Photoshop cc (2015) and Windows 10.  Now I get error messages - "the extension of com.adobe.preview.loader could not be loaded because it was not properly signed.  And when I try to open a dng file, it comes up with "cannot be compl

    I recently upgraded to Photoshop cc (2015) and Windows 10.  Now I get error messages - "the extension of com.adobe.preview.loader could not be loaded because it was not properly signed.

    When I try to open a dng file, it comes up with "could not complete your request because it is not the right type of doc.  Now I have "expansion of libraries could not be loaded because it was not properly signed.

    Any help would be greatly appreciated.  The program worked perfectly in the past.

    I contacted Support Adobe this morning, and they were able to solve the problem.  It was difficult.

  • I downloaded the latest version of the DNG Converter Camera Raw version 9.1.1 for windows. However, I get error install the update saying "error opening file for writing. Also on my help menu updates is not active?

    I downloaded the latest version of the DNG Converter Camera Raw version 9.1.1 for windows. However, I get error install the update saying "error opening file for writing. Also on my help menu updates is not active?

    If the installation program itself fails to open and run. Download it again maybe your current download is corrupted. Also, what OS you are using and you are an administrator with permission to install.

  • Lightroom starts but then I get "error reading the preview cache. LR needs to stop smoking.  Will try next time it starts. I restart from scratch and the same thing happens.  Help please!

    Lightroom starts but then I get "error reading the preview cache. LR needs to stop smoking.  Will try next time it starts. I restart from scratch and the same thing happens.  Help please!

    In the same folder that your catalog file is stored in, there is a subfolder whose name ends with Previews.LRDATA. Delete this subfolder whose name ends with Previews.LRDATA. Do not remove anything else.

  • How to get data in the procedure after CREATE TABLE table1 AS SELECT * from table2

    Hello

    can any body tell me how to get the data in the new table created in the procedure. because it gives following error.

    • Error (47,21): PL/SQL: ORA-00942: table or view does not exist

    tableName: = "BCKUP_" | TO_CHAR (sysdate, 'ddmmrrrr');

    tableDDL: = 'CREATE TABLE' | tableName. "AS SELECT * FROM Table1 where to_char(MSG_IN_TIME,''dd-mon-rrrr'') < sysdate - ' | daysNumber;

    EXECUTE IMMEDIATE backUpDDL;

    COMMIT;

    DELETE FROM Table1;

    How to select the data in the newly created table. as...

    Select * from ". tableName;

    Do not choose anything to get the number...

    Just after backupDDL EXECUTE IMMEDIATE, simply refers to SQL % ROWCOUNT - who will be the number of lines.

    Oh and DDL engages automatically, your commitment is redundant.

  • views get invalid when the procedure is changed

    Hello
    When a procedure is changed and therefore newly compiled some views according to are reported as 'invalid '. For this reason the following application generates errors. How could it be created to complie based on all of the objects (e.g. views) when the procedure gets compiled?

    Rgds
    Jan

    The coil of the output of the select statement in a file and then run the file:

    Select 'Edit'. "replace (object_type, 'BODY of PACKAGE', 'PACKAGE') | '|| object_name |' compile; »
    from user_objects
    When status = 'INVALID';

    It compiles all invalid objects of a user. After execution, you can repeat the step if the compilation of an object struck again a few other objects - select till does not any new release.

    Kind regards
    Monika

  • Query running beside the database successfully but in error in the procedure!

    Hi all

    I'm something get odd errors on in ODI 11 g.

    When I run the query to the database, it performs very well, and it creates a table.
    But when encorporate this query in the procedure, it gives me following error.

    ODI-1228: PROC_POZ_BOSS_OMP_BOSSWORKORDER (procedure) has failed on the staged target of connection ORACLE ODI POZ.
    Caused by: java.sql.SQLDataException: ORA-01843: not one month valid

    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:79)

    I am convert Char to the data types Date in the Code.

    Details of the DB: - Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production
    ODI Details:-Standalone Edition Version 11.1.1
    Build ODI_11.1.1.3.0_GENERIC_100623.1635

    What would be the reason for query next to the DB with success but in error next to the ODI?
    I'm really confused... :(
    Help me how can I fix this error?

    Hi Manu
    I think that I've already advised the same thing in your previous thread. It could be because NLS_DATE_FORMAT.
    Something weird situation while running the interface in ODi

    Thank you.

  • I get errors during the installation of Download Helper

    I've updated to FF 4. XX and lost my Download Helper. I also had a lot of memory problems and blocking. I uninstalled FF 4 and returned to FF 3.6.17. Now, I can't reinstall Download Helper. I keep getting and error towards the end of the installation. The error reads as follows.

    Firefox could not install the file at
    http://releases.Mozilla.org/pub, mozilla.org/addons/3003/videos_downloadhelper=4.9.3-sm+fx.xpi

    Because: unexpected Setup error
    Review the error Log from the Console for more details.
    -203

    I went and found the error log and it says to clear my cache and or wait a few hours and try again. It's been several weeks and I can always install it. I tried to completely uninstall the Download Helper and reinstall and get the same error.

    In addition, from time to time when I run FF he asks me upgrade Download Helper, that brings me to believe it's to see. If I allow him to upgrade the same error occurs. I'm puzzled!

    Try to locate your Firefox user (http://kb.mozillazine.org/Profile_folder_-_Firefox) profile directory and delete (or rename) these files:

       extensions.ini
       extensions.cache
       extensions.rdf
       extensions.sqlite
       extensions.sqlite-journal
    

    Source: _ http://kb.mozillazine.org/Firefox: _Issues_:_Can % 27t_Install_Themes_or_Extensions #Corrupt_extension_files

  • Why am I getting errors on the updates of windows I have vista and receive updates for xp with 0000057e erros

    Windows Update error

    Hello Sir Edward Parker,

    Thank you for using answers.microsoft.com

    Follow these steps to solve the problem.

    -->> Go to Windows Update and search for an update marked "Failed".
    -->> Click on "View Update History".
    -->> When you see the update history, click the link as if you were going to download the update.
    -->> Do not download, but instead, click 'Run' and run the update.
    -->> During the update, you will get errors - JUST click ON 'Ignore' and go through the errors.
    -->> The update complete, although history will show always 'Impossible' for once.
    -->> Next time Windows Update is run, she sees that the update takes place and mark the update given as a 'success'

    That should solve the problem for you.
    Thank you.

    UDAY $012 please let me know that whether the solution worked or not, I thank you and appreciate your comments. URGO

  • Error message: the procedure entry point sqlite3_wal_checkpoint could not be found in the librayr of Hotlinks SQLite3.dll.

    Original title: IApple synchronize notifier.exe - not found entry point

    I typed a mistake in my first question.  Here he again the question.

    The procedure entry point sqlite3_wal_checkpoint be found in the librayr of Hotlinks SQLite3.dll.

    I called Apple, but they checked my computer and cannot find any problems with the above, but he always comes back.

    Hello

    1. when exactly you receive this error message?

    2. did you of recent changes on the system?

    Method 1:

    Temporarily disable the antivirus on the computer program and check if it helps. If it works, you may need to check the settings of the program.

    Note: check that you activate your anti-virus protection on the computer back after you complete these steps. It is not recommended to disable these settings on the computer. It's just to solve the problem.

    Method 2:

    You can try to uninstall and reinstall everything produced Apple installed on the system and check if this may help:

    Remove and reinstall iTunes, QuickTime, and other software components for Windows Vista or Windows 7

  • When you try to copy a. DAT in Vista file, get error 0x80070057L, the parameter is incorrect

    I tried to copy a *. DAT file from a CD on my HARD drive. During the last 5 seconds, I always get the following error message:

    Error 0x80070057L the parameter is incorrect

    I am able to open the file, but can not copy. I tried on my laptop (Vista SP1) and on an another desktop running XP and get the same error.

    What causes this problem?

    Hello

    The problem occurs when you try to copy other files?

    Check if you can copy files in Mode without failure.

    Refer to this article for help:
    http://Windows.Microsoft.com/en-CA/Windows7/start-your-computer-in-safe-mode

    Kind regards
    Afzal Taher
    Microsoft technical support engineer

Maybe you are looking for

  • Freeze screen for Satellite Pro P300 while watching the movie

    My Satellite P300 keeps freezing when I am watching videos.Can't even watch you tube gently or activity without intermittent freezing. Any help on this?

  • "Nightshift" on ipad 2

    Hello Apple im Paulius (Paul) I want to know why is there none crossed on ipad 2 I hope that it will be added or it's just a glich. I do not know. I hope you guys help

  • PC HP omni 100 - 6110ix

    that my computer can't stand not a graphic game high, so I need a video card for it so someone tell me a good video card for it Here is my pc: http://support.hp.com/us-en/document/c02806550 and here his motherboard: http://support.hp.com/us-en/docume

  • How do eliminate the password entry every time that I start

    How to eliminate the need to enter my word happening whenever I connect?

  • Table of indicators clusters

    Hello world In my program, I have an array of clusters with controls and an array of clusters with indicators.  I created nodes of property for each table that updates the number of columns.  Each column represents a channel that is monitored on a DM