Runtime is not working

Hi all,
I am trying to run SQLLDR command using java. i am using Runtime class to run the command. but the command is not executing. After executing the system get hanged. please suggest me to solve this.
My code is,
Runtime rt = Runtime.getRuntime();
String s="SQLLDR sam/sam@samdev control=C:\\SAP_HR\\sample.ctl";
               System.out.println("got the SQL Command "+s);
               Process proc = rt.exec(s);
               // Referred in the NET               
               InputStream stderr = proc.getErrorStream();
     InputStreamReader isr = new InputStreamReader(stderr);
     BufferedReader br = new BufferedReader(isr);
     String line = null;
     System.out.println("<ERROR>"); ---------------------> it is getting hanged at this end.
     while ( (line = br.readLine()) != null)
     System.out.println(line);
     System.out.println("</ERROR>");           
               int exitVal = proc.waitFor();
               System.out.println("Finished Loading Data using SQLLDR");
               }catch(Throwable t){
                    t.printStackTrace();
               }

Visit the link, read the article, understand it, and apply what you understand. The code you posted does not use any of the idioms which the article explains, and it might actually work if it did. At least it would be easier to debug.

Similar Messages

  • When Export ssrs Report to CSV file runtime filters not working

    The Runtime Filters not working when Export SSRS Report to CSV format

    Hi PatilPriti,
    As for my understanding, the filter worked fine when you preview the report,
    but it did not work when you export the report to CSV format. I tried to export the report to CSV file on my side, and the data was shown as expected. I guess the issue is due to the parameter or filter. please try to export to Excel format to test again
    and make sure you created the filter correctly. Please refer to the following
    blog about how to add a filter in SSRS:
    http://arcanecode.com/2010/07/12/adding-filter-parameters-to-sql-server-2008-reporting-services-reports/
    If the problem is not resolved, i would appreciate it if you could give us
    detailed description of your problem.
    It’s better to provide the table structure and some sample data, it will help us move more quickly toward a solution.
    Thanks, 
    Wendy Fu

  • Runtime process not working from servlet container

              Hello,
              I'm executing a standalone executable from the Runtime class, using exec.
              Process process = Runtime.getRuntime().exec(buildCommand.toString());
              There are threads monitoring the input and error streams. This same use of the Runtime
              class is used at least 5 other times in the servlet with no problems. The same method
              is also called from a JUnit test and also executes properly.
              The method called from the servlet however does not work. the executable it's calling
              is a C++ executable that uses an ODBC alias set up on the machine to connect to the
              Oracle database. For some reason the ODBC layer throws an exception while trying
              to connect when the executable is called from the servlet, rather than called from
              the command line or JUnit test.
              Does the servlet have a different environment than a client call from the JUnit test?
              Would it not have access to ODBC drivers it needs? Could there be some sort of security
              setting that the servlet container is set too low?
              Any information would be terrific.
              Thanks,
              Sara
              

    Thanks!
    I borrowed a DVD drive and everything installed correctly.

  • Runtime does not work!

    Hi, this is urgent. Process didn't run but exit code is ok. could somebody please help me?
    my code looks something like this:
    public boolean run() {
    try {
    Runtime rt = Runtime.getRuntime();
    Process p = rt.exec("c:\\app.exe" + " " + arg);
    int exitCode = p.waitFor();
    if (exitCode != 0) {
    //print error msg
    catch (Exception e) {
    e.printStackTrace();
    return true;
    "c:\\app.exe" exists from previous checks in the code, and exitCode is 0 (normal execution) because there's no error message, but then I know "c:\\cmd" has not been run because it should produce another file ("c:\\app.exe" works properly) and the file doesn't exist after execution. (another indication that app.exe has not been run is that it takes around 10 seconds to complete, but my java program finishes early.)
    Could someone please help me find out what the problem can be? The code seems straight foward though. BTW, I'm running on windows XP

    try getting the output on your console
    or
    try
    Process p = rt.exec("start c:\\app.exe" + " " + arg);
    or
    Process p = rt.exec("start cmd /c c:\\app.exe" + " " + arg);

  • Problems after new installation (Runtime workbench not working as expected)

    Hello
    We have just finished installing new ECC & Netweaver in our company.
    On PI side, I created a sample file (Payload) and did IR and ID configuration
    and saw the payload getting picked up from the source directory and getting
    posted in the target directory successfully.
    However, when I went to Runtime Workbench and clicked on the Adapter and
    File adapter to see the messages, I dont see anything. It is just blank.
    However, when I click on Display it shows integration server and 4 items under it. 4th item is Adapter Engine which has a RED button next to it, indicating there is some problem.
    When I click on the Adapter button to see the list of adapters, i see again a red button next JPR. However, File doesn't show any error message. But when I double click on File adapter, instead of showing successful messages, it shows a blank screen as if no file has been transmitted.
    Also down at the bottom of the Runtime Work Bench Screen
    Self-Tast Status and
    Are Communication Channels without errors
    also show a Red buttons next to it.
    By double clicking on 'Are communication Channels without errors - Details", I get the following error message:
    1 communication channels have an error status0 communication channels inactive0 communication channels not providing any status information0 adapters logging communication-channel-independent processing errors .
    This is a fresh new install and any feedback on this will be greatly appreciated.
    Thanks

    Not answered completely. But still closing to make room for new questions

  • Why runtime.exec() not working?

    I just want to run "ls" i unix on my JSPs.
    Process process;
    Runtime rt = Runtime.getRuntime();
    String line;
    process = rt.exec("ls");
    Here's the error message.
    java.io.IOException: ls: not found

    On my Linux
    rt.exec("ls");
    does work.
    If, on your system,
    which ls
    does not return an external executable like /bin/sl, try this command line:
    import java.io.*;
    public class Ls{
      public static void main(String[] args){
        String line = null;
        try{
          Runtime rt = Runtime.getRuntime();
          Process prc = rt.exec(new String[]{"sh", "-c", "ls"});
          InputStream is = prc.getInputStream();
          BufferedReader br = new BufferedReader(new InputStreamReader(is));
          while((line = br.readLine()) != null){
            System.out.println(line);
          prc.waitFor();
        catch (Exception e){
          e.printStackTrace();
    }

  • Java console runtime parameter not working

    I'm tring to increase the size of memory available to my applet by adding a java runtime parameter in my Java Console. The runtime parameter is: Xmx512M
    Which changes the deployment.properties file to:
    #deployment.properties
    #Mon Nov 22 14:46:50 GMT-06:00 2004
    deployment.browser.vm.iexplorer=true
    deployment.browser.vm.mozilla=false
    deployment.version=1.5.0
    deployment.console.startup.mode=SHOW
    deployment.system.tray.icon=true
    deployment.capture.mime.types=true
    deployment.browser.path=C\:\\PROGRA~1\\MOZILL~1\\FIREFOX.EXE
    #Java Web Start jre's
    #Mon Nov 22 14:46:50 GMT-06:00 2004
    #Java Plugin jre's
    #Mon Nov 22 14:46:50 GMT-06:00 2004
    deployment.javapi.jre.1.5.0.args=Xmx512M
    deployment.javapi.jre.1.5.0.osname=Windows
    deployment.javapi.jre.1.5.0.osarch=x86
    deployment.javapi.jre.1.5.0.path=C\:\\Program Files\\Java\\jre1.5.0
    But when I run the applet I find that my max memory has not been changed from the default (65MB). I can thell this by outputting the max memory:
    System.out.println("Memory Max = " + Runtime.getRuntime().maxMemory());
    This line results in the output:
    Memory Max = 66650112
    So this output makes me believe that the runtime parameter is not being set correctly . When I run my applet in an executable jar locally (java -Xmx1024M -jar myApplet.jar) it sets the runtime parameter fine and memory is increased as expected.
    Am I doing something wrong in the Java Control panel? Is my syntax incorrect?

    I had no problem using IE6 or mozilla 1.7.3
    html file
    <OBJECT ID="SUN" WIDTH=500 HEIGHT=120 CLASSID="CLSID:8AD9C840-044E-11d1-B3E9-00805F499D93">
    <PARAM NAME="code" value="Test.class">
    </OBJECT>class file
    public class Test extends java.applet.Applet {
        public void init() {
              System.out.println("Memory Max = " + Runtime.getRuntime().maxMemory());
    }deployment props
    #deployment.properties
    #Fri Nov 19 10:38:15 CET 2004
    deployment.browser.vm.iexplorer=false
    deployment.browser.vm.mozilla=true
    deployment.version=1.5.0
    deployment.console.startup.mode=SHOW
    deployment.system.tray.icon=true
    deployment.capture.mime.types=true
    deployment.browser.path=C\:\\Program Files\\Internet Explorer\\iexplore.exe
    #Java Web Start jre's
    #Fri Nov 19 10:38:15 CET 2004
    #Java Plugin jre's
    #Fri Nov 19 10:38:15 CET 2004
    #deployment.javapi.jre.1.5.0.args=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
    deployment.javapi.jre.1.5.0.args=-Xmx512M
    deployment.javapi.jre.1.5.0.osname=Windows
    deployment.javapi.jre.1.5.0.osarch=x86
    deployment.javapi.jre.1.5.0.path=C\:\\Program Files\\Java\\jre1.5.0Output of the applet:
    Memory Max = 532742144

  • JRun Runtime.getRuntime() not working?

    I have a JSP page which invokes a batch file on OS (Win2000). Everything worked find on Tomcat but does not do anything on JRun.
    Is there any JRun security setting or strange method of calling an outside process in JRun which might be different from Tomcat.
    I would really appreciate a response,
    Musaddiq

    Actually, no exception is thrown. It just does not do anything. Looking around to forum, i am realizing that there may be a difference in how to pass paramters to command line from Win Pro vs. Win 2000 Server.
    I am still waiting to find out the answer.
    Thanks for the reply.
    Musaddiq

  • Runtime error R6025 message after log on to Vista - Flash Card not working

    Hi
    I'm a newbie & would appreciate any advice.
    I am getting a runtime error message R6025 when I log on to Windows Vista.
    When I click out of the box I then get a message saying Toshiba Flash Card not working.
    I cancel that and my laptop is ok except I don't know if the flashcard is working or not because I don't know what it does.
    Sorry if I sound thick
    Thanks
    Neelie

    Hi
    I found this MS knowledge base article:
    +Description of the R6025 run-time error in Visual C++\+
    http://support.microsoft.com/kb/125749
    But I doubt this description would be useful for you or anyone here. It describes this error in Visual C++ and this is programming language.
    However, I think you should simply reinstall the Value Added Package which you could download firstly from the Toshiba European page.
    At first you have to remove the old Value Added Package from the system, then reboot the notebook and follow with new VAP installation.
    Bye

  • Runtime.exe() is not working from within a jar file.

    Hi All,
    I have a jar file which have classes and a package in it.
    One of these classes is calling another class which is present in the package.
    The code i am using it is as follows:
    Runtime r=Runtime.getRuntime();
    Process p=null;
    p=r.exec("java deep.slideshow.PlayShow");It is working fine when i am executing it without making jar file.
    But when i make a jar file of all these things , this exec() is not working.
    I have tried a lot.
    If any body has any idea suggest me.
    Thanks

    thanks a lot for your reply friend.
    I tried the same you tell me to do by using the cmd;
    java -cp my.jar package.class  And then tried to make the jar file with the help of eclipse,
    after adding my jar file into classpath of my project in eclipse.
    Its working fine on my local system.
    But when i put this jar file on some other system it does not call my jar file(obviously bcz it will not the find the jar file according to the classpath set on my local system. )
    Is there any way that i can keep this jar into my project and then can give the classpath dynamically
    so that it can pick the file from my project automatically.?
    Later on i will pack this whole thing into a full jar file and it will work on a single click.
    Is it possible or not ?
    Please suggest me.
    Thanks

  • Hi, I have a MAC (version 10.10.2) and installed Creative Suite one year ago. Now I want to open the Illustrator, but it does not work. It says I should install old Java SE 6-Runtime-Version to open „Adobe Illustrator CS6". Where can I find it? Thanks for

    Hi, I have a MAC (version 10.10.2) and installed Creative Suite one year ago. Now I want to open the Illustrator, but it does not work. It says I should install old Java SE 6-Runtime-Version to open „Adobe Illustrator CS6“. Where can I find it? Thanks for your answer! Jana

    Prompted to install Java SE 6 Runtime | Mac OS 10.9
    Mylenium

  • I attempted to perform the itunes update on two different PCs and itunes will no longer open and I received a message to reinstall itunes. The reinstall did not work and I now receive a Runtime error message (R6034) re: library loading incorrectly. Help?

    I attempted to perform the itunes update on two different PCs. Itunes will no longer open and prompted me to reinstall itunes.  The reinstall did not work after several attempts and I received an error: "Runtime error R6034. An application has made an attempt to load the C Runtime library incorrectly. Please contact the application's support team for more information."  Has anyone else had this issue? How can I resolve it?

    I've been having the same exact problem this morning, and from the looks of it a lot of other people are posting about this issue, so I don't know if it's maybe something wrong with the download but I'm just relieved that it seems to be that instead of a corruption issue with my windows installation.  I'm just wondering how long this will take to be resolved.

  • Runtime error in Elements 9, editor will not work

    I have Windows Vista. The organizer seems to work fine.  But right after a photo opens in editor, a window appears saying:  Microsoft Visual C++,    Runtime Library.  It says Runtime Error!  Program....PhotoshopElementsEditor.exe  This application has requested the Runtime to terminate it in an unusual way.  Please contact the applications support team for more information.
    A couple days ago the computer shut down unexpectedly (my computer has been doing that alot in the last month, there was also a power outage due to a storm).  I tried restarting the computer, closing and restarting Elements, updating Elements (it did not need it) I also tried restoring the system to a restore point where Elements was working fine and that did not work. 
    Would really appreciate any help.  Thanks so much.

    Oh, great...an "unknown" faulting module!
    There's not a lot to go on, so I can only offer a couple of general troubleshooting suggestions:
    Re-set the Editor's Preferences by holding down your Ctrl+Alt+Shift keys when launching the Editor and keep them held down until you see the prompt asking if you want to delete the Preferences.  Answer "Yes" and they will be re-built.  You may have to minimize any open windows in order to see that prompt.
    If you have manually enabled the TWAIN interface for scanning, see this Adobe document:
    http://kb2.adobe.com/cps/408/kb408850.html
    See this Adobe document for general troubleshooting steps:
    http://helpx.adobe.com/x-productkb/global/troubleshoot-system-errors-freezes-windows.html
    Ken

  • Oracle Clinical - install.sh not working - says not found or Java runtime error.

    install.sh not working - need help
    Hi all,
    OS Solaris 8. Sun Sparc 20 - 256 MB 9.1 GB. I am using csh for this install as instructed for the user OPAPPS.
    I have installed Oracle 8.1.6 Rel 2 on the SUN Sparc. Everything is fine and a customised DB has been created. Now I
    have to install an Oracle application on the same server. I have a working knowledge of Unix but I don't know scripting.
    I logged in as OPAPPS as required. (.chsrc). I have set the path with all possible directories and made it a member of
    group DBA as requested.
    I put the CD in the CDROM and then cd /cdrom
    # install.sh
    BUT I get this message: install.sh not found.
    install.sh is there on the CD. This is the contents of install.sh from the CD
    #!/bin/sh
    os=`uname | tr A-A a-z`
    case "$os" in
    sunos) platform=solaris
    hp-ux) platform=hp-ux
    osf1) platform=decunix
    esac
    #The environment variable $SRCHOME cannot be set during installation
    unset SRCHOME
    unset SHLIB_PATH
    CMDDIR=`dirname $0`
    if [ "CMDDIR" = "." ]; then
    CMDDIR=`pwd`;
    fi
    # Replace relatove path with fully qualified path
    if [ ! "`echo $CMDDIR|grep '^/'`" ]; then
    CMDDIR=`pwd`/$CMDDIR;
    fi
    if [ x${PATH} != x ] ; then
    PATH=$PATH:/usr/bin: /bin
    export PATH
    else
    PATH=/usr/bin:/bin
    fi
    cd $CMDDIR/$platform/Disk1/install/$platform
    ./runinstaller $*
    directory structure on CD
    -r-xr-xr-x 1 root sys 638 Aug 23 2000 install.sh
    dr-xr-xr-x solaris
    dr-xr-xr-x hpunix
    dr-xr-xr-x decunix
    dr-xr-xr-x nls732
    solaris/disk1/install/solaris and the file
    -r-xr-xr-x runinsta.
    -r-xr-xr-x oraparm.ini
    dr-xr-xr-x images
    d .
    d ..
    Would anybody know why I get install.sh NOT found when it is there?. This executabel is on the CD. I am not sure why it gives
    a java runtime error message when it is OK. Remember, I have already installed Oracle 8i using the same environment with the existing java runtime .
    Thanks for your help.

    Hi,
    I am installing Oracle clinical 4.5.x.
    I need to know whether both the Database server and application server for Oracle Clinical can be installed on same server(windows 2000 server).
    Both of them are installed on windows platform.
    It seems that u have tried the single node installation.
    So,please give all the possible details regarding the single node installation for oracle clinical no matter what platform it is.
    Please reply me as soon as possible, its urgent.
    Thanking u in advance.

  • Maintain order at runtime not working for MDM in PI 7.31

    Hi All
    I have and one outbound and 5 inbound interfaces all going to MDM system
    first one is import and next 4 are webservice calls to MDM multiple times but the mapping changes for each.
    So I kept 5 different operation mappings for 5 inbound interfaces and maintain order at runtime in receiver interfaces
    The first one import if fails in MDM due to value exception or any exception, MDM PI adapter is not catching that and the other interfaces are executed
    So the maintain order at runtime is not useful in my case. do we know why is this behaviour? can we make sure the import is successfully completed before the next interface execution using maintain order at runtime?
    thx
    mike

    Hi Mike,
    I'm not sure if this is still relevant or even up to date. The MDM adapter is/was nothing more than the old file integration with enhanced audit log. So, unfortunately, it will tell you all about the import successes and errors in the audit log, but it will not change the message status accordingly. Regarding message status it still behaves as if it was a file receiver adapter stopping transaction at file system level. In my opinion, this is not very helpful, and scenarios like yours cannot be implemented using standard tools. You can't even use the standard monitor to check whether normal distributions worked. You'd have to check the audit log of every message. Or check the file system directly or read the MDM log, as before.
    I hope they improved that in the meantime.
    Regards,
    Jörg

Maybe you are looking for

  • How can I download my purchased copy of Photoshop Elements 11?

    My laptop was completly new formatted and installed. I saved my downloaded photoshop element 11 version on a sd card. Now I try to reinstall photoshop element 11. But I get at the end the message: error occured elements cannot be installed! What do i

  • Cannot print to Adobe PDF from InDesign CS4 under Snow Leopard (10.6.2)

    Hello All, Hopefully the subject line says all. Running SL and CS4, and after manually deleting the "old" Adobe PDF 9.0 driver, I am unable to print to PDF - or select "Save As Adobe PDF" under the Mac OS print dialog. This is insanely frustrating on

  • "Apple Display Thunderbolt" as TV

    Hello guys! I wanted to use an "Apple Display Thunderbolt" as TV. I need an adapter to convert the HDMI signal from the decoder to form Thunderbolt monitor. Does anyone have any idea. just need the video signal, the audio can send to an independent s

  • Transfer Video w/i.LINK wire

    Sony mini DV camera cannot transfer video with fire wire that came with a camera. From all accounts looks as if I need i.LINK wire - can any anyone tell me if it is a 4 pin to 4 pin or 4 pin to 6 pin wire?

  • HELP WITH IPOD BEFORE I THROW IT UP THE WALL

    HI I HAD A IPOD ON XMAS DAY ITS THE ONE THAT U CAN PLAY VIDEOS ON WELL ILL TELL U WHATS HAPPENING I READ THROUGH THE LEAFLET AND INSTALLED DISK ON MY COMPUTER AND EVERYTHING I HAD ON ITUNES WAS DOWNLOADED TO IPOD IN SECONDS THEN I UNPLUGGED IT HTEN I