Forms HOST command on WebLogic not working.

I am attempting to issue a HOST command from Forms 11g on a WebLogic Application Server (running on Solaris) to execute a server-side shell script.
I previously had no problem doing this using OAS10g (also running on Solaris), but all attempts on WebLogic set FORM_FAILURE to TRUE, and I do not know how to trace the error or cause of the problem.
To recreate, create a simple Form with a Text Item (ITEM4) and Command Button (ITEM5).
When-Button-Pressed trigger on ITEM5 contains the following code:
HOST(:item4);
IF FORM_FAILURE THEN
  message('Form Failure occurred');
END IF;Transfer to Form server, and compile.
Even supplying '/bin/ls' as a command produces the error message.
As I mentioned, this was previously working without a problem on OAS10g on Solaris, so I am unsure if WebLogic requires some sort of different Security or privileges to be specified for the Forms Application component.
Cheers,
Marc.
Edited (code formatted) by: sirmarc on Oct 11, 2011 4:41 PM

The problem is most often caused as a result of not having the necessary environment variables available to execute the command in question. When the shell is launched using HOST, most of the typical variables are stripped. Specifically PATH and LD_LIBRARY_PATH. As a result, you need to create your own script to call and not call the command directly. The script would include the setting of the necessary environment variable before calling the wanted command.
You can try adding the needed variables to the default.env. In many cases, these will be picked up, it will just depend on exactly what it is you are trying to execute. So for example in default.env add to the existing PATH entry something like this or whatever is appropriate for your system> /usr/bin:/usr/ucb:/etc:.
Do not delete any of the existing entries in default.env and most importantly, do not use variable references. You must fully qualify your entries. Variables like $PATH are not permitted.

Similar Messages

  • 10g Host command imp.exe not working

    Hi,
    Just created a relatively simple form that uses host command.
    I create a sql script using text_io to create a new user.
    I then use host to run that script on the app server.
    All this works fine.
    Then i use host command to try and import into the db. This is when it does nothing.
    I have cut it down to bear bones and a button with the command:
    host('D:\oracle\database\BIN\imp.exe LOG=D:\test.log');This doesnt even create the log "test.log"
    If i copy and paste this into the run box on the app server the log is created?
    Any ideas?
    Thanks

    hi
    first try to import by using dos go to start,run and cmd something like this.
    c:\Imp user/pass@orcl file=c:\file.dmp log=c:\log_name.log full=y
    What is import/export and why does one need it?
    Oracle's export (exp) and import (imp) utilities are used to perform logical database backup and recovery. When exporting, database objects are dumped to a binary file which can then be imported into another Oracle database.
    These utilities can be used to move data between different machines, databases or schema. However, as they use a proprietary binary file format, they can only be used between Oracle databases. One cannot export data and expect to import it into a non-Oracle database.
    Various parameters are available to control what objects are exported or imported. To get a list of available parameters, run the exp or imp utilities with the help=yes parameter.
    The export/import utilities are commonly used to perform the following tasks:
    Backup and recovery (small databases only, say < +50GB, if bigger, use RMAN instead)
    Move data between Oracle databases on different platforms (for example from Solaris to Windows)
    Reorganization of data/ eliminate database fragmentation (export, drop and re-import tables)
    Upgrade databases from extremely old versions of Oracle (when in-place upgrades are not supported by the Database Upgrade Assistant any more)
    Detect database corruption. Ensure that all the data can be read
    Transporting tablespaces between databases
    Etc.
    From Oracle 10g, users can choose between using the old imp/exp utilities, or the newly introduced Datapump utilities, called expdp and impdp. These new utilities introduce much needed performance improvements, network based exports and imports, etc.
    NOTE: It is generally advised not to use exports as the only means of backing-up a database. Physical backup methods (for example, when you use RMAN) are normally much quicker and supports point in time based recovery (apply archivelogs after recovering a database). Also, exp/imp is not practical for large database environments.
    [edit] How does one use the import/export utilities?
    Look for the "imp" and "exp" executables in your $ORACLE_HOME/bin directory. One can run them interactively, using command line parameters, or using parameter files. Look at the imp/exp parameters before starting. These parameters can be listed by executing the following commands: "exp help=yes" or "imp help=yes".
    The following examples demonstrate how the imp/exp utilities can be used:
    exp scott/tiger file=emp.dmp log=emp.log tables=emp rows=yes indexes=no
    exp scott/tiger file=emp.dmp tables=(emp,dept)
    imp scott/tiger file=emp.dmp full=yes
    imp scott/tiger file=emp.dmp fromuser=scott touser=scott tables=dept
    Using a parameter file:
    exp userid=scott/tiger@orcl parfile=export.txt
    ... where export.txt contains:
    BUFFER=10000000
    FILE=account.dmp
    FULL=n
    OWNER=scott
    GRANTS=y
    COMPRESS=y
    NOTE: If you do not like command line utilities, you can import and export data with the "Schema Manager" GUI that ships with Oracle Enterprise Manager (OEM).
    [edit] Can one export a subset of a table?
    From Oracle 8i one can use the QUERY= export parameter to selectively unload a subset of the data from a table. You may need to escape special chars on the command line, for example: query=\"where deptno=10\". Look at these examples:
    exp scott/tiger tables=emp query="where deptno=10"
    exp scott/tiger file=abc.dmp tables=abc query=\"where sex=\'f\'\" rows=yes--------------------------
    You can also use DBMS_DATAPUMP.
    For example, you can start the export job from a PL/SQL package with the following PL/SQL code:
    declare
        handle  number;
    begin
        handle := dbms_datapump.open('EXPORT','SCHEMA');
        dbms_datapump.add_file(handle,'SCOTT3.DMP','DUMPDIR');
        dbms_datapump.metadata_filter(handle,'SCHEMA_EXPR','= ''SCOTT''');
        dbms_datapump.set_parallel(handle,4);
        dbms_datapump.start_job(handle);
        dbms_datapump.detach(handle);
    end;
    / sarah

  • Host command on Linux not working

    I am running forms10g (Mid tier is Linux and client is windows 2000) with the following code in when-button-pressed
    host ('/bin/sh /u01/apps/a.sh',screen);
    if NOT Form_Success then
    message('failed ');pause;
    else
    message('Form_Success');pause;
    end if;
    a.sh contains
    cp /u01/apps/a.txt /u01/apps/a1.txt
    and i am always getting the message('failed'). nothing show up on the screen, anything wrong in the code ?
    Thanks
    Muthu

    Hi Francois
    Yes that user has all the rights. To prove that I have the following code
    declare
    in_file text_io.file_type;
    linebuf varchar2(200);
    infile1 text_io.file_type;
    begin
    /*host ('/bin/sh /u01/apps/nucleus/a.sh',screen);
    if NOT Form_Success then
    message('failed ');pause;
    else
    message('Form_Success');pause;
    end if;*/
    in_file := Text_IO.Fopen('/u01/apps/a.txt', 'r');
    infile1 := Text_IO.Fopen('/u01/apps/a1.txt', 'w');
    Text_IO.Get_Line(in_file,linebuf);     
    text_io.fclose(in_file);
    text_io.put_line(infile1,linebuf);
    text_io.fclose(infile1);
    End;
    Now a1.txt created.
    Thanks
    Muthu

  • Forms HOST command no longer works after database upgrade from 10g to 11g

    Hi,
    After upgrading the database 10g to 11g the forms HOST command no longer works on Unix server. The form used to work fine prior the upgrade. I read all the threads I could find and did not see any solutions. Adding PATH and LD_LIBRARY_PATH does not work because it does not even run a basic shell script. (I saw this solution, adding PATH and LD_LIBRARY_PATH, in many questions / threads).
    1. I wouldn't expect the database upgrade to be an issue, but it is the only change we had.
    2. Note, 11g is Oracle Fusion Middleware which is quite a bit different than 10g.
    I even tried the most basic commands like "echo" which is a build-in Unix command and there is no directory for it (ie. no /usr/bin - so variable PATH is irrelvent). i.e HOST('echo hi'); and HOST('echo "hi" '); and even HOST ('echo hi > /my_file.txt'); all returns FORMS_FAILURE (actually the if is IF FORM_SUCCESS THEN ... else ... and the else part always runs now - whereas it didn't before.).
    Or basic commands like /usr/bin/ls as in HOST(/usr/bin/ls). At that point I was just testing the Unix command would return FORM_SUCCESS even though I could not see the results (because they weren't writing to a log file). Notice that I'm using the direct path /usr/bin so no Unix environment variables were needed.
    The form does use webutil but that part works. For example, we have webutil_file_transfer( ....) The file shows up on the application server and in the expected directory.
    Here's the main goal. Upload a file from clients local PC to the datebase server. The form uploads the file to the Application server, then we have a Unix script to scp (secure copy) the file from the application server to the database server. IF webutil, or any other Oracle functions could put the file on the database server that would be better. But, I don't know of any procedures that do that - or would have done it cleanly (i.e. storing to database and write back to server and then using a blob etc. )
    Anyway, I was hoping someone would help with either of these.
    1) Get the HOST command to work. - If we can get that to work then I wouldn't need any more help. We can just call the already existing Unix script to copy the file from the application server to the database.
    2) OR be able to upload directly to the database server - wanted to do that originally
    Any help would be appreciated

    Solution for those interested and for anyone else searching this forum for a solution
    I found this on My Oracle Support:
    <h3>Host Command from Forms Not Working in 11g in Sun Solaris Sparc OS [ID 1157346.1]</h3>
    Applies To: Oracle Forms - Version 11.1.1.1.0 and later
    Sun SPARC Sun OS
    Symptoms:
    When trying to execute a Shell script or any OS command using the host() Built-in from Forms 11g, the host()command is not getting executed. The same functionality works on other operating systems and in previous versions like 10gR2.
    Steps to be followed:
    1) Take a backup and edit the $DOMAIN_HOME/config/fmwconfig/servers/WLS_FORMS/applications/formsapp_11.1.1/config/default.env or any custom environment file.
    2) Locate the following environment variable:
    LD_PRELOAD=/ora10gas/app/11.1.0/Middleware/as_1/jdk/jre/lib/sparcv9/libjsig.so
    3) Comment out this variable. After the changes, it will look like the following:
    #LD_PRELOAD=/ora10gas/app/11.1.0/Middleware/as_1/jdk/jre/lib/sparcv9/libjsig.so
    3) a) Instead of LD_PRELOAD, kindly use LD_PRELOAD_64 as given below :
    LD_PRELOAD_64=/ora10gas/app/11.1.0/Middleware/as_1/jdk/jre/lib/sparcv9/libjsig.so
    (This makes HOST AND RUN_REPORT_OBJECT work fine).
    4) Save the file and execute your forms. The Host() built-in will work as expected
    The LD_PRELOAD setting in default.env is only required for the working of signal chaining facility in JVM version 1.5 and later. If you are not using theSignal chaining facility, this variable is not required. For more information, refer to the following documentation
    http://download.oracle.com/docs/cd/E14571_01/doc.1111/e14772/forms.htm#CJAJGAFF

  • I updated to iOS 5.1 but my camera buttone form the lock screen is not working what should i do

    i updated to iOS 5.1 but my camera buttone form the lock screen is not working what should i do. i tryed restoring but it didnt work .
    When i try the camera loncher  but  it's not working

    i feel stupid now because i didnt know to swipe it up lol
    thanks

  • I have a problem in this that i want to paas a form in a case that when user pres n then it must go to a form but error arises and not working good and threading is not responding

    made in cosmos help please need it
    using System;
    using Cosmos.Compiler.Builder;
    using System.Threading;
    using System.Windows.Forms;
    namespace IUOS
        class Program
            #region Cosmos Builder logic
            // Most users wont touch this. This will call the Cosmos Build tool
            [STAThread]
            static void Main(string[] args)
                BuildUI.Run();
            #endregion
            // Main entry point of the kernel
            public static void Init()
                var xBoot = new Cosmos.Sys.Boot();
                xBoot.Execute();
                Console.ForegroundColor = ConsoleColor.DarkBlue;
                a:
                Console.WriteLine("------------------------------");
                Console.WriteLine("WELCOME TO THE NEWLY OS MADE BY THE STUDENTS OF IQRA UNIVERSITY!");
                Console.WriteLine("------------------------------");
                Console.WriteLine();
                Console.WriteLine();
                Console.WriteLine();
                Console.WriteLine("\t _____                                
                Console.WriteLine("\t|     |        |            |        
    |            |      |");
                Console.WriteLine("\t|     |        |            |        
    |            |      |");
                Console.WriteLine("\t|     |        |            |        
    |            |      |");
                Console.WriteLine("\t|     |        |            |        
    |            |      |___________");
                Console.WriteLine("\t|     |        |            |        
    |            |                  |");
                Console.WriteLine("\t|     |        |            |        
    |            |                  |");
                Console.WriteLine("\t|     |        |            |        
    |            |                  |");
                Console.WriteLine("\t|     |        |            |        
    |            |                  |");
                Console.WriteLine("\t|     |        |            |        
    |            |                  |");
                Console.WriteLine("\t|_____|        |____________|         |____________|      ____________");
                string input;
                Console.WriteLine();
                Console.Write("\nAbout OS     : a");
                Console.Write("\nTo Shutdown  : s");
                Console.Write("\nTo Reboot    : r");
                Console.Write("\nStart Windows Normaly : n");
                Console.WriteLine();
                input = Console.ReadLine();
                if (input == "s" || input == "S"){
                    Cosmos.Sys.Deboot.ShutDown();
                else
                if (input == "r" || input == "R"){
                    Cosmos.Sys.Deboot.Reboot();
                else
                if (input == "a" || input == "A"){
                    Console.ForegroundColor = ConsoleColor.DarkBlue;
                    Console.Clear();
                    Console.WriteLine("\n\n\n-------------------------------------");
                    Console.WriteLine("version: DISPLAYS OS VERSION");
                    Console.WriteLine("about: DISPLAYS INFO ABOUT ANGRY OS");
                    Console.WriteLine("hello or hi: DISPLAYS A HELLO WORLD");
                    Console.WriteLine("MESSAGE THAT WAS USED TO TEST THIS OS!!");
                    Console.WriteLine("-----------------------------------");
                    Console.Write("You Want to know : ");
                    input = Console.ReadLine();
                    if (input == "version"){
                        Console.WriteLine("--------------------");
                        Console.WriteLine("OS VERSION 0.1");
                        Console.WriteLine("--------------------");
                    else
                    if (input == "about"){
                        Console.WriteLine("--------------------------------------------");
                        Console.WriteLine("OS IS DEVELOPED BY Qazi Jalil-ur-Rahman & Syed Akber Abbas Jafri");
                        Console.WriteLine("--------------------------------------------");
                    Console.Write("Want to go back to the main window");
                    Console.Write("\nYes : ");
                    string ans = Console.ReadLine();
                    if (ans == "y" || ans == "Y")
                        goto a;
                        Thread.Sleep(10000);
                    else
                    if (input == "n" || input == "N")
                        Thread.Sleep(5000);
                        Console.Clear();
                        for (int i = 0; i <= 0; i++){
                            Console.Write("\n\n\n\n\t\t\t\t\t  ____        ____   ___  
                            Console.Write("\n\t\t|\t\t |  |      |    |     
    |   |  | |  |  |");
                            Console.Write("\n\t\t|\t|    |  |----  |    |     
    |   |  | |  |  |---");
                            Console.Write("\n\t\t|____|____|  |____  |___ |____  |___|  |    |  |___");
                            Thread.Sleep(500);
                        Thread.Sleep(5000);
                        Console.Clear();
                        BootUserInterface();
                        Console.ReadLine();
    //                    Form1 fo = new Form1();
                    else{
                        for (int i = 0; i <= 5; i++){
                            Console.Beep();
                            Thread.Sleep(1000);
                            goto a;
                while (true);
            private static void BootUserInterface() {
                Thread t = new Thread(UserInterfaceThread);
                t.IsBackground = true;
                t.SetApartmentState(ApartmentState.STA);
                t.Start();
            private static void UserInterfaceThread(object arg) {
                Form1 frm = new Form1();  // use your own
                Application.Run(frm);
     

    Hi
    Jalil Cracker,
    >>when user pres n then it must go to a form but error arises and not working good and threading is not respondin
    Could you post the error information? And which line caused this error?
    If you want to show Form1, you can use form.show() method
    Form1 frm = new Form1();
    frm.Show();
    In addition, Cosmos is an acronym for C# Open Source Managed Operating System. This is not Microsoft product.If the issue is related to Cosmos, it would be out of our support. Thanks for your understanding. And you need raise an issue at Cosmos site.
    Best regards,
    kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Go to current song (command L) is not working in itunes 11

    Go to current song (command L) is not working in itunes 11, anyone having the same issue?

    Thanks for figuring that out.
    I thought that command-L was working when I first switched to iTunes 11, but then it wasn't working anymore. That's the ticket: I changed the display to show the sidebar.
    Still, I'd like to be able to use the command-L feature whether I'm showing the sidebar or not.
    I'd also like it if iTunes would keep showing the currently playing song when in Grid or Artist view modes. It doesn't, so I have to keep using command-L to see the current song info.

  • Windows reports that the "USB-IF xHCI USB Host Controller" device is not working properly.

    I have been receiving the following error and instructions to fix it for a long time now, prior to updating to Windows 8.1:
    A device is not working properly
    Windows reports that the "USB-IF xHCI USB Host Controller" device is not working properly.
     Recommended solution to the problemUse Windows Update to check whether new device drivers are available. Proceed as follows:
    Open Device Manager
    Search in the device manager for the device whose driver you would like to update and double-click on the device name. You may first have to enable the "Show hidden devices" entry in the "View" menu.
    Switch to the Driver tab, click Update driver and follow the instructions
    When I follow the instructions and try to update the driver, I am told "The best driver software for your device is already installed."
    How do I update the driver to stop receiving the error?  
    This question was solved.
    View Solution.

    I have solved the initial problem.    
    I found the solution on the Forum at http://h10025.www1.hp.com/ewfrf/wc/document?docname=c03926756&tmp_task=solveCategory&cc=us&dlc=en&la...

  • FORM RUNTIME record=collect is not working.

    Hi
    FORM RUNTIME record=collect is not working which is set to user level.what to do?
    rgrds

    Pl post details of OS and EBS versions, along with the complete steps you took to enable this profile option. What does "not working" mean ?
    MOS Doc 438652.1 - R12: Forms Runtime Diagnostics (FRD), Tracing And Logging For Forms In Oracle Applications
    HTH
    Srini

  • Command-V will not work!

    I use command-c & command-v more than any other keys on my keyboard and all of a sudden, command-v will not work.  I think one of my children pushed something that disabled it, but I cannot get it to paste anything even though my other command options work.  When I press command-c the "Edit" tab highlights and when I press command-v the "Edit" tab also highlights but it does nothing. It does this in every program so it's not program specific. Wow...amazing how missing one function can disable a person so quickly!

    A couple of people who have had this problem found an SMC reset resolved it, which is odd as you wouldn't think there would be any connection. However it is easy enough to do.
    from;
    http://support.apple.com/kb/HT3964
    1.
    Shut down the computer.
    2.
    Unplug the computer's power cord.
    3.
    Wait fifteen seconds.
    4.
    Attach the computer's power cord.
    5.
    Wait five seconds, then press the power button to turn on the computer.
    If that does not work, then explore your idea that your kids may have re-assigned that function to something else. Ask them if they were doing anything like that.

  • Command-C is not working consistently to.

    Command-C is not working consistently for me. In multiple apps, but mostly in Word, I find myself pressing Command-C and then Command-V to paste and what I paste is the LAST thing I copied, not the most recent. I sometimes have to repeat teh sequence several times before it pastes the thing I want it to. Any suggestions? I tried searching for this problem, but didn't find any relevant discussions. Thanks!

    Hello eeinna,
    I was thinking it might be a good idea to reset the SMC and the PRAM on the computer. Here are the 2 articles for those processes:
    About NVRAM and PRAM
    http://support.apple.com/kb/ht1379
    And
    Intel-based Macs: Resetting the System Management Controller (SMC)
    http://support.apple.com/kb/ht3964
    If needed I would also recommend testing the issue in a new user, and following the directions in this article as well based on what you find.
    Isolating an issue by using another user account
    http://support.apple.com/kb/TS4053
    All the best,
    Sterling

  • How do I paste a screen capture? Edit-paste or command-V do not work.

    How do I paste a screen capture? Edit-paste or command-V do not work.  Tom

    how did you take the screenshot?
    if you used a key combo like command+shift+ a number it will be saved as a file on your desktop
    you need to add control* to whatever key combination you pressed to put it on your clipboard
    *sorry for saying shift before i meant control

  • Hi guys, I have a big problem! My bookmark shortcut entry(command D) does not work anymore and do you know by any changes how to undo resetting of Safari? Thnx a million :)

    Hi guys, I have a big problem! My bookmark shortcut entry(command D) does not work anymore and do you know by any changes how to undo resetting of Safari? Thnx a million

    Try troubleshooting the Safari .plist file.
    Quit Safari.
    Open a Finder window. Select your Home Folder in the Sidebar on the left. It has a small house icon. Then open the Library folder then the Preferences folder.
    Move the com.apple.Safari.plist file from the Preferences folder to the Desktop. Relaunch Safari. Try a bookmark.
    If that didn't help, check Safari / Preferences then select the Extensions tab. If you have any installed, turn that off, quit then relaunch Safari.
    If Extensions aren't the issue, reset Safari. From the menu bar click Safari / Reset Safari. Select the top 7 buttons, click Reset.

  • Shift-Command-R does not work anymore

    Hello all,
    I've noticed that the shortcut shift-command-r does not work anymore on my macbook pro. I used it for the calendar to refresh all calendars, and its also handy to open the reader in safari 5.
    When I open the keyboard viewer from the language and text menu I can see it when I press shift, then command but when I press "R" nothing changes, only shift+command stay highlighted. Other letters do work, so its a bit strange.
    Anyone know a solution for this?
    Thank you in advance

    Nope thats not the problem, the listening key is Esc. It is as if the keyboard does not register it when the R is pressed in combination with the shift and the command together. As I said, the keyboard viewer shows every keystroke except the shift-command-r combi.

  • I opened something that won't seem to quit. Command Q is not working and nothing else will, what else could I do to quit?

    I opened something that won't seem to quit. Command Q is not working and nothing else will. What could I do to quit?

    Nevermind! I right-clicked on the application and clicked force quit and it worked! That's all I had to do!

Maybe you are looking for

  • Outbound delivery enhancement

    Hi to all, I have a task to enhance Vl02n for outbound delivery. My requirement is to populate picking quantity using delivery quantity. Normally pick list OUTPUT TYPE EK00 will populate picking quantity. here one of my company's plant they are not d

  • Communication Channel monitoring in PI 7.1

    Hi Folks,     How to do the adapter monitering & Communication channel monitoring in teh sap PI 7.1. Regards,   Santosh

  • New version of iTunes has bug i.e. downloaded mp3 has very different title than original

    When I import the downloaded mp3 the title is very different and offensive words. What is up with this? thnx

  • Canvas size

    Hey guys! Just a quick question. I'm taking an intro Java course this semester and for one of our labs, we have to create a voting system that counts mouse clicks as votes. We're instructed to have at least 12 different candidates, but 12 boxes won't

  • How to trigger a hotsync from windows shortcut or on window start-up?

    The subject says it all, can we trigger a hotsync using a shortcut command or via a startup application? For the record, I have and use bluetooth for wireless sync. I am running Windows XP Post relates to: Treo 650 (Unlocked GSM)