Invoke External programs from inside App Server

hi,
How can I invoke an external program from a session bean (or from an MDB)?
Can I use Runtime.exec() directly from a bean?
If so, are there any security considerations?
thanks,
Sundar

I found this article rather helpful:
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

Similar Messages

  • Invoke external programs from Java

    I am running a Java program which will be used to invoke other command line programs in Windows.
    However, it seems Java has problem in checking the termination state of command line programs in Windows. In the example below, the pp.waitFor() will keep waiting even if the command completed execution. I try the same code below in Unix and it works without problem. Is there anyone has come across the same problem before ?
    I am using JDK1.4.1.
    try {
    Process pp = null;
    BufferedInputStream bi = null;
    pp=Runtime.getRuntime().exec("dir");
    bi = new BufferedInputStream(pp.getInputStream());
    pp.waitFor();
    int size=bi.available();
    while (size>0) {
    byte[] buf = new byte[size];
    bi.read(buf);
    System.out.println(new String(buf));
    size=bi.available();
    } catch (Exception e) {
    System.out.println("Exceptions !!!");
    System.out.println(e.getMessage());

    I found this article rather helpful:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • Startrfc - SAP utility to invoke ABAP programs from External systems

    We have used the startrfc uitlity that comes along with the SAP Presentation CD. This is bundled with the SAP RFC SDK kit. The startrfc utility can be used to invoke ABAP programs from external systems or servers.
    When using the startrfc from the SAP server using the parameters
    startrfc -h 10.60.0.31 -s 01 -c 100 -u USERNAME -p PASS -F <Function Module> -E TPPARAM=\usr\sap\trans\bin\tp_domain_<SID>.PFL -T LIST,300,w=list.txt
    the desired results are achieved.
    However when using the same startrfc with the exact parameters from another server we get the message " Incorrect user or password". If we use the SAP GUI from this server to connect to the SAP server using the same username and password we are able to connect to the SAP system.
    Has anyone encountered any similar issues with Startrfc? Any suggestion will be appreciated.
    Thanks,
    ~Nilesh

    Hi NIlesh,
    Did you check that the password and user ID entered are in capita letters?
    Thanks and Regards,
    RK

  • Running an External Program from Batch on Windows Server 2008R2 Failing

    Hi,
    I am trying to run an external program from a batch job and it is failing with this error message:
    Ext. prog.: ERROR: Input redirection is not supported, exiting the process immediately.
    Ext. prog.: External program terminated with exit code 1
    The program I am trying to run is:  timeout
    This command works on the OS: timeout -t 30
    I have setup the step to look like this:
    Under External Program:
    -Name: timeout
    -Parameter: -t 30
    I have also tried:
    -Name: timeout -t -30
    -Parameter:
    I am running ECC 6.04 on top of Windows Server 2008R2 with SQL Server 2008R2. 
    When we were running in Server 2003 on ECC 6.0 I was able to use the Sleep program just fine in the same manner.  I have found out that sleep is not available in server 2008.  It was replaced with timeout.
    After an update to EHP4 and moving to Windows Server 2008R2, Is there any pre-work that needs to be done on the SAP or Windows side before we can run external programs?
    Thank you,
    Neil

    > SAPService<SID> and <SID>ADM both have Administrator rights for the server.
    > That means they should have full access.
    No - this is no more true like that since Windows 2008, it's a bit more complex:
    http://en.wikipedia.org/wiki/User_Account_Control
    > Where would you setup the permission/policy to "interact with the desktop"?
    Add the policy using group policy editor (gpedit.msc)
    Markus

  • How can I execute an external program from within a button's event handler?

    I am using Tomcat ApacheTomcat 6.0.16 with Netbeans 6.1 (with the latest JDK/J2EE)
    I need to execute external programs from an event handler for a button on a JSF page (the program is compiled, and extremely fast compared both to plain java and especially stored procedures written in SQL).
    I tried what I'd do in a standalone program (as shown in the appended code), but it didn't work. Instead I received text saying the program couldn't be found. This error message comes even if I try the Windows command "dir". I thought with 'dir' I'd at least get the contents of the current working directory. :-(
    I can probably get by with cgi on Apache's httpd server (or, I understand tomcat supports cgi, but I have yet to get that to work either), but whatever I do I need to be able to do it from within the button's event handler. And if I resort to cgi, I must be able to maintain session jumping from one server to the other and back.
    So, then, how can I do this?
    Thanks
    Ted
    NB: The programs that I need to run do NOT take input from the user. Rather, my code in the web application processes user selections from selection controls, and a couple field controls, sanitizes the inoputs and places clean, safe data in a MySQL database, and then the external program I need to run gets safe data from the database, does some heavy duty number crunching, and puts the output data into the database. They are well insulated from mischeif.
    NB: In the following array_function_test.pl was placed in the same folder as the web application's jsp pages, (and I'd tried WEB-INF - with the same result), and I DID see the file in the application's war file.
            try {
                java.lang.ProcessBuilder pn = new java.lang.ProcessBuilder("array_function_test.pl");
                //pn.directory(new java.io.File("K:\\work"));
                java.lang.Process pr = pn.start();
                java.io.BufferedInputStream bis = (java.io.BufferedInputStream)pr.getInputStream();
                String tmp = new String("");
                byte b[] = new byte[1000];
                int i = 0;
                while (i != -1) {
                    bis.read(b);
                    tmp += new String(b);
                getSelectionsDisplayTextArea().setText(getSelectionsDisplayTextArea().getText() + "\n\n" + tmp);
            } catch (java.io.IOException ex) {
                getSelectionsDisplayTextArea().setText(getSelectionsDisplayTextArea().getText() + "\n\n" + ex.getMessage());
            }

    Hi Fonsi!
    One way to execute an external program is to use the System Exec.vi. You find it in the functions pallet under Communication.
    /Thomas

  • How to call Operating System commands / external programs from within APEX

    Hi,
    Can someone please suggest how to call Operating Systems commands / external programs from within APEX?
    E.g. say I need to run a SQL script on a particular database. SQL script, database name, userid & password everything is available in a table in Oracle. I want to build a utility in APEX where by when I click a button APEX should run the following
    c:\oracle\bin\sqlplusw.exe userud/password@database @script_name.sql
    Any pointers will be greatly appreciated.
    Thanks & Regards,

    Hi Guys,
    I have reviewed the option of using scheduler and javascript and they do satisfy my requirements PARTIALLY. Any calls to operating system commands through these features will be made on the server where APEX is installed.
    However, here what I am looking at is to call operating systems programs on client machine. For example in my APEX application I have constructed the following strings of commands that needs to be run to execute a change request.
    sqlplusw.exe user/password@database @script1.sql
    sqlplusw.exe user/password@database @script2.sql
    sqlplusw.exe user/password@database @script3.sql
    sqlplusw.exe user/password@database @script4.sql
    What I want is to have a button/link on the APEX screen along with these lines so that when I click that link/button this entire line of command gets executed in the same way it would get executed if I copy and paste this command in the command window of windows.
    Believe me, if I am able to achieve what I intend to do, it is going to save a lot of our DBAs time and effort.
    Any help will be greatly appreciated.
    Thanks & Regards,

  • How to copy a Module Pool Program from one SAP server to another SAP server

    Hi Experts,
    My requirement is to copy some Module pool programs from one SAP server to another SAP server which do not have any link.
    Please advise on this.
    Regards
    Dipak

    put all relevant objects inside a transport request and release it. this will generate two files, a control file in /usr/sap/trans/cofiles/ and a data file in /usr/sap/trans/data/
    you can take these two files, zip'em up and e.g. email them to your destination. There they have to be put into the same directories of that other server and can then be added to the import queue and finally imported.
    These last steps would usually be done by an administrator.
    Both systems should be on the same release, as far as I know.
    Cheers
    Thomas

  • CL_GUI_PDFVIEWER and files from the App server

    Hi,
    I would liek to use the class CL_GUI_PDFVIEWER  to read files from the app server (transaction AL11) and then to present them.
    it is easy to use the local machine files.
    how can I use the method open_document with a file from there?
    Thanks,
    Itay

    Thanks for the help.
    I tried what you suggested but I get a dump for some reason.
    Can you help?
    This is the dump:
    Exception condition "SYSTEM_FAILURE" raised.
         Program                                      SAPLOLEA                    
         Include                                      LOLEAU10                    
         Row                                          358                         
         Module type                                  (FUNCTION)                  
         Module Name                                  AC_FLUSH_CALL_INTERNAL      
    This is the program:
    REPORT zpdftest .
    DATA: g_html_viewer     TYPE REF TO cl_gui_html_viewer,
          my_main_container TYPE REF TO cl_gui_custom_container,
          entry1(100) TYPE c,
          entry2(100) TYPE c.
    DATA: okcode TYPE sy-ucomm,
          gt_pdf TYPE STANDARD TABLE OF string,
          wa_pdf TYPE string,
          g_url(2048)  TYPE c
    START-OF-SELECTION.
      SET SCREEN 100.
    *&      Module  pbo_0100  OUTPUT
    MODULE pbo_0100 OUTPUT.
      SET PF-STATUS 'STATUS100'.
      SET TITLEBAR  'TITLE100'.
      IF my_main_container IS INITIAL.
        CREATE OBJECT my_main_container
          EXPORTING
            container_name = 'CUSTOM_CNTL'
          EXCEPTIONS
            cntl_error     = 1
            OTHERS         = 2.
        CHECK sy-subrc IS INITIAL.
        CREATE OBJECT g_html_viewer
          EXPORTING
            parent             = my_main_container
          EXCEPTIONS
            cntl_error         = 1
            cntl_install_error = 2
            dp_install_error   = 3
            dp_error           = 4
            OTHERS             = 5
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        DATA: lv_filename TYPE rlgrap-filename.
        lv_filename = '/PBMGUS/UXA/ABAP/TEST.PDF'.
        OPEN DATASET lv_filename FOR INPUT
                     IN BINARY MODE
        WHILE sy-subrc IS INITIAL.
          READ DATASET  lv_filename  INTO wa_pdf.
          IF NOT sy-subrc IS INITIAL.
            EXIT.
          ENDIF.
          APPEND wa_pdf TO gt_pdf.
        ENDWHILE.
        CLOSE DATASET lv_filename.
        CALL METHOD g_html_viewer->load_data
          EXPORTING
            type                 = 'application'
            subtype              = 'pdf'
          IMPORTING
            assigned_url         = g_url
          CHANGING
            data_table           = gt_pdf
          EXCEPTIONS
            dp_invalid_parameter = 1
            dp_error_general     = 2
            cntl_error           = 3
            OTHERS               = 4
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        CALL METHOD g_html_viewer->show_url
          EXPORTING
            url                    = g_url
          EXCEPTIONS
            cntl_error             = 1
            cnht_error_not_allowed = 2
            cnht_error_parameter   = 3
            dp_error_general       = 4
            OTHERS                 = 5
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ENDIF.
    ENDMODULE.                 " pbo_0100  OUTPUT
    *&      Module  pai_0100  INPUT
    MODULE pai_0100 INPUT.
      CASE okcode.
        WHEN 'BACK'.
          LEAVE to screen 0.
        WHEN OTHERS.
          CALL METHOD cl_gui_cfw=>dispatch.
      ENDCASE.
      CLEAR okcode.
    ENDMODULE.                 " pai_0100  INPUT

  • Run Threaded application inside App server

    Hi,
    My Java application is a standalone Java application. It is running from command prompt.It does not use any application/web server.
    This application contains a good number of Threaded application.
    Now the problem comes in to the picture is that --- We have to deploy this application inside the Application server.
    My question is ------- Can I deploy this Java Thread related application inside app server.
    what are the issues I will face to run a multithreaded application in side App server.
    /sh

    yes, you continue..

  • Invoking C programs from Weblogic

    OS: Solaris8
    Appserver:weblogic 8.1 sp2
    JRE:JRE1.4.1_05
    Issue: While invoking C executable programs from java The server hangs intermittently in Production. Here are the Thread Dump and Code
    Solution is highly appreciated
    Thread Dump
    ===========
    Full thread dump Java HotSpot(TM) Server VM (1.4.1_05-b01 mixed mode):
    "Thread-22933" daemon prio=5 tid=0xe9b9e8 nid=0x8699 runnable [e6701000..e67019bc]
         at java.io.FileInputStream.readBytes(Native Method)
         at java.io.FileInputStream.read(FileInputStream.java:191)
         at java.lang.UNIXProcess$DeferredCloseInputStream.read(UNIXProcess.java:219)
         at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:408)
         at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:448)
         at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:182)
         - locked <f1eef700> (a java.io.InputStreamReader)
         at java.io.InputStreamReader.read(InputStreamReader.java:167)
         at java.io.BufferedReader.fill(BufferedReader.java:136)
         at java.io.BufferedReader.readLine(BufferedReader.java:299)
         - locked <f1eef700> (a java.io.InputStreamReader)
         at java.io.BufferedReader.readLine(BufferedReader.java:362)
         at com.fedex.meteor.util.RunAsync$OutErrReader.run(RunAsync.java:153)
         at java.lang.Thread.run(Thread.java:536)
    "Thread-22934" daemon prio=5 tid=0x1b3b28 nid=0x8698 runnable [e6801000..e68019bc]
         at java.io.FileInputStream.readBytes(Native Method)
         at java.io.FileInputStream.read(FileInputStream.java:191)
         at java.lang.UNIXProcess$DeferredCloseInputStream.read(UNIXProcess.java:219)
         at java.io.BufferedInputStream.read1(BufferedInputStream.java:220)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:277)
         - locked <f1ef57f0> (a java.io.BufferedInputStream)
         at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:408)
         at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:448)
         at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:182)
         - locked <f1ef5868> (a java.io.InputStreamReader)
         at java.io.InputStreamReader.read(InputStreamReader.java:167)
         at java.io.BufferedReader.fill(BufferedReader.java:136)
         at java.io.BufferedReader.readLine(BufferedReader.java:299)
         - locked <f1ef5868> (a java.io.InputStreamReader)
         at java.io.BufferedReader.readLine(BufferedReader.java:362)
         at com.fedex.meteor.util.RunAsync$OutErrReader.run(RunAsync.java:153)
         at java.lang.Thread.run(Thread.java:536)
    "process reaper" daemon prio=5 tid=0xe7e3f8 nid=0x8697 runnable [e6901000..e69019bc]
         at java.lang.UNIXProcess.waitForProcessExit(Native Method)
         at java.lang.UNIXProcess.access$1000(UNIXProcess.java:20)
         at java.lang.UNIXProcess$3.run(UNIXProcess.java:84)
    "ExecuteThread: '5' for queue: 'JMS.TimerClientPool'" daemon prio=5 tid=0xcfb2a8 nid=0x41 in Object.wait() [e6a01000..e6a019bc]
         at java.lang.Object.wait(Native Method)
         - waiting on <f17bb610> (a weblogic.kernel.ExecuteThread)
         at java.lang.Object.wait(Object.java:426)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:145)
         - locked <f17bb610> (a weblogic.kernel.ExecuteThread)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:164)
    "ExecuteThread: '4' for queue: 'JMS.TimerClientPool'" daemon prio=5 tid=0xa0d458 nid=0x40 in Object.wait() [e6b01000..e6b019bc]
         at java.lang.Object.wait(Native Method)
         - waiting on <f17bb690> (a weblogic.kernel.ExecuteThread)
         at java.lang.Object.wait(Object.java:426)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:145)
         - locked <f17bb690> (a weblogic.kernel.ExecuteThread)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:164)
    "ExecuteThread: '3' for queue: 'JMS.TimerClientPool'" daemon prio=5 tid=0xa6e4f0 nid=0x3f in Object.wait() [e6c01000..e6c019bc]
         at java.lang.Object.wait(Native Method)
         - waiting on <f17bb710> (a weblogic.kernel.ExecuteThread)
         at java.lang.Object.wait(Object.java:426)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:145)
         - locked <f17bb710> (a weblogic.kernel.ExecuteThread)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:164)
    "ExecuteThread: '2' for queue: 'JMS.TimerClientPool'" daemon prio=5 tid=0xd412e8 nid=0x3e in Object.wait() [e6d01000..e6d019bc]
         at java.lang.Object.wait(Native Method)
         - waiting on <f17bb790> (a weblogic.kernel.ExecuteThread)
         at java.lang.Object.wait(Object.java:426)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:145)
         - locked <f17bb790> (a weblogic.kernel.ExecuteThread)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:164)
    "ExecuteThread: '1' for queue: 'JMS.TimerClientPool'" daemon prio=5 tid=0xf5e5e8 nid=0x3d in Object.wait() [e6e01000..e6e019bc]
         at java.lang.Object.wait(Native Method)
         - waiting on <f17bb810> (a weblogic.kernel.ExecuteThread)
         at java.lang.Object.wait(Object.java:426)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:145)
         - locked <f17bb810> (a weblogic.kernel.ExecuteThread)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:164)
    "ExecuteThread: '0' for queue: 'JMS.TimerClientPool'" daemon prio=5 tid=0x10f2c58 nid=0x3c in Object.wait() [e6f01000..e6f019bc]
         at java.lang.Object.wait(Native Method)
         - waiting on <f17bb890> (a weblogic.kernel.ExecuteThread)
         at java.lang.Object.wait(Object.java:426)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:145)
         - locked <f17bb890> (a weblogic.kernel.ExecuteThread)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:164)
    "ExecuteThread: '2' for queue: 'weblogic.socket.Muxer'" daemon prio=5 tid=0x2df4c8 nid=0x3b waiting for monitor entry [e7001000..e70019bc]
         at weblogic.socket.PosixSocketMuxer.processSockets(PosixSocketMuxer.java:91)
         - waiting to lock <f149b368> (a java.lang.String)
         at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:32)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    "ExecuteThread: '1' for queue: 'weblogic.socket.Muxer'" daemon prio=5 tid=0xa0ca98 nid=0x3a in Object.wait() [e7101000..e71019bc]
         at java.lang.Object.wait(Native Method)
         - waiting on <f1499358> (a [Lweblogic.socket.PosixSocketInfo$FdStruct;)
         at java.lang.Object.wait(Object.java:426)
         at weblogic.socket.PosixSocketMuxer.processSockets(PosixSocketMuxer.java:95)
         - locked <f1499358> (a [Lweblogic.socket.PosixSocketInfo$FdStruct;)
         - locked <f149b368> (a java.lang.String)
         at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:32)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    "ExecuteThread: '0' for queue: 'weblogic.socket.Muxer'" daemon prio=5 tid=0x888688 nid=0x39 waiting for monitor entry [e7201000..e72019bc]
         at weblogic.socket.PosixSocketMuxer.processSockets(PosixSocketMuxer.java:91)
         - waiting to lock <f149b368> (a java.lang.String)
         at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:32)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    "ListenThread.Default" prio=5 tid=0x391fe0 nid=0x38 runnable [e7301000..e73019bc]
         at java.net.PlainSocketImpl.socketAccept(Native Method)
         at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353)
         - locked <f14a1588> (a java.net.PlainSocketImpl)
         at java.net.ServerSocket.implAccept(ServerSocket.java:448)
         at java.net.ServerSocket.accept(ServerSocket.java:419)
         at weblogic.socket.WeblogicServerSocket.accept(WeblogicServerSocket.java:24)
         at weblogic.t3.srvr.ListenThread.accept(ListenThread.java:739)
         at weblogic.t3.srvr.ListenThread.run(ListenThread.java:292)
    "Thread-6" daemon prio=5 tid=0xe85358 nid=0x37 in Object.wait() [e7781000..e77819bc]
         at java.lang.Object.wait(Native Method)
         - waiting on <f133ce00> (a java.util.TaskQueue)
         at java.util.TimerThread.mainLoop(Timer.java:429)
         - locked <f133ce00> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:382)
    "ExecuteThread: '0' for queue: 'JMS.TimerTreePool'" daemon prio=5 tid=0xe85810 nid=0x36 in Object.wait() [e7881000..e78819bc]
         at java.lang.Object.wait(Native Method)
         - waiting on <f13cb200> (a weblogic.jms.backend.BETimerTree)
         at weblogic.jms.backend.BETimerTree.execute(BETimerTree.java:146)
         - locked <f13cb200> (a weblogic.jms.backend.BETimerTree)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    "Thread-5" prio=5 tid=0xf901a0 nid=0x35 in Object.wait() [e8201000..e82019bc]
         at java.lang.Object.wait(Native Method)
         - waiting on <f12da390> (a java.util.TaskQueue)
         at java.util.TimerThread.mainLoop(Timer.java:429)
         - locked <f12da390> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:382)
    "weblogic.health.CoreHealthMonitor" daemon prio=5 tid=0x56f560 nid=0x34 waiting on condition [e8401000..e84019bc]
         at java.lang.Thread.sleep(Native Method)
         at weblogic.t3.srvr.CoreHealthMonitorThread.run(CoreHealthMonitorThread.java:127)
    "Thread-4" prio=5 tid=0x250aa0 nid=0x33 in Object.wait() [e8501000..e85019bc]
         at java.lang.Object.wait(Native Method)
         - waiting on <f1023e90> (a java.util.TaskQueue)
         at java.util.TimerThread.mainLoop(Timer.java:429)
         - locked <f1023e90> (a java.util.TaskQueue)
         at java.util.TimerThread.run(Timer.java:382)
    "VDE Transaction Processor Thread" prio=2 tid=0x67c288 nid=0x31 in Object.wait() [e8601000..e86019bc]
         at java.lang.Object.wait(Native Method)
         - waiting on <f0f07f98> (a com.octetstring.vde.backend.standard.TransactionProcessor)
         at java.lang.Object.wait(Object.java:426)
         at com.octetstring.vde.backend.standard.TransactionProcessor.waitChange(TransactionProcessor.java:356)
         - locked <f0f07f98> (a com.octetstring.vde.backend.standard.TransactionProcessor)
         at com.octetstring.vde.backend.standard.TransactionProcessor.run(TransactionProcessor.java:212)
    "ExecuteThread: '2' for queue: 'weblogic.admin.RMI'" daemon prio=5 tid=0x4e9be0 nid=0x30 in Object.wait() [e8701000..e87019bc]
         at java.lang.Object.wait(Native Method)
         - waiting on <f0e7c9e8> (a weblogic.kernel.ExecuteThread)
         at java.lang.Object.wait(Object.java:426)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:145)
         - locked <f0e7c9e8> (a weblogic.kernel.ExecuteThread)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:164)
    "ExecuteThread: '1' for queue: 'weblogic.admin.RMI'" daemon prio=5 tid=0x375dd0 nid=0x2f in Object.wait() [e8801000..e88019bc]
         at java.lang.Object.wait(Native Method)
         - waiting on <f0e7ca68> (a weblogic.kernel.ExecuteThread)
         at java.lang.Object.wait(Object.java:426)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:145)
         - locked <f0e7ca68> (a weblogic.kernel.ExecuteThread)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:164)
    "ExecuteThread: '0' for queue: 'weblogic.admin.RMI'" daemon prio=5 tid=0x375c38 nid=0x2e in Object.wait() [e8901000..e89019bc]
         at java.lang.Object.wait(Native Method)
         - waiting on <f0e7cae8> (a weblogic.kernel.ExecuteThread)
         at java.lang.Object.wait(Object.java:426)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:145)
         - locked <f0e7cae8> (a weblogic.kernel.ExecuteThread)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:164)
    "ExecuteThread: '1' for queue: 'weblogic.admin.HTTP'" daemon prio=5 tid=0x501998 nid=0x2d in Object.wait() [e8a01000..e8a019bc]
         at java.lang.Object.wait(Native Method)
         - waiting on <f0e7cb68> (a weblogic.kernel.ExecuteThread)
         at java.lang.Object.wait(Object.java:426)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:145)
         - locked <f0e7cb68> (a weblogic.kernel.ExecuteThread)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:164)
    "ExecuteThread: '0' for queue: 'weblogic.admin.HTTP'" daemon prio=5 tid=0x3756a0 nid=0x2c in Object.wait() [e8b01000..e8b019bc]
         at java.lang.Object.wait(Native Method)
         - waiting on <f0e7cbe8> (a weblogic.kernel.ExecuteThread)
         at java.lang.Object.wait(Object.java:426)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:145)
         - locked <f0e7cbe8> (a weblogic.kernel.ExecuteThread)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:164)
    "weblogic.security.SpinnerRandomSource" daemon prio=5 tid=0x500068 nid=0x2b in Object.wait() [e8c01000..e8c019bc]
         at java.lang.Object.wait(Native Method)
         - waiting on <f0e7ccb0> (a java.lang.Object)
         at java.lang.Object.wait(Object.java:426)
         at weblogic.security.SpinnerRandomBitsSource.run(SpinnerRandomBitsSource.java:60)
         - locked <f0e7ccb0> (a java.lang.Object)
         at java.lang.Thread.run(Thread.java:536)
    "weblogic.time.TimeEventGenerator" daemon prio=9 tid=0x2a6a48 nid=0x2a in Object.wait() [e8d01000..e8d019bc]
         at java.lang.Object.wait(Native Method)
         - waiting on <f0e7cd20> (a weblogic.time.common.internal.TimeTable)
         at weblogic.time.common.internal.TimeTable.snooze(TimeTable.java:271)
         - locked <f0e7cd20> (a weblogic.time.common.internal.TimeTable)
         at weblogic.time.common.internal.TimeEventGenerator.run(TimeEventGenerator.java:118)
         at java.lang.Thread.run(Thread.java:536)
    "ExecuteThread: '4' for queue: 'weblogic.kernel.System'" daemon prio=5 tid=0x79dd30 nid=0x29 in Object.wait() [e8e01000..e8e019bc]
         at java.lang.Object.wait(Native Method)
         - waiting on <f0e7cd98> (a weblogic.kernel.ExecuteThread)
         at java.lang.Object.wait(Object.java:426)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:145)
         - locked <f0e7cd98> (a weblogic.kernel.ExecuteThread)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:164)
    "ExecuteThread: '3' for queue: 'weblogic.kernel.System'" daemon prio=5 tid=0x2bb1a0 nid=0x28 in Object.wait() [e8f01000..e8f019bc]
         at java.lang.Object.wait(Native Method)
         - waiting on <f0e7ce18> (a weblogic.kernel.ExecuteThread)
         at java.lang.Object.wait(Object.java:426)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:145)
         - locked <f0e7ce18> (a weblogic.kernel.ExecuteThread)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:164)
    "ExecuteThread: '2' for queue: 'weblogic.kernel.System'" daemon prio=5 tid=0x2f7df0 nid=0x27 in Object.wait() [e9001000..e90019bc]
         at java.lang.Object.wait(Native Method)
         - waiting on <f0e7ce98> (a weblogic.kernel.ExecuteThread)
         at java.lang.Object.wait(Object.java:426)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:145)
         - locked <f0e7ce98> (a weblogic.kernel.ExecuteThread)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:164)
    "ExecuteThread: '1' for queue: 'weblogic.kernel.System'" daemon prio=5 tid=0x2f7a40 nid=0x26 in Object.wait() [e9101000..e91019bc]
         at java.lang.Object.wait(Native Method)
         - waiting on <f0e7cf18> (a weblogic.kernel.ExecuteThread)
         at java.lang.Object.wait(Object.java:426)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:145)
         - locked <f0e7cf18> (a weblogic.kernel.ExecuteThread)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:164)
    "ExecuteThread: '0' for queue: 'weblogic.kernel.System'" daemon prio=5 tid=0x2f6e90 nid=0x25 in Object.wait() [e9201000..e92019bc]
         at java.lang.Object.wait(Native Method)
         - waiting on <f0e7cf98> (a weblogic.kernel.ExecuteThread)
         at java.lang.Object.wait(Object.java:426)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:145)
         - locked <f0e7cf98> (a weblogic.kernel.ExecuteThread)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:164)
    "ExecuteThread: '24' for queue: 'weblogic.kernel.Default'" daemon prio=5 tid=0x2f62e0 nid=0x24 in Object.wait() [e9301000..e93019bc]
         at java.lang.Object.wait(Native Method)
         - waiting on <f0e7d018> (a weblogic.kernel.ExecuteThread)
         at java.lang.Object.wait(Object.java:426)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:145)
         - locked <f0e7d018> (a weblogic.kernel.ExecuteThread)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:164)
    "ExecuteThread: '23' for queue: 'weblogic.kernel.Default'" daemon prio=5 tid=0x2f5760 nid=0x23 in Object.wait() [e9401000..e94019bc]
         at java.lang.Object.wait(Native Method)
         - waiting on <f0e7d098> (a weblogic.kernel.ExecuteThread)
         at java.lang.Object.wait(Object.java:426)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:145)
         - locked <f0e7d098> (a weblogic.kernel.ExecuteThread)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:164)
    "ExecuteThread: '22' for queue: 'weblogic.kernel.Default'" daemon prio=5 tid=0x79a978 nid=0x22 in Object.wait() [e9501000..e95019bc]
         at java.lang.Object.wait(Native Method)
         - waiting on <f0e7d118> (a weblogic.kernel.ExecuteThread)
         at java.lang.Object.wait(Object.java:426)
         at weblogic.kernel.ExecuteThread.waitForRequest(ExecuteThread.java:145)
         - locked <f0e7d118> (a weblogic.kernel.ExecuteThread)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:164)
    "ExecuteThread: '21' for queue: 'weblogic.kernel.Default'" daemon prio=5 tid=0x293028 nid=0x21 runnable [e9600000..e96019bc]
         at java.net.SocketInputStream.socketRead0(Native Method)
         at java.net.SocketInputStream.read(SocketInputStream.java:129)
         at oracle.net.ns.Packet.receive(Unknown Source)
         at oracle.net.ns.DataPacket.receive(Unknown Source)
         at oracle.net.ns.NetInputStream.getNextPacket(Unknown Source)
         at oracle.net.ns.NetInputStream.read(Unknown Source)
         at oracle.net.ns.NetInputStream.read(Unknown Source)
         at oracle.net.ns.NetInputStream.read(Unknown Source)
         at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:931)
         at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:893)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:375)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1983)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1141)
         - locked <f1aed700> (a oracle.jdbc.ttc7.TTC7Protocol)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2149)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2032)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2894)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:608)
         - locked <f1ef9ab0> (a oracle.jdbc.driver.OracleCallableStatement)
         - locked <f1aec400> (a oracle.jdbc.driver.OracleConnection)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:684)
         - locked <f1ef9ab0> (a oracle.jdbc.driver.OracleCallableStatement)
         - locked <f1aec400> (a oracle.jdbc.driver.OracleConnection)
         at weblogic.jdbc.wrapper.PreparedStatement.execute(PreparedStatement.java:68)
         at com.fedex.meteor.ejb.sessions.updatebeans.updatesession.UpdateSessionBean.getFirstLogin(UpdateSessionBean.java:1243)
         at com.fedex.meteor.ejb.sessions.updatebeans.updatesession.UpdateSessionBean_zsi8w_EOImpl.getFirstLogin(UpdateSessionBean_zsi8w_EOImpl.java:3114)
         at com.fedex.meteor.servlet.MaintenanceUpdateServlet.modifyLogOutTimeCard(MaintenanceUpdateServlet.java:2594)
         at com.fedex.meteor.servlet.MaintenanceUpdateServlet.doPost(MaintenanceUpdateServlet.java:477)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    =================================================
    CODE
    =====
    import java.io.File;
    import java.io.InputStream;
    import java.io.IOException;
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import org.apache.log4j.Logger;
    import com.fedex.meteor.data.*;
    public class RunAsync {
    //=============
    // Logger
    //=============
    private static final Logger m_logger = Logger.getLogger(RunAsync.class);
    //==============================
    // Class Variables
    //==============================
    private static final String CLASSNAME = "RunAsync:";
    private StringBuffer errorMessage = null;
    Process pro = null;
    InputStream error = null;
    InputStream output = null;
    public RunAsync()
    logDebug(" Instantiating RunAsync!!");
    public void executeCall(String args[]) throws Exception{
    errorMessage = new StringBuffer();
    try {
    boolean status = false;
    if (args.length > 1) {
    String prg = "";
    for(int i =0;i<args.length;i++)
    prg = prg+" "+args;
    logDebug(" C Command: "+prg);
    pro = Runtime.getRuntime().exec(args);
    else {
    logDebug(" C Command: "+args[0]);
    pro = Runtime.getRuntime().exec(args[0]);
    error = pro.getErrorStream();
    output = pro.getInputStream();
    Thread err = new Thread(new OutErrReader(error));
    Thread out = new Thread(new OutDebugReader(output));
    out.start();
    err.start();
    int exitValue = pro.waitFor();
    logDebug(" Program's exit value:"+exitValue);
    if(exitValue!=0)
    logError("IOException: "+errorMessage);
    throw new Exception("Process has failed: "+errorMessage);
    catch(java.io.IOException e) {
    logError("IOException");
    reset(pro,output,error);
    throw new IOException(CLASSNAME+" Process failed : "+e.getMessage());
    catch(java.lang.InterruptedException e) {
    logError("InterruptedException");
    reset(pro,output,error);
    throw new InterruptedException(CLASSNAME+" Process failed: "+e.getMessage());
    finally
    reset(pro,output,error);
    public void executeCallWithEnvironment(String[] args,String[] env) throws Exception{
    errorMessage = new StringBuffer();
    try {
    boolean status = false;
    logDebug(" C Commandd: "+args[0]);
    logDebug(" Environment:"+env[0]);
    pro = Runtime.getRuntime().exec(args);
    error = pro.getErrorStream();
    output = pro.getInputStream();
    Thread err = new Thread(new OutErrReader(error));
    Thread out = new Thread(new OutDebugReader(output));
    out.start();
    err.start();
    int exitValue = pro.waitFor();
    logDebug(" Program's exit value:"+exitValue);
    if(exitValue!=0)
    logError("IOException: "+errorMessage);
    throw new Exception("Process has failed: "+errorMessage);
    catch(java.io.IOException e) {
    logError("IOException");
    reset(pro,output,error);
    throw new IOException(CLASSNAME+" Process failed : "+e.getMessage());
    catch(java.lang.InterruptedException e) {
    e.printStackTrace();
    logError("InterruptedException");
    reset(pro,output,error);
    throw new InterruptedException(CLASSNAME+" Process failed: "+e.getMessage());
    finally
    reset(pro,output,error);
    * This method closes the database connection before the bean is garbage
    * collected.
    protected void finalize()
    throws Throwable
    logDebug("finalize() is being called: ");
    reset(pro,output,error);
    private void reset(Process process,InputStream output, InputStream error)
    try
    if(error != null)
    error.close();
    if(output != null)
    output.close();
    if(process != null)
    logDebug("Sub Process is being destroyed after usage!");
    process.destroy();
    process = null;
    }catch(Exception ex)
    logError("Error in resetting the Process"+ex.getMessage());
    process = null;
    class OutErrReader implements Runnable {
    InputStream is;
    public OutErrReader(InputStream is) {
    this.is = is;
    public void run() {
    try {
    BufferedReader in = new BufferedReader(new InputStreamReader(is));
    String temp = null;
    while((temp = in.readLine()) != null) {
    logError(temp);
    errorMessage.append(temp+"\n");
    is.close();
    catch(Exception e) {
    logError(e.getMessage());
    if(errorMessage != null)
    errorMessage.append(e.getMessage());
    class OutDebugReader implements Runnable {
    InputStream is;
    public OutDebugReader(InputStream is) {
    this.is = is;
    public void run() {
    try {
    BufferedReader in = new BufferedReader(new InputStreamReader(is));
    String temp = null;
    while((temp = in.readLine()) != null) {
    logDebug(temp);
    is.close();
    catch(Exception e) {
    logError(e.getMessage());
    //======================
    // Logging Methods
    //======================
    // Method: logError()
    * This method will log error messages using the log4J API.
    protected static void logError(String strMessage)
    getLogger().error(CLASSNAME+"Error: [" + strMessage + "]");
    // Method: logWarning()
    * This method will log warning messages using the log4J API.
    protected static void logWarning(String strMessage)
    getLogger().warn(CLASSNAME+"Warning: [" + strMessage + "]");
    // Method: logInfo()
    * This method will log informational messages using the log4J API.
    protected static void logInfo(String strMessage)
    getLogger().info(CLASSNAME+strMessage);
    // Method: logDebug()
    * This method will log informational messages using the log4J API.
    protected static void logDebug(String strMessage)
    getLogger().debug(CLASSNAME+strMessage);
    // Method: getLogger()
    * This method will log informational messages using the log4J API.
    protected static Logger getLogger()
    return m_logger;

    ]Hey
    Can u please tell me how to invoke a C function using BPEL....I mean how can i build a webservice using my C function.I appreciate ur help
    Swethaa...

  • How can I run an external program from a PLSQL procedure?

    Is there a package to run an external program from PLSQL? or is there another way to do that?
    thanks.

    here there is an example about how a PL/SQL procedure can
    work with an external C program.
    http://download-east.oracle.com/docs/cd/A87860_01/doc/appdev.817/a76936/dbms_pi2.htm#1003384
    Apart from that you have Java Stored Procedures option
    to carry out your task.
    Java Stored Procedures Developer's Guide Contents / Search / Index / PDF
    http://download-east.oracle.com/docs/cd/B10501_01/java.920/a96659.pdf
    Joel P�rez

  • Standalone webcache or Web cache from Oracle Apps Server 10.1.2.0.2?

    Hi
    I am installing web cache on two servers in web tier and J2EE server (with OHS) on another two servers in apps tier. Should I use standalone webcache or install from Oracle Apps Server package? If I choose Oracle Apps Server package, I have to disable Home, HTTP components. But it is DCM managed. Any suggestions?
    And should I deploy my OHS servers on web cache servers in the web tier? In future we want to expand J2EE installation, we will deploy Portal with SSO, OID etc.
    Regards
    Shen Jie

    Shen Jie,
    Please review the Enterprise Deployment to see what are the best architectures.
    Hope this helps.
    Deepak

  • TS1702 can not download any program from the App and I can not update any program downloaded in advance .. Seems to me just to wait and remain so throughout the day .. I want a solution to this problem

    can not download any program from the App and I can not update any programdownloaded in advance .. Seems to me just to wait and remain so throughout the day .. I want a solution to this problem 

    Any solution!!!!!!!

  • Finder from inside apps...

    Hi! I know this is going to be a really easy answer for someone, but my Google searches are not turning up anything so here goes:
    When I open files from inside apps, like photoshop for example, they sort by "Today, 2013, 2012, etc" no matter what! I cannot see all my files unless I use a finder window. It's unbearably annoying. How do I stop it!?
    Thanks!!!
    -Shaun

    Hey doublehead,
    Thanks for the question. It sounds like you wish to change the order that your files are arranged in a Finder window. You can do so from the arrange menu:
    Mac Basics: The Finder
    http://support.apple.com/kb/HT2470
    […] 4. Item Arrangement button - In any view, you can organize the window by clicking the item arrangement button and choosing one of the ways to group items.
    Thanks,
    Matt M.

  • Unable supplying parameter like 'PASSWORD' in external program from SAP

    HI GURUS,
    I am unable supplying parameter like 'PASSWORD' in external program from SAP.
    Is it possible to achieve this? IF it is then how could we suplly Password information to External Program for loging in.
    Thanks
    SANKU.

    Which way you are supplying password ?
    Programtically  ? or ?
    Kanagaraja L
    Edited by: Kanagaraja  Lokanathan on Jul 17, 2009 3:26 PM

Maybe you are looking for