Error return from Host Command

I use procedure below to run Win commands from stored procedure, Had found this last year by searching in this forum and it works fine.
However this procedure lacks facility to return if command was succesful on OS.
All I want is for Oracle to be able to pick up value of windows variable: %errorlevel% after command has been executed. If necessary I will include " echo %errorlevel% "in a batch file.
I am patching up somehow but it is too slow. I am currently saving %errorlevel% in a txt file and then using sqlldr to load value in an Oracle table. But this takes about 40 seconds to execute (time needed to open a new session each time).
I would rather have Java procedure pick up result of batch command directly.
James
CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED HOST AS
import java.lang.*;
import java.io.*;
public class Host
public static void executeCommand (String command, String etype) throws IOException
String[] wFullCommand = {"C:\\winnt\\system32\\cmd.exe", "/y", "/c", command};
String[] uFullCommand = {"/bin/sh", "-c", command};
if (etype.toUpperCase().equals("W"))
Runtime.getRuntime().exec(wFullCommand);
else if(etype.toUpperCase().equals("U+"))
Runtime.getRuntime().exec(uFullCommand);
else if(etype.toUpperCase().equals("U"))
Runtime.getRuntime().exec(command);
CREATE OR REPLACE PROCEDURE Host_Command_Proc
( p_command IN VARCHAR2,
p_etype IN VARCHAR2)
AS
LANGUAGE JAVA
NAME 'Host.executeCommand (java.lang.String, java.lang.String)';
/

I use procedure below to run Win commands from stored procedure, Had found this last year by searching in this forum and it works fine.
However this procedure lacks facility to return if command was succesful on OS.
All I want is for Oracle to be able to pick up value of windows variable: %errorlevel% after command has been executed. If necessary I will include " echo %errorlevel% "in a batch file.
I am patching up somehow but it is too slow. I am currently saving %errorlevel% in a txt file and then using sqlldr to load value in an Oracle table. But this takes about 40 seconds to execute (time needed to open a new session each time).
I would rather have Java procedure pick up result of batch command directly.
James
CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED HOST AS
import java.lang.*;
import java.io.*;
public class Host
public static void executeCommand (String command, String etype) throws IOException
String[] wFullCommand = {"C:\\winnt\\system32\\cmd.exe", "/y", "/c", command};
String[] uFullCommand = {"/bin/sh", "-c", command};
if (etype.toUpperCase().equals("W"))
Runtime.getRuntime().exec(wFullCommand);
else if(etype.toUpperCase().equals("U+"))
Runtime.getRuntime().exec(uFullCommand);
else if(etype.toUpperCase().equals("U"))
Runtime.getRuntime().exec(command);
CREATE OR REPLACE PROCEDURE Host_Command_Proc
( p_command IN VARCHAR2,
p_etype IN VARCHAR2)
AS
LANGUAGE JAVA
NAME 'Host.executeCommand (java.lang.String, java.lang.String)';
/

Similar Messages

  • Within SQL*Plus, get error code of host command

    Hello everyone,
    I am currently writing an SQL*Plus (Oracle 10g) that has a big logic and somewhere in the middle, I have to call a host command, which is an C++ function.
    I call it using
    SQL> HOST cd
    SQL> HOST cd bins
    SQL> HOST ./my_procedureBut, I need to get the return code of my procedure to see if it finished correctly?
    I checked [the manual|http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch4.htm#sthref883] but they don't say anything about return codes.
    When I try:
    SQL> host echo $?
    0It always returns 0, even if I SIGTERM or SIGKILL the child process. Anyone has an idea on how is it possible to retrieve the return code?
    Thanks

    user13117585 wrote:
    Hello guys and thanks for your answers.
    Let me tell you a little more about my problem... I have a 3 steps process. The first step is done in the database. It updates a few tables. Then, when that step successfully ends, I need to start a second step. That second step is done on the server where I have my SQL Plus session. Because I actually have 2 different machines. The first one is where the database is running and the second one where I have SQL Plus (Oracle client 10g) and the program that I have to start in this second step. Then, once this process is finished and his return code is 0, then I have to execute the third step in the database.
    Basically, I wanted to have something like:
    VARIABLE returnCode
    BEGIN
    :returnCode := some_package.do_step_1;
    -- do whatever I want with returnCode.
    EXCEPTION WHEN ...
    END;
    HOST execute_external_program
    BEGIN
    IF external_job_succeed THEN
    some_package.do_step_3
    END IF;
    EXCEPTION...
    END;
    /I wanted to use the Oracle Scheduler to create an EXTERNAL JOB. The problem is that the external program is not deployed on the same machine as the database.I know that on 11g, we have external remote jobs. But I'm on 10g and I have no agent on the server where the external program is. So, what are my options? SQL*Plus and the host command... Or I can also write a bash script to do that... Or any hight level programming language...
    Any other idea?
    Thanks again guys,move functionality of second step into PL/SQL procedure resident inside DB.

  • Error return from xmlparserBuffer

    Hi,
    I am in the process of converting the program from using IBM's
    XML C++ parser to Oracle's C++ parser. I am usnig the
    xmlparseBuffer to parse an in-memory message (with embedded
    DTD). The following error was returned:
    <1,1> LPX-00218: invalid character found
    How do we investigate the problem based on this return error ?
    Is there any other details that we (the application) need to
    know ?
    The same message was fine when using IBM's parser.
    Alex
    null

    Alex Liu (guest) wrote:
    : Hi,
    : I am in the process of converting the program from using IBM's
    : XML C++ parser to Oracle's C++ parser. I am usnig the
    : xmlparseBuffer to parse an in-memory message (with embedded
    : DTD). The following error was returned:
    : <1,1> LPX-00218: invalid character found
    : How do we investigate the problem based on this return error ?
    : Is there any other details that we (the application) need to
    : know ?
    : The same message was fine when using IBM's parser.
    : Alex
    The "<1,1>" is the line,char location of the offending
    character. If this doesn't help can you post the XML message you
    are trying to parse?
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

  • Error return from JOB_SUBMIT / SUBMIT when running with another  username

    I am trying to run the program RSBDCSUB after setting up a BDC session.
    Due to our authorisations in the production environment I have to run this program under a generic user (l_ernam) that has the authorisations as most users do not.
    Here is the code I am using:
    CALL FUNCTION 'JOB_OPEN'
    EXPORTING
    jobname = l_jobname
    IMPORTING
    JOBCOUNT = l_jobcount
    CHANGING
    RET = l_ret
    EXCEPTIONS
    CANT_CREATE_JOB = 1
    INVALID_JOB_DATA = 2
    JOBNAME_MISSING = 3
    OTHERS = 4
    Submit RSBDCSUB And Return
    User l_Ernam
    Via Job l_Jobname Number l_Jobcount
    with mappe = l_mappe .
    CALL FUNCTION 'JOB_CLOSE'
    EXPORTING
    jobcount = l_jobcount
    jobname = l_jobname
    STRTIMMED = 'X'
    EXCEPTIONS
    CANT_START_IMMEDIATE = 1
    INVALID_STARTDATE = 2
    JOBNAME_MISSING = 3
    JOB_CLOSE_FAILED = 4
    JOB_NOSTEPS = 5
    JOB_NOTEX = 6
    LOCK_FAILED = 7
    OTHERS = 8
    When I run this with a restricted user I get a return of 8 from the submit rsbdcsub - has anyone seen this before and can you offer advice on how to solve it?.
    I have also tried using JOB_SUBMIT with the following settings instead
    CALL FUNCTION 'JOB_SUBMIT'
    EXPORTING
    authcknam = l_ernam
    jobcount = l_jobcount
    jobname = l_jobname
    REPORT = l_report
    VARIANT = l_variant
    EXCEPTIONS
    BAD_PRIPARAMS = 1
    BAD_XPGFLAGS = 2
    INVALID_JOBDATA = 3
    JOBNAME_MISSING = 4
    JOB_NOTEX = 5
    JOB_SUBMIT_FAILED = 6
    LOCK_FAILED = 7
    PROGRAM_MISSING = 8
    PROG_ABAP_AND_EXTPG_SET = 9
    OTHERS = 10
    and in this case get a return of 3 (INVALID_JOBDATA) - anyone any ideas as to how to resolve this?.

    Hello Caroline,
    I do not know whether this issue is resolved at your end. I faced a similar problem and found that User Type for the generic user(l_Ernam) was the cause.
    We had initially defined User Type for the generic user as a 'Communication' and it was giving return code 8 after SUBMIT.
    We later changed the User Type to 'System' and it worked as intended. Job was created under the name of the user who executed the main program and the steps added using the generic user(l_Ernam).
    Please note that the user who is running the main program will need authorization to add job steps using the generic user.
    With Kind Regards,
    Jatin.

  • Error Returned From Bapi 'BAPI_INSPECTIONPLAN_CREATE'

    hi
    I am using 'BAPI_INSPECTIONPLAN_CREATE' for creating inspection plan in QM.the bapi is returning error"Inspection characteristic cannot be uniquely assigned to one operation".I am using one operation and one characteristic.I am also providing operation id in both the structures for operation and characterisitcs.Can anyone suggest what the problem is?
    Edited by: abapuser on Oct 10, 2009 5:12 AM

    Hi
    There is Activity Field in BAPI1012_OPR_C  sturcture...
    Similay there is also activity field  BAPI1012_CHA_C sturcture.....
    assign same Activity No in Both sturcture...
    Check this Link  https://wiki.sdn.sap.com/wiki/display/Snippets/ABAP%20Program%20to%20upload%20QM%20Inspection%20Plan%20Using%20BAPI
    Regards
    ABG...

  • Error return from sleep

    By putting my Mac to sleep for a long time.
    He does not return and a message in several languages with a gray screen.
    reporting to restart it by pressing the power button.
    Note: Even when fully charged battery
    Can anyone tell me how to fix it?

    You are getting a Kernel Panic. I'd recommend reading the following articles about them and how to trouble shoot them. If you cannot figure it out you need to contact an AASP for repair.
    http://www.thexlab.com/faqs/kernelpanics.html
    http://docs.info.apple.com/article.html?path=Mac/10.6/en/8965.html
    http://reviews.cnet.com/8301-13727_7-10344626-263.html?tag=mfiredir
    http://www.index-site.com/kernelpanic.html
    http://support.apple.com/kb/HT1392

  • Photo upload failed. Error returned from Facebook: An unexpected error has occurred. Please try your request later

    I've been getting this error everytime I try to upload photos to the Facebook publishing service has anyone encountered this before? upload through flicker is fine though

    I am getting the same error. Did you have any luck getting this to work?

  • Strange error returned from smbtree

    when i type smbtree i get this:
    WORKGROUP
    \\ONTHEFRIDGE LinkStation HLAN 250GB
    [b]cli_rpc_pipe_open_noauth: rpc_pipe_bind for pipe \srvsvc failed with error NT_STATUS_UNSUCCESSFUL[/b]
    \\ONTHEFRIDGE\applications LinkStation Share Folder
    \\ONTHEFRIDGE\pictures LinkStation Share Folder
    \\ONTHEFRIDGE\development LinkStation Share Folder
    \\ONTHEFRIDGE\database LinkStation Share Folder
    \\ONTHEFRIDGE\share LinkStation Share Folder
    \\ONTHEFRIDGE\info LinkStation information
    \\ONTHEFRIDGE\lp Network Printer for Windows
    what does this error mean?
    when i booted up arch today i found myself unable to ping/connect to this NAS - is the error related?
    thanks.

    never mind the second issue - i forgot to comment out eth0 in rc.conf as specified in the networkmanager wiki, after i did that + rebooted i can see the NAS fine as well as mount the shares using autofs.
    still getting that error with smbtree though.

  • Execution timed out error when running opcagt command on linux server with agent 11.12.009 installed

    Hi,
    Can anyone help me in the below issue.
    we have a Linux server with agent version 11.12.009 installed on it. when I try running opcragt command on it through are management server it gives the output that all agent components are running.
    but when I check the agent status or version through opcagt command on it it gives below error:
    ERROR:   (depl-86) Unable to execute command 'opcagt' on node
                       (depl-176) Message returned from host           
    (xpl-117) Timeout occurred while waiting for data.
    Below are the error lines that I got from system.txt file of the server:
    0: ERR: Fri Dec 19 09:09:38 2014: ovconfd (3708/140429034952480): (conf-180) Could not create messenger for configuration server 'ovconfd' and register its methods with the messenger object.
    1: ERR: Fri Dec 19 09:09:38 2014: ovconfd (3708/140429034952480): (xpl-89) write(11)[012C5430] failed.
    2: ERR: Fri Dec 19 09:09:38 2014: ovconfd (3708/140429034952480): (RTL-28) No space left on device
    Could anyone please let me know what can be the issue in this.
    Thanks,
    Akansha

    ORA-00600: internal error code, arguments: [kzxcInitLoadLocal-7], [942],
    [ORA-00942: table or view does not exist
    ORA-01403: no data found
    ORA-06512: at "SYS.DBMS_NETWORK_ACL_ADMIN", line 252
    ORA-06512: at line 36
    ORA-01403: no data foundWhat does this query return?
    SQL>  SELECT HOST, ACL
    FROM DBA_NETWORK_ACLS;Please see (Redefining a Network Access Control List Fails with ORA-1403 [ID 854083.1]).
    Thanks,
    Hussein

  • The Oracle Host command locks up XP occasionally after returning from LabVIEW app.

    Here's the scenario:
    The Oracle Host command calls a LabVIEW exe I created called LVSMS.exe. LVSMS than calls a Campbell Scientific app called SMS.exe that reads data from a storage device through the serial port COM1. SMS is closed by LabVIEW through the use of the SMS app pull down menu using keystrokes generated by LabVIEW keystroke commands. The data obtained by SMS initially gets stored to the local drive and is than copied to the network. LabVIEW than exits. Upon exiting LabVIEW and returning to Oracle control under the Oracle HOST command which is running in the background the whole time, WinXP will occasionally lock up.

    Thanks. WinXP only locks up when returning from LabVIEW to Oracle. The app is running on 12 computers 2,000 miles away. I found out that 4 of the 12 have locked up. I'm still working on determining if the lock up happens on 4 specific computers or if it's random. It never locks up on my development machine which is supposed to be identical to the machines at the other facility. I've changed timing intervals between when the Campbell SMS.exe program closes and when the LabVIEW LVSMS.exe program closes, and changed the WinXP performance properties. We're evaluating the results now; the process is used only once every 4 hours, so evaluation is slow. The Oracle HOST command appears to be the culprit. Haven't tried it from Win2000, but my WinXP development system
    works flawless.
    I'm hoping for information regarding the Oracle HOST command and WinXP. Posssibly what to tweak.
    Shooting in the Dark! Thanks for your response!

  • Error during Custom Build - error PRJ0019: A tool returned an error code from "Performing Custom Build Step"

    Hi All,
    I was trying to develop C++ web service using GShop with Visual Studio 2005.I refered a tutorial :-
    http://guruce.com/blogpost/hosting-webservices-on-windows-embedded-compact-windows-ce-using-gsoap .
    AS per the tutorial i proceeded. But, i stuck-up when making a custom build with Helloworld.wsdl.Here is the output :
    1>------ Rebuild All started: Project: HelloWorldWebService, Configuration: Debug Pocket PC 2003 (ARMV4) ------
    1>Deleting intermediate and output files for project 'HelloWorldWebService', configuration 'Debug|Pocket PC 2003 (ARMV4)'
    1>Performing Custom Build Step
    1>'D:\Test' is not recognized as an internal or external command,
    1>operable program or batch file.
    1>Project : error PRJ0019: A tool returned an error code from "Performing Custom Build Step"
    1>Build log was saved at "file://d:\Test Code\HelloWorldWebService\HelloWorldWebService\Pocket PC 2003 (ARMV4)\Debug\BuildLog.htm"
    1>HelloWorldWebService - 1 error(s), 0 warning(s)
    ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
    As given in the tutorial i kept my custom build command line as : -
    $(SolutionDir)\gsoap-2.8\gsoap\bin\win32\wsdl2h.exe -s $(InputPath) -o $(ProjectDir)$(InputName).h
    and outpouts : $(InputName).h
    I kept GSHOP in the project filder :- D:\Test Code\HelloWorldWebService
    Kindly help.
    Jyotiranjan

    Hi Jyotiranjan,
    I’m glad to hear that you got it working.
    Thank you for sharing your solutions
    experience here. It will be very beneficial for other community members who
    have similar questions.
    Best regards,
    Lucy
    Lucy Liu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • How to simulate HOST command from DB Procedure

    Hi,
    I'm using Oracle 9.2 database on Win2000 PC.
    I need to start .bat file from a database procedure. More generaly how to simulate HOST command that I'm using from Forms6i.
    Thanks,

    Thanks for the reply,
    But, I am able to successffuly execute HOST from SQL+
    only from the PC where the database is, not from the client. My .bat file is on the server side.
    From the procedure I was not able to run it in either cases
    Procedure TEST
    IS
    BEGIN
    EXECUTE IMMEDIATE 'host C:\MYBATCHFILE.BAT'
    END;
    returns ORA-00900 INVALID SQL STATMENT
    with EXECUTE IMMEDIATE '$ C:\MYBATCHFILE.BAT' returns Invalid Character Error.
    BR,

  • Java running host command - moved from PL/SQL forums

    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE 11.1.0.6.0 Production
    TNS for HPUX: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production
    Hi,
    I am not familiar with Java setting in Oracle
    I have a a stored procedure that call a java program to execute host command like
    ssh user1@localhost '/home/user1/someprogram'
    if we execute this directly using PuTTY
    we can do the following with no problem
    su - oracle
    ssh user1@localhost '/home/user1/someprogram'
    but when we execute the stored procedure,
    we have to do
    */usr/bin/ssh* user1@localhost '/home/user1/someprogram'
    does anybody where to set the path or environment to make the java know the path correctly.
    thanks
    ps:. this is happen after we recently upgraded our Oracle from 9.2.0.8 to 11.1.0.6

    pgoel wrote:
    You said,
    a stored procedure that call a java program to execute host command like ssh user1@localhost '/home/user1/someprogram'SP -calls> Java Program (JP) -runs> ssh user1@localhost '/home/user1/someprogram'. is that right? I presume locahost is a database server.correct
    this is the stored procedure
    CREATE OR REPLACE PROCEDURE host_command (p_command  IN  VARCHAR2)
      AS LANGUAGE JAVA
      NAME 'Host.executeCommand (java.lang.String)';and this is the java
    create or replace and compile java source named host as
    import java.io.*;
    public class Host {
      public static void executeCommand(String command) {
        try {
          String[] finalCommand;
          if (isWindows()) {
            finalCommand = new String[4];
            // Use the appropriate path for your windows version.
            finalCommand[0] = "C:\\windows\\system32\\cmd.exe";  // Windows XP/2003
            //finalCommand[0] = "C:\\winnt\\system32\\cmd.exe";  // Windows NT/2000
            finalCommand[1] = "/y";
            finalCommand[2] = "/c";
            finalCommand[3] = command;
          else {
            finalCommand = new String[3];
            finalCommand[0] = "/bin/sh";
            finalCommand[1] = "-c";
            finalCommand[2] = command;
          final Process pr = Runtime.getRuntime().exec(finalCommand);
          pr.waitFor();
          new Thread(new Runnable(){
            public void run() {
              BufferedReader br_in = null;
              try {
                br_in = new BufferedReader(new InputStreamReader(pr.getInputStream()));
                String buff = null;
                while ((buff = br_in.readLine()) != null) {
                  System.out.println("Process out :" + buff);
                  try {Thread.sleep(100); } catch(Exception e) {}
                br_in.close();
              catch (IOException ioe) {
                System.out.println("Exception caught printing process output.");
                ioe.printStackTrace();
              finally {
                try {
                  br_in.close();
                } catch (Exception ex) {}
          }).start();
          new Thread(new Runnable(){
            public void run() {
              BufferedReader br_err = null;
              try {
                br_err = new BufferedReader(new InputStreamReader(pr.getErrorStream()));
                String buff = null;
                while ((buff = br_err.readLine()) != null) {
                  System.out.println("Process err :" + buff);
                  try {Thread.sleep(100); } catch(Exception e) {}
                br_err.close();
              catch (IOException ioe) {
                System.out.println("Exception caught printing process error.");
                ioe.printStackTrace();
              finally {
                try {
                  br_err.close();
                } catch (Exception ex) {}
          }).start();
        catch (Exception ex) {
          System.out.println(ex.getLocalizedMessage());
      public static boolean isWindows() {
        if (System.getProperty("os.name").toLowerCase().indexOf("windows") != -1)
          return true;
        else
          return false;
    Where does Java Progarm reside? On the database server filesystem OR within the Database itslef. within the Database itslef.
    Edited by: HGDBA on Mar 11, 2011 1:50 PM

  • Exchange 2007 Active sync error An HTTP 500 response was returned from Unknown.

    I tested using Microsoft Remote connectivity analyzer tool and getting following error. Please help me to fix the issue
    An ActiveSync session is being attempted with the server.
    Errors were encountered while testing the Exchange ActiveSync session.
    Additional Details
    Elapsed Time: 394 ms.
    Test Steps
    Attempting to send the OPTIONS command to the server.
    Testing of the OPTIONS command failed. For more information, see Additional Details.
    Additional Details
    An HTTP 500 response was returned from Unknown. Headers received: Content-Length: 3745 Cache-Control: private Content-Type: text/html; charset=utf-8 Date: Wed, 05 Mar 2014 18:09:36 GMT Server: Microsoft-IIS/6.0 X-AspNet-Version: 2.0.50727 X-Powered-By:
    ASP.NET HTTP Response Headers: Content-Length: 3745 Cache-Control: private Content-Type: text/html; charset=utf-8 Date: Wed, 05 Mar 2014 18:09:36 GMT Server: Microsoft-IIS/6.0 X-AspNet-Version: 2.0.50727 X-Powered-By: ASP.NET
    Elapsed Time: 394 ms.

    Hi Shadab,
    I have recreated the active sync virtual directory but didnt fix the issue. I have set the logging level for active sync to high and getting below event logs in apps log
    Event Type: Warning
    Event Source: ASP.NET 2.0.50727.0
    Event Category: Web Event 
    Event ID: 1310
    Date: 08/03/2014
    Time: 17:50:29
    User: N/A
    Computer: HP-01
    Description:
    Event code: 3008 
    Event message: A configuration error has occurred. 
    Event time: 08/03/2014 17:50:29 
    Event time (UTC): 08/03/2014 17:50:29 
    Event ID: 5ff3055057084fb49978442a86866e50 
    Event sequence: 15 
    Event occurrence: 14 
    Event detail code: 0 
    Application information: 
        Application domain: /LM/W3SVC/1/ROOT/Microsoft-Server-ActiveSync-1-130384798306406250 
        Trust level: Full 
        Application Virtual Path: /Microsoft-Server-ActiveSync 
        Application Path: C:\Program Files\Microsoft\Exchange Server\ClientAccess\sync\ 
        Machine name: HP-01 
    Process information: 
        Process ID: 1972 
        Process name: w3wp.exe 
        Account name: NT AUTHORITY\SYSTEM 
    Exception information: 
        Exception type: ConfigurationErrorsException 
        Exception message: Could not load file or assembly 'Microsoft.Exchange.Clients.Owa' or one of its dependencies. The system cannot find the file specified. (C:\Program Files\Microsoft\Exchange Server\ClientAccess\Owa\web.config line 64) (C:\Program
    Files\Microsoft\Exchange Server\ClientAccess\Owa\web.config line 64) 
    Request information: 
        Request URL: https://mail.itech-it.co.uk:443/Microsoft-Server-ActiveSync/default.eas 
        Request path: /Microsoft-Server-ActiveSync/default.eas 
        User host address: 157.56.138.141 
        User:  
        Is authenticated: False 
        Authentication Type:  
        Thread account name: NT AUTHORITY\SYSTEM 
    Thread information: 
        Thread ID: 8 
        Thread account name: NT AUTHORITY\SYSTEM 
        Is impersonating: False 
        Stack trace:    at System.Web.Configuration.HttpModuleAction.get_Entry()
       at System.Web.Configuration.HttpModulesSection.CreateModules()
       at System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers)
       at System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context)
       at System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context)
       at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
    Custom event details: 
    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
    Thanks!
    Rajeesh

  • 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

Maybe you are looking for

  • Lync 2013 Enterprise load balancing on the front end and edge pool

    Hi, I am setting up a Lync 2013 Enterprise deployment consisting of a Front End pool (x2 FE servers) and an Edge pool (x2 Edge servers).  I'm seeing some conflicting advice regarding load balancing using hardware or DNS for the front end and the edge

  • Graphic Design w/ iMac

    I'm a print designer who recently ordered a 24-in iMac with the GeForce 8800 graphics card & now having a bit of panic regarding color fidelity/calibration w/ that gloss screen. I currently use a 23-in Cinema Display & calibrate with an EyeOne. Any o

  • How do u find itunes files on the computer

    how do u find itune files on the computer mine wont load right

  • Why does my iPod Touch clock go back 1 hour?

    I have a 2nd generation iPod Touch. It's been working fine but lately my iPod's clock would go back one hour. I changed the clock back to the real time then it would go back maybe fifteen minutes later. After I changed it again, it was fine for the d

  • [ANN] VTD-XML Version 1.8 Released

    Version 1.8 of VTD-XML is now released. The new features are: • XMLModifier is a easy to use class that takes advantage of the incremental update capability offered by VTD-XML •This release added encoding support for iso-8859-2~10, windows code page