Running an exe from within Oracle WebLogic 10g R3 does not find dll

Hi,
I am facing a strange issue with Oracle WebLogic 10g R3.
I use the code as shown in Listing 1 below to run a windows based application exe (batch job) from within my web application hosted on Oracle WebLogic 10g Release 3.
Note that this code woks fine on Tomcat 6.x and OC4J (JDeveloper TP4).
The exec gets executed but the log of the exe program shows it could not load certain DLLs.
Note that these DLLs are in the same directoy as the Batch program and this directory is in the PATH.
Running through simple Java Program Successful*
When I run the same program from a java program it runs successfully. So this means some WebLogic environment does not get set properly.
Running directly BatchProg.exe rather than cmd.exe fails*
Also note that when I run the exe directly e.g. BatchProg.exe rather than through cmd.exe it gives me a error the system did not find the file specified.
CreateProcess error=2, The system cannot find the file specified with cause java.io.IOException: CreateProcess error=2, The system cannot find the file specified
Listing 1:*
String[] commandArgs = new String[|http://forums.oracle.com/forums/] { "cmd.exe", "/C", "BatchProg.exe \"param1\" \"param2\" " },null , l_workingDir)
Runtime rt = Runtime.getRuntime();
Process proc;
proc = rt.exec( commandArgs, envParams, workingDir );
ProcessIO errStream = new ProcessIO( proc.getErrorStream(), "ERROR");
ProcessIO outStream = new ProcessIO( proc.getInputStream(), "OUTPUT");
errStream.start(); // process any errors from the command
outStream.start(); // process any output from the command
System.out.println("Error=" +errStream);
System.out.println("Out" + outStream);
return (p_waitToFinish ? proc.waitFor() : this.SUCCESS);

OK.
I have posted this on the WebLogic Forum.
Thanx.

Similar Messages

  • Trying to run an .exe from within pdf

    I am trying to run an executable file from within a pdf.  I get the error "This file is set to be launched by this pdf file.  This is currently disallowed by your administrator."  Error box is labeled "acrobat.exe"
    Using:  Adobe Acrobat 9 pro
    Windows 7
    This has worked with previous versions of Acrobat, is it still possible to do?

    This is disallowed for security reasons.
    See the "attachment configuration" section at : http://learn.adobe.com/wiki/display/security/Application+Security+Library to change this behavior.

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

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

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

  • Airdrop,,Using,Phone,5's,,8.1.1,,and,Mac,Book,pro,early,2011,,OS,X,Yosemite:,try ing,to,send,photo,via,airdrop,FROM,phone,to,computer,,but,airdrop,does,not,find, computer,even,3,inches,away;,WWII,and,bluetooth,are,enabled.,Solution?

    Airdrop solution needed! Using iPhone 5s, 8.1.1, and MacBook Pro early 2011, OS X Yosemite 10.10.1, cannot get iPhone to pickup airdrop signal for computer to send photos from iPhone to computer. WiFi and Bluetooth are enabled.

    adamboettiger wrote:
    Sophos and MacKeeper
    There are many reported problems with both these programs.
    Run through this list of fixes in order, will tune you right up.
    They are in order for a reason.
    ..Step by Step to fix your Mac

  • Oracle Siebel 8 adapter on Oracle WebLogic 10g

    Hi everybody,
    I need to install the new Oracle Service Bus 10g and to integrate with Siebel 8. So what I need is off course the bus and the adapter. I've a list of questions that raised during my initial research:
    1- Is it possible to install Oracle AS adapters on Oracle WebLogic 10g? I've tried to download the adapter and the only option was "adapters 101202" which require Oracle Home directory which is not available with Oracle WebLogic Installation.
    2- Is there a new version of Bea WebLogic adapters? The current documentation within edocs site support Siebel 7.7 and it is only available for WebLogic 9.1
    3- Where can I find installation guide for Oracle AS adapters?
    4- When navigating through http://www.oracle.com/technology/products/integration/adapters/index.html the "Download Oracle Integration Adapters" directed me to download Oracle WebLogic 10g r3 server. I went with the download and installed WebLogic 10g, but there were no adapters included. Is it only a mistaken link or it might contain the adapters for WebLogic 10g somewhere?
    Thanks in advance
    Tari

    Hi Brian,
    Generally the behavior you mentioned occurs when SRProc and SRBroker is unable to connect to Database.
    Please Check Following.
    1. Is Siebel Gateway Running Successfully? Please verify that Siebel Gateway listening on Standard port 2320. You can verify this by following command.
    netstat -na | grep 2320
    or
    ps -aef | grep siebns
    2. Change directory to <SIEBEL_ROOT>/siebsrvr/enterprises/<ENT_NAME>/<APP_SRVR>/log directory.
    3. Do you see any logs here? If yes, please let me know the errror message in logs.
    Hope this helps. All the best.

  • I need a code to run a report from a forms on 10G...

    Hi!! I´m migrating from 6i to 10G and i cant run a report... can someone send me a sample code to run a report from a form in 10G??
    Thanks!!
    Regards!

    iam using Javabean in oracle 10g forms to tun the report....
    First create a block with a name control and add an bean to it with a name
    userid_bean.click the proerty of the bean and changes its width and height
    so that u cannot see it when u run the particular form.
    now use the below code where u are coding to run the report.
    Declare
    rep_url varchar2(2000);
    begin
    rep_url := '/reports/rwservlet?report=filepath\rep1.RDF' ||
    '&desformat=htmlcss&destype=cache&userid=sample/sample@oracle' || '&paramform=yes';
    -- Write Log messages to the Forms JInitiator console.The Next line must
    -- be disabled before running this code in any production environment.
    set_custom_property('control.userid_bean',1,'ADD_USERID',
    get_application_property(username)||'/'||
              get_application_property(password)||'@'||
              get_application_property(connect_string));
    -- writing the cookie
    set_custom_property('control.userid_bean',1,'WRITE_USERID_COOKIE','10g');
    web.show_document(rep_url,'_blank');
    end;

  • URLConnection returns NULL when called from within a weblogic servlet

    The following code snippet works when executed outside of weblogic, but does
    not work from within a weblogic servlet instance.
    URL u = new URL("http://" + ipString + newString.toString());
    URLConnection uc = u.openConnection();
    BufferedReader in = new BufferedReader (new InputStreamReader(uc.getInputStream()));
    String response = "", response2 = "";
    while(response2 != null)
         response = ((response2 = in.readLine()) == null) ? response : response + response2;
    The response is quite big. When this code is executed from within a weblogic servlet instance,
    in.readLine always returns a null right away. Yet a TCP/IP trace shows that the packets are coming
    back to my NT machine.
    Other info:
    Inside of weblogic:
    u's handler is of type weblogic.net.http.Hanlder
    uc is of type weblogic.net.http.HttpURLConnection
    Outside of weblogic:
    u's handler is of type sun.net.www.protocol.http.Handler
    uc is of type sun.new.www.protocol.http.HttpURLConnection
    Weblogic V4.51. Running on NT.
    Attempted the following to no avail:
    1. installing sp11
    2. changing the security to permission java.security.AllPermission;
    3. adding the following calls : uc.setRequestProperty("Content-Type", "text/xml");          
              uc.setDoInput(true);
              uc.setDoOutput(true);
    4. Started playing around with modifying the java.protocol.handler.pkgs system property,
    but I shouldn't have to do this.
    Any help would be appreciated.

    There are some problems with the WL implementations of certain protocols.
    WL hides the Sun implementations when you are in the WebLogic server. Here
    is an a solution that was posted to a similar problem:
    Https is an add-in so to speak. Try this before you create your url:
    System.setProperty ("java.protocol.handler.pkgs",
    "com.sun.net.ssl.internal.www.protocol");
    // add the default security provider (again, in JSSE1.0.1)
    int iap = java.security.Security.addProvider(new
    com.sun.net.ssl.internal.ssl.Provider() );
    dennisNote how the code overides the WL setting which overode the Sun setting.
    Cameron Purdy
    [email protected]
    http://www.tangosol.com
    WebLogic Consulting Available
    "Brian Howell" <[email protected]> wrote in message
    news:[email protected]...
    >
    The following code snippet works when executed outside of weblogic, butdoes
    not work from within a weblogic servlet instance.
    URL u = new URL("http://" + ipString + newString.toString());
    URLConnection uc = u.openConnection();
    BufferedReader in = new BufferedReader (newInputStreamReader(uc.getInputStream()));
    >
    String response = "", response2 = "";
    while(response2 != null)
    response = ((response2 = in.readLine()) == null) ? response : response +response2;
    The response is quite big. When this code is executed from within aweblogic servlet instance,
    in.readLine always returns a null right away. Yet a TCP/IP trace showsthat the packets are coming
    back to my NT machine.
    Other info:
    Inside of weblogic:
    u's handler is of type weblogic.net.http.Hanlder
    uc is of type weblogic.net.http.HttpURLConnection
    Outside of weblogic:
    u's handler is of type sun.net.www.protocol.http.Handler
    uc is of type sun.new.www.protocol.http.HttpURLConnection
    Weblogic V4.51. Running on NT.
    Attempted the following to no avail:
    1. installing sp11
    2. changing the security to permission java.security.AllPermission;
    3. adding the following calls : uc.setRequestProperty("Content-Type","text/xml");
    uc.setDoInput(true);
    uc.setDoOutput(true);
    4. Started playing around with modifying the java.protocol.handler.pkgssystem property,
    but I shouldn't have to do this.
    Any help would be appreciated.

  • Running unix commands from within a procedure

    Oracle 11.1, AIX 6.1
    ================
    A developer would like to know what the commands are to execute from within a procedure to run unix commands on the database server and capture those results back to the procedure for parsing & manipulation.
    Thanks.

    Don't take this as the correct way to do it, but this is merely 'a' way to do it:
    have a db procedure thats executes a db function
    create or replace procedure csproc(p_cmd in varchar2)
    as
    x number;
    begin
    x:=csfunc(p_cmd);
    dbms_output.put_line('x is: '||x);
    end;
    /The function calls a piece of java to execute the os command and return the return code of the os command
    create or replace function csfunc( p_cmd  in varchar2) return number
    as language java
    name 'csclass.RunThis(java.lang.String[]) return integer';
    /Here is the java class to run the os command
    create or replace and compile java source
    named "csclass"
    as
    import java.io.*;
    import java.lang.*;
    public class csclass extends Object
    public static int RunThis(String[] args)
       Runtime rt = Runtime.getRuntime();
        int        rc = -1;
        try
           Process p = rt.exec(args[0]);
          int bufSize = 4096;
           BufferedInputStream bis =
           new BufferedInputStream(p.getInputStream(), bufSize);
           int len;
           byte buffer[] = new byte[bufSize];
           // Echo back what the program spit out
           while ((len = bis.read(buffer, 0, bufSize)) != -1)
              System.out.write(buffer, 0, len);
           rc = p.waitFor();
        catch (Exception e)
           e.printStackTrace();
           rc = -1;
        finally
           return rc;
    /and finally the os command - in this case its a very simple shell script
    #!/usr/bin/ksh
    echo "Hi" >> /app/oracle/workdir/cs.logwill have to grant privileges to my user 'CS' to run the various os commands
    exec dbms_java.grant_permission('CS','java.io.FilePermission','/app/oracle/workdir/cs.ksh','read,execute');
    exec dbms_java.grant_permission('CS','java.io.FilePermission','/app/oracle/workdir/cs.log','write');
    exec dbms_java.grant_permission('CS','SYS:java.lang.RuntimePermission','*','readFileDescriptor');
    exec dbms_java.grant_permission('CS','SYS:java.lang.RuntimePermission','*','writeFileDescriptor');and finally can run the procedure from within the db
    set serveroutput on
    exec dbms_java.set_output(1000000);
    exec csproc('/app/oracle/workdir/cs.ksh');
    x is: 0
    PL/SQL procedure successfully completed.to prove it works ok the logfile shows an entry:
    'Hi'

  • Calling startrfc.exe from within a vbs script

    Hello, can someone help me please
    I am trying to process xml idocs into SAP on a Windows 2008 server. I have written a vbs script to process the file and am trying to call STARTRFC.EXE from within the vbs script. However I keep getting an error that it cannot open the file. The code is shown below. I have changed the server name and gateway and user/passwd for security. I'm passing the filename as a variable (str_expfile) but it does not seem to be able to extract the actual file name from the variable. I know from past experience that you can pass it variables if its running on a unix box and in a shell. But for some reason it not decipering the variable name in the vbs script
    Set objShell = CreateObject("Wscript.Shell")
    str_startrfc = "D:\usr\sap\SID\SYS\exe\uc\NTAMD64\startrfc.exe -d SID -3 -h hostname -s 00 -g hostname -x sapgw00 -u user -p passwd -c 100 -l EN -t -F EDI_DATA_INCOMING -E PORT=MYPORT -E PATHNAME=str_expfile"
    objShell.Run str_startrfc, ,True
    The error I'm getting is shown below:
    ERROR file opened at 20110510 134219 GMT Daylight Time, SAP-REL 700,0,278 RFC-VER 3 1200864 MT-SL
    T:2584 Error in program 'startrfc': ======> Error at OPEN 'str_expfile' (check file)
    T:2584 Error in program 'startrfc': <* RfcReceive [1] : returns 3:RFC_SYS_EXCEPTION
    T:2584 Error in program 'startrfc': <* RfcCallReceive [1] : returns 3:RFC_SYS_EXCEPTION
    Thanks
    Regards
    Steve

    Hi Markus
    Unfortunately I can't do that because I need it to process hundreds of files one after another and I would have to hard code the file path each time. That's why I need it automated.
    Can startrfc.exe not take a variable for the pathname in a vb script? It works fine in a unix shell. We are migrating from unix to windows and I need to convert all my unix scripts into vb scripts.
    I notice there is a nother rfc type program available, can I use rfcexec.exe instead of startrfc.exe and would it take variables?
    Thanks
    Regards
    Steve

  • Request to run updater.exe from an unknown publisher starting firefox

    every time Firefox is started from initial turn on of computer (not from the computer being hibernated or in sleep mode), I receive a message to run Updater.exe from an Unknown Publisher. There is nothing to show that this is a Firefox application but, I am not receiving any threat messages either. Is there any way to find out where this Updater is coming from and if it is to be trusted?

    Do you use a Norton security suite? If so, I suggest checking with Norton's support on whether that prompt is legitimate.
    You will find numerous unofficial distributors advertising on Google for Firefox downloads. These generally are bundles of crap along with Firefox. You should check to make sure you don't have such a thing installed.
    Open the Windows '''Control Panel''', Uninstall a Program. After the list loads, click the "Installed on" column heading to group the infections, I mean, additions, by date. This can help surface undisclosed bundle items that snuck in with some software you agreed to install. Take out as much trash as possible here.
    You can supplement your regular security software with the '''scanning/cleaning tools''' listed in our support article: [[Troubleshoot Firefox issues caused by malware]]. These on-demand scanners are free and take considerable time to run. If they finish quickly and especially if they require payment, you may have a serious infection. I suggest the specialized forums listed in the article in that case.
    Does that help?

  • Running multiple instances from same oracle home

    Hi Gurus,
    I am preparing for OCA 11g examination. I had a question about running multiple instances from same oracle home. While reading the book I came across a statement about database control which says "If there are several database instances running off the same Oracle home, then each will have its own Database Control instance".
    Now I assume that this statement implies multiple instances accessing the same physical database (which as per my knowledge can happen only in case of a RAC).
    I am not able to understand how exactly can you have multiple database instances in a single oracle home. I have installed Oracle 11g on my computer whose oracle home is +"D:\oracle\product\10.2.0\db_1"+; now this directory houses all the binaries (executables and folders like admin,bin, etc) for the oracle instance that I have installed (the instance name is ocp1). Now if I am to install or create another Oracle Instance (say ocp2) in the same home, wont there be a conflict of binaries of the two instances in the same home ?
    Basically,it makes sense if db_1 folder is further split into multiple folders, one for each instance (for example, one for ocp1 & one for ocp2); each of these folders will then contain the binary files, libraries,etc for its own instance; but, this is not the case, here db_1 houses all the binaries directly under it ...
    The other question which stems from the statement I mentioned above is that if having multiple instances running from same oracle home accessing the same physical database, can this arrangement be called RAC at all; or does RAC dictate that you cannot have multiple instances that are accessing the same database have to be installed on physically separate machines and so you cannot have two RAC instances (accessing same physical database) installed on the same computer ??
    I hope my questions are not too much confusing ... !!
    Cheers,
    Sudripta

    Hello,
    "If there are several database instances running off the same Oracle home, then each will have its own Database Control instance".This is true, and also means each instance will have its separate database (i.e. dbf files etc.) & separate DB Control. Usually in this case you create several instances on the same node.
    Now I assume that this statement implies multiple instances accessing the same physical database (which as per my knowledge can happen only in case of a RAC).You are correct about RAC where several instances (usually running on separate nodes) access the RAC.
    More info:
    1 Oracle Home - 1 Database - 1 SID is possible.
    1 Oracle Home - Many Databases - Many SID is possible.
    1 Oracle HOme - 1 Database - Multiple SID is possible and this is called RAC.

  • Win2000 NoClassDefFoundError running java.exe from DOS prompt

    I am using Windows 2000 with J2SE v 1.3.1_02 and have a problem when I run java.exe from the command line for classes that are defined to be in a package. I can both compile and run this program from the TextPad editor but when I run it from a DOS prompt I get the error "Exception in thread "main" java.lang.NoClassDefFoundError: MyClass"
    My CLASSPATH is set to D:\
    The files MyClass.java and MyClass.class are in the directory D:\MyProject
    here is the source:
    package MyProject;
    public class MyClass
         public static void main(String[] args)
              System.out.println("MyClass main");
    Note that if I comment out the package statement and add "." to CLASSPATH then it runs from the DOS prompt. Why does the program run from inside TextPad but not from the DOS prompt? Seems to be some type of bug in java.exe on Windows 2000 when the keyword package is used.

    It turns out that if you use the main method in a class that declares the package statement you need to use the fully qualified name to run the program. Using this statement works for this problem:
    java MyProject/MyClass
    the forward slash is required even though is a Windows system.

  • I cannot uninstall Firefox, either through Control Panel Add/Remove or by running helper.exe from Program Files.

    Nothing happens when I click on REMOVE for Mozilla Firefox from the Add/Remove screen of Control Panel. I then tried to run helper.exe from the Mozilla Firefox folder in Program Files, but that wouldn't run either. Any suggestions?
    == This happened ==
    Just once or twice
    == When I tried to uninstall Firefox

    unistalled foxtab, however the window saying "want to add this pers. button to toolbar" no matter what I do I can't get it off , close firefox, remove or delete or get a new firefox download to replace it in the harddrive etc. Its locked up firefox and I have to use safari to access the web. how do I get this circular message etc. off ?

  • P6 Web Access On Oracle WebLogic 10g R3

    We are having problems attempting to use P6 Web Access on Oracle WebLogic 10g R3, documented in the P6 Admin Guide as supported. While the .ear file will deploy, upon use of http://[hostname]:[port]/primaveraweb/login/, it fails with :
    weblogic.servlet.jsp.CompilationException: Failed to compile JSP /WEB-INF/jsp/struts/login.jsp
    login.jsp:1:1: The validator class: "org.apache.taglibs.standard.tlv.JstlCoreTLV" has failed with the following exception: "java.lang.ClassCastException: weblogic.xml.jaxp.RegistrySAXParserFactory cannot be cast to javax.xml.parsers.SAXParserFactory".
    Is anyone using this environment successfully?
    Regards,
    John

    OK.
    I have posted this on the WebLogic Forum.
    Thanx.

  • Starting notepad.exe from within Java app?

    Is it possible to start notepad.exe from within a java app to display a log file (for instance)?

    search the forum for Runtime.getRuntime()

Maybe you are looking for

  • Communication problem, deskjet 920c

    I received a note for a repair to a communications problem for my printer.  When I tried to download it, I got to a "dot4 scrubber"  which stalled everything.   I had to reboot my computer to get rid of the note. 

  • Xbox 360 Trade-In Issue

    I've rarely felt so insulted in my many years of retail work and patronage as I have felt today at Best Buy. As a former employee of the chain, both in retail and the Geek Squad, I am generally quite forgiving of any issues I have while shopping ther

  • Skype Click to Call and Firefox... down at the mom...

    not sure where else to put this but just thot i should let the skype powers-that-be know that skype click to call is not working in firefox right now.  if yall already know then sorry to repeat this, just would like something done on it as soon as po

  • Access overriden method of an abstract class

    class Abstract abstract void abstractMethod(); //Abstract Method void get() System.out.print("Hello"); class Subclass extends Abstract void abstractMethod() System.out.print("Abstract Method implementation"); void get() System.out.print("Hiiii"); In

  • Flash rendering slows on Win 7 = 2GB RAM

    Our running platformer game has some issues with Flash rendering, I guess. It is a run and jump game with fully animated character and 4 layers of parallax background. Game trailer here: http://bit.ly/origamingflirtyfranky The background consists of