Unable to run Groovy scripts within procedure

Hi all,
We are managing to automate objects promotion to PROD environment using Groovy. The thing is that we are able to run the script in the Groovy tool successfully, but we are not able to run the same script within a procedure in ODI. The version that we are using is 11.1.1.6.5.
Do you know if this needs further configuration? Does it needs any updgrade?
Below, the script we are currently using, it´s just to create a new physical and logical architecture on the topology tab and write an entry on the context to link logical to physical. Any help would be highly appreciated. Thanks.
Fernando.
import oracle.odi.core.persistence.transaction.support.DefaultTransactionDefinition;
import oracle.odi.domain.util.ObfuscatedString;
import oracle.odi.domain.model.OdiModel;
import oracle.odi.domain.topology.OdiLogicalSchema;
import oracle.odi.domain.topology.OdiPhysicalSchema;
import oracle.odi.domain.topology.OdiDataServer;
import oracle.odi.domain.topology.OdiContext;
import oracle.odi.domain.topology.OdiTechnology;
import oracle.odi.domain.topology.OdiContextualSchemaMapping;
import oracle.odi.domain.topology.AbstractOdiDataServer;
import oracle.odi.domain.topology.finder.IOdiContextFinder;
import oracle.odi.domain.topology.finder.IOdiTechnologyFinder;
def createLogicalSchema(contextCode, techCode, schName, dataserverName, userName, password, url, driver, schema) {
txnDef = new DefaultTransactionDefinition();
tm = odiInstance.getTransactionManager()
txnStatus = tm.getTransaction(txnDef)
contextFinder = (IOdiContextFinder) odiInstance.getTransactionalEntityManager().getFinder(OdiContext.class);
context = contextFinder.findByCode(contextCode);
techFinder = (IOdiTechnologyFinder) odiInstance.getTransactionalEntityManager().getFinder(OdiTechnology.class);
tech = techFinder.findByCode(techCode);
lschema = new OdiLogicalSchema(tech, schName)
dserver = new OdiDataServer(tech, dataserverName)
con = new AbstractOdiDataServer.JdbcSettings(url, driver)
dserver.setConnectionSettings(con)
dserver.setUsername(userName)
dserver.setPassword(password)
pschema = new OdiPhysicalSchema(dserver)
pschema.setSchemaName(schema)
pschema.setWorkSchemaName(schema)
cschema = new OdiContextualSchemaMapping(context, lschema, pschema)
odiInstance.getTransactionalEntityManager().persist(lschema)
odiInstance.getTransactionalEntityManager().persist(dserver)
tm.commit(txnStatus)
return lschema
lschema = createLogicalSchema("DEVELOPMENT", "ORACLE", "LS_HAL_TEST", "DS_HAL_TEST", "ODI_TEST", ObfuscatedString.obfuscate("odi_test"),
"jdbc:oracle:thin:@ourservername:10710:DBAA6T", "oracle.jdbc.OracleDriver", "ODI_TEST")
Notice i've changed the actual name of our server for "ourservername" because I don't know if I´m able to post that information.
Thanks.

Hi,
I did try to hard code the parameters values, and it still didn't work. However, I did get a little bit closer, I found out that it doesn't work only whne my stored procedure uses a temporary table.
Any though, why the temporary table would cause this error ?
Thanks

Similar Messages

  • Run batch script from procedure

    How should we run a batch script that contains FDQM command line from a procedure?
    The command line is created using upsShell.exe.
    If anyone has tried the above scenario, kindly share your ideas regarding this.
    Edited by: Vallikannu Annamalai on Apr 9, 2012 4:33 AM

    SH, Since we use Oracle we cannot use xp_cmdshell.
    When we go for External Procedures, only routines callable from C code (not C++ code) are supported.
    For your information we cannot make use of the C program in our environment.
    Is there any other possibility to run the job from within oracle database.
    Please correct if I m wrong. Kindly need your clarification asap. Thank you.

  • To run set commands within procedures

    Hi,
    I've even tried to run this -
    execute immediate 'set serveroutput on';
    within the procedure but I did not succeed in it. Actually, how about the way for running anything like this?
    Thks & Rgds,
    HuaMin

    Dear Arun,
    DBMS_OUTOUT.enable(10000)Above statement sets the buffer size. It does not sets server output on.
    See the example:
    "afiedt.buf" 5 lines, 73 characters
      1  BEGIN
      2     DBMS_OUTPUT.ENABLE(10000);
      3     DBMS_OUTPUT.PUT_LINE('Hello');
      4* END;
    SQL>/
    PL/SQL procedure successfully completed.
    SQL>set serveroutput on
    SQL>/
    Hello
    Hello
    PL/SQL procedure successfully completed.
    SQL>set serveroutput off
    SQL>/
    PL/SQL procedure successfully completed.Regards

  • Unable to run postclone script in Web tier

    Hi guys,
    I am trying to clone an existing Oracle Ebsuiness Suite 12.1.3 environment.
    Now I am trying to execute command: perl adcfgclone.pl appsTier in the Web tier node, but I am getting next error message:
    Executing script in InstantiateFile:
    /oramet01/oraprodmet/apps/tech_st/10.1.3/perl/bin/perl -I /oramet01/oraprodmet/apps/tech_st/10.1.3/perl/lib/5.8.3 -I /oramet01/oraprodmet/apps/tech_st/10.1.3/perl/lib/s
    ite_perl/5.8.3 -I /oramet01/oraprodmet/apps/apps_st/appl/au/12.0.0/perl -I /oramet01/oraprodmet/apps/tech_st/10.1.3/Apache/Apache/mod_perl/lib/site_perl/5.8.3/sun4-sola
    ris-thread-multi /oramet01/oraprodmet/apps/tech_st/10.1.3/appsutil/clone/ouicli.pl
    script returned:
    Beginning OUI CLI cloning for s_weboh_ohTue Oct 25 17:56:40 2011
    /oramet01/oraprodmet/apps/tech_st/10.1.3/jdk/bin/java -classpath /oramet01/oraprodmet/apps/apps_st/comn/clone/jlib/java:/oramet01/oraprodmet/apps/tech_st/10.1.3/oui/jli
    b/OraInstaller.jar:/oramet01/oraprodmet/apps/apps_st/comn/clone/jlib/xmlparserv2.jar:/oramet01/oraprodmet/apps/apps_st/comn/clone/jlib/ojdbc14.jar oracle.apps.ad.clone
    .util.OracleHomeCloner -OUICLI -e /oramet01/oraprodmet/inst/apps/PRODMET_gpmappora1-e/appl/admin/PRODMET_gpmappora1-e.xml -nolink -oaVar s_weboh_oh -homestub weboh -lo
    g /oramet01/oraprodmet/inst/apps/PRODMET_gpmappora1-e/admin/log/ohclone.log
    Finished OUI CLI cloning for s_weboh_oh with return code: 16777215Tue Oct 25 17:56:40 2011
    The difference that I have noted, is that in the source node the Java version in /usr/java path is pointing to 1.6.0.22:
    [oracrp ] ./java -version
    java version "1.6.0_22"
    Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
    Java HotSpot(TM) Server VM (build 17.1-b03, mixed mode)
    [gpmtest1-f]/usr/java/bin
    In the target node it is pointing to:
    $ ./java -version
    java version "1.5.0_21"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_21-b01)
    Java HotSpot(TM) Server VM (build 1.5.0_21-b01, mixed mode)
    $ pwd
    /usr/java/bin
    Any help or advice will be really appreciated.
    Thanks in advance.
    Kind regards,
    Francisco

    Hi,
    When I try to run ouicli.pl manually, I get next error message:
    $ pwd
    /oramet01/oraprodmet/apps/tech_st/10.1.3/appsutil/clone
    $ ./ouicli.pl
    Beginning OUI CLI cloning for s_weboh_ohTue Oct 25 19:09:10 2011
    /oramet01/oraprodmet/apps/tech_st/10.1.3/jdk/bin/java -classpath /oramet01/oraprodmet/apps/apps_st/comn/clone/jlib/java:/oramet01/oraprodmet/apps/tech_st/10.1.3/oui/jlib/OraInstaller.jar:/oramet01/oraprodmet/apps/apps_st/comn/clone/jlib/xmlparserv2.jar:/oramet01/oraprodmet/apps/apps_st/comn/clone/jlib/ojdbc14.jar oracle.apps.ad.clone.util.OracleHomeCloner -OUICLI -e /oramet01/oraprodmet/inst/apps/PRODMET_gpmappora1-e/appl/admin/PRODMET_gpmappora1-e.xml -nolink -oaVar s_weboh_oh -homestub weboh -log /oramet01/oraprodmet/inst/apps/PRODMET_gpmappora1-e/admin/log/ohclone.log
    Finished OUI CLI cloning for s_weboh_oh with return code: 16777215Tue Oct 25 19:09:10 2011
    Any help or advice will be really appreciated.
    Thanks in advance.
    Kind regards,
    Francisco

  • Running Shell Scripts within Java code!!!

    Hi,
    How do I run a shell script from my Java code???
    Also I need to ensure my next line of Java code is executed only after the shell script has finished executing.
    Since my shell script just cuts out some line for a txt file and then only my Java code parses the cut-out file section and processes certain info.
    Please help!!!
    Thanks!!!

    Runtime.exec and, if you need your Java to stop until the external executable is complete, Process.waitFor.
    And you'll want to read this:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • Red box (unable to run SQL scripts)

    [http://img140.imageshack.us/i/redbixi.png/]

    For those of us that are behind firewalls that prevent us from seeing the image you posted, would it be possible to describe the problem (i.e. what tool are you using, what are you doing, what error messages if any do you see)?
    Justin

  • How to Run 2 Scripts simultaneously:PlayQuicktimeMovieWhileSpeechRecognitio

    Basicallly i want to make an interactive game using QT movies and Speechrecognition to control what happens, loading different video clips, changing the speed of the movie while it's playing, playing sounds according to what happens.
    So i don't know if i need 2 or 3 scripts runing simultaneously.
    But anyways, how would you do it?
    Do you need to have one parent script? And if so, how would you do it.. how do you run child scripts within the parent script
    This is my basic idea , will it work:
    PARENT SCRIPT
    -Set GameALIVE to true
    Repeat while GameALIVE is true
    run GAMESPEECHRECOGNITIONScriptTHat just listens for commands
    run Script that plays and controls QT Movies based on what the GAMESPEECHRECOGNITION script gets as input
    end true
    END PARENT SCRIPT
    That's my idea but i have no clue how to do it

    I've been waiting for a dualhead2go DP edition too. Arrived today. Just playing with it.
    I'd hand on for the Dualhead2Go, that is if you haven't got it already. It's a really nice bit of kit. I'm currently running an inbuilt display and two samsung T260 with resolutions of 1920 by 1200 each as well as the inbuilt display. I haven't yet tried switching to the lower spec graphics card in my MBP but with this one it is working beautifully. I can't imagine a USB external graphics card being anywhere near as good.

  • "The Selection is not within a valid module" - unable to run on server

    Hi,
    I have WLP 10.2 portal web and ear projects, but for some reason I am unable to run on server the .portal files or any other resources within the project.
    When I try to run I get the error - The selection is not within a valid module. Does anyone have any idea in what scenarios this might happen?
    Thanks,
    Sid

    never faced this before but came across this eclipse bug
    http://dev.eclipse.org/newslists/news.eclipse.webtools/msg13972.html
    'The current handling of project modules is such that the project name must match the deploy-name in the .settings/org.eclipse.wst.common.component for "everything" to work correctly. If they don't match, I believe the symptom you are experiencing is one of the "things" that goes wrong.'

  • Unable to run Store Procedure based deski report in Infoview

    Hi All,
    I have a Deski report which is created using Store Procedure. I am able to run report in Full Client Deski. But I am unable to run / schedule same report thorough infoview.
    More details about report
    - Report uses 3 store procedures. When I ran report in infovew I get error message as "SP2 Dataprovider did not refresh properly".  -- SP2 is Dataprovider name.
    - Same report I am able to run in Dev environment. After migration to Model, report fails to run in model infoview.
    - I am able to Run report only for 1st. When I refresh and run with same parameter report shows error.
    Any input will be great help.
    Thanks,
    NV

    Hi,
    Could you please test the following solutions to resolve the issue.
    Solution1:
    Test the issue by inserting the following parameter in .SBO file.
    <Parameter Name="Force SQLExecute">Always</Parameter> .
    Solution2
    Just put SET NOCOUNT OFF in the end of the stored procedure SQL.
    If the above doesnu2019t works then please try the following solution.
    Solution3
    Make the new connection from the scratch using ODBC connection and test the issue.
    I hope this will help you.
    Regards,
    Sarbhjeet Kaur

  • Running shell scripts from within oracle. A big task is forgotten

    Dear List,
    I have some shell shell scripts which do some tasks on the linux OS level.
    I am calling the Korn scripts using a java class, which in turn is being called from a PLSQL function.
    All but one of the 10 script works fine. This is the script which does the most work, and takes on average 40 minutes usually.
    Why does Oracle forget the running of the shell script? I wait in my PLSQL function for the return code, but it never comes. The scripts I have not written myself !
    I look forward to your reply on this matter.
    regards
    Ben

    Hi
    If you are using the Oracle database 10g, the new dbms_scheduler package allows you to run shell scripts. The dbms_scheduler.create_job procedure have one parameter called the job_action in which you specify the full path of the shell script.
    I hope this will help

  • Unable to run OpenScript Functional Scripts from OTM

    Hi,
    I am unable to run OpenScript Functional Scripts from OTM, but the same script is running successfully on OpenScript.
    I have a script which has all my functions (say Script A) and I am calling these functions from a different script (Script B) and even this script (Script B) uses couple of Databanks.
    Added both the scripts to OTM and when I run the script (Script B) which is calling the functions on OTM, I see the below error message.
    Error Message: Child script with alias "Proceure_ To_Pay_Functions" not found. Add to the script "Proceure_To_Pay" a script asset with alias "Proceure_ To_Pay_Functions"
    But the child script (Script A) with functions is added as a script asset in OpenScript to the calling script (Script B) and this script is running fine from OpenScript.
    Can anyone please help me in resolving this issue.
    Thanks,
    Satya

    Hi Deepu,
    It worked and able to run the scripts developed in OpenScript from OTM. Thanks for your help!!
    But I see another problem where when I try to run the script from OTM, I see a window Interactive Services Detection with a Message
    "A program running on this computer is trying to display a message" "The Program might need information from you or your permission to complete a task." with Two Options
    -> View The Message
    -> Ask me Later
    When I click on View the Message, I can see my application running by script but my desktop is not visible.
    There is another window with Return to Desktop option, when I click on this I can see my Desktop.
    Can I not see both my Desktop and application running on the same screen?
    Please help!!
    Thanks,
    Satya

  • Run a BR or Calc Script within another BR

    Is there a way from which I can run one Business Rule/Calculation Script in another Business Rule/Calculation Script (Run one BR/Calc Script within another BR)?
    Edited by: 930603 on May 3, 2012 4:44 PM

    Hi,
    Do you want to run two BR's parallel y, why you are not going for sequences option, you can divide your rule in parts and run the rules in the sequence you want.
    run one Business Rule/Calculation Script in another Business Rule/Calculation Script (Run one BR/Calc Script within another BR)?I don't think so you can call one BR from other, if you want the same might be you have to write CDF for calling the BR/CalcScript within the BR. or you can use Essbase Macro option.(+I am not sure for this option+)
    Thanks,
    Avneet Singh Bhatia

  • Getting "Unable to run script at line 1: syntax error"  error?

    Hi,
    I want to run a script using the AEGP_ExecuteScript() function. but I got an error "Unable to run script at line 1: syntax error". what could be the rea son for this? shall I inlcude anything extra info in my project?
    Below is the code ...
    char scriptPath[] = "F:\\Documents and Settings\\akshays\\Desktop \\Active Shutter.jsx";
    A_Boolean platform_encodingB = 'B';
    AEGP_MemHandle outResultPH0;
    AEGP_MemHandle outErrorStringPH0;
    utilitySuite5->AEGP_ExecuteScript( pluginID, scriptPath, platform_encodingB, &outResultPH0, &outErrorStringPH0 );
    please help me.
    Thanks
    Manjunath

    This can be debug by using "ExtendSCript Toolkit 2 and Debugger".
    Just open Edit -> Prefernces -> General -> ****
    There enable checkbox "Enable javascript debugger".
    if you encountering an error while launching the script, then AE will automatically open your script in "ExtendSCript" toolkit with an error at the bottom line. You can see the "DataBrowsing" panel right side for available functions., objects and so on.
    then you can get to know what is the error and the reason for this error at least.

  • Securely deploying and using credentials within a script (not running the script under the credentials)

    Here is my scenario - I have SCOM 2007 R2 and on certain agents I want to execute a script. One of the actions of that script is to access a secured web page using a username and password via integrated authentication (IE pop-up for auth).
    The username and password that I need to use are unrelated to the Windows domain that the servers run in, meaning you can think of the website as if it were a public site (it isn't, but it has no security sharing with the domain where the agents run - no trust,
    no nothing).
    I can easily accomplish this by hard-coding the username and password within the script (powershell), however, I don't want to do this for security reasons. Here's a rough example of the relevant code:
    $targetURL = "https://somehost.somewhere.something/filename.zip"
    $path = "c:\downloads\filname.zip"
    $wclient = New-Object System.Net.WebClient
    $wclient.Credentials = New-Object System.Net.Networkcredential($uname, $pword)
    $wclient.DownloadFile( $url, $path )
    What I want is a way to pass the $uname and $pword variables to this script securely, with the script running on a schedule under SCOM. The SCOM agents run as localsystem and need to remain that way.
    I currently use Run-As accounts and profiles for other functions where the entire script runs under the run-as profile, but I can't figure out how to extract the username and passwords, and doubt it's even possible.
    To be clear, I cannot run the script under the given credentials as a Run-As account as those credentials are not known to the local server. I need to somehow pass the credentials to the script (other than hardcoding) or extract them from the run-as accounts.
    I've looked at the get-runasaccount cmdlet and can see some of the info there, but don't see a way to re-use, pass-through, or extract the password for use in my scenario.
    Any guidance? Can I get there from here?

    Hi, check this
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/ebfc706d-93be-4ca0-83e0-33d9e072fb97/powershell-script-monitor-with-encrypted-password?forum=operationsmanagerauthoring
    But you should not specify runas account for your workflow, just reference Runas Username and Password from Profile and use simple authentication. (The same way as in article above)
    So in the end your script will be executed by default action account but you'll pass username and password securely to your script.

  • I have a Macbook Air with Lion and have downloaded drivers for the Pico Pix 2055 which i am unable to run how do I override the security. I have followed the Mac procedure but to no avail :-(

    I have a Macbook Air with Lion and have downloaded for the Pico Pix 2055 which I am unable to run. How do I override the security.  I have followed the Mac procedure but to no avail :-(. 

    See the heading "How to open an app from a unidentified developer" on this support page. The instructions apply to installer packages as well as applications.

Maybe you are looking for

  • BOM explosion in CRM Service Contract

    Hello We want have a BOM explosion working in CRM for service contracts Here are the details : We have replicated the materials from ECC to CRM. We are not maintaining any BOMu2019s in ECC. The idea is that we maintain the BOM Structure in CRM only,

  • Icon Issues...

    A few questions I'm hoping someone can help me with... 1. Just installed Leopard, and I'm having trouble changing icons like I used to do it in Tiger. When I "get info" my application (the one whose icon I want to change/restore) in finder, I see bot

  • Previous Price (history)

    Hi all, Is there a way that I can find out the prices of items for instance as at 31st DEC 2007. Which type of a query construct can i use? and which tables? Thanks. Regards, Henry

  • Orion-ejb-jar.xml for oc4j and xdoclet

    Does anybody try to use xdoclet to generate orion-ejb-jar.xml with ejb relation? Could somebody show me any example of definition relation for xdoclet and orion-ejb-jar.xml? (@orion:persistence...) thanks for any advice... :-) Zajo

  • Computer will not join wifi network.  Please hep

    I've used it at my home, in the airport, and cafes, and it worked flawlessly, but now in my girlfriend's house I cannot join their network. I even installed a brand new Linksys router today and it still will not join. It finds the network SSID but re