SXPG_COMMAND_EXECUTE cmd COPY

Hi All!
In SM49 we defined 2 commands, one for moving (cmd /c MOVE) a file and the other one for copying (cmd /c COPY) one.
My user is allow to move files but not copying them into the same directory. Or at least looks like that.
In SM49 we defined
ZCOPY              Windows NT Customer    cmd /c COPY
ZMOVE              Windows NT Customer    cmd /c MOVE
The move command seems to be working fine but then I get a permission error for the move.
Any idea if it is rights or cause the file was used for moving just before the Copy?
Any idea?
Thanks.

The problem was that in SM59 the user didn't have access to execute the command Copy even though it has authorization to the object.

Similar Messages

  • GetRuntime().exec(cmd) createprocess error=2 when trying to copy

    Hi there,
    Using .exe and copy methods have been covered quite allot in these forums, but I cant quite find one that shows me why this isnt working:
    when I run the following code (on a windows machine)
    String cmd="COPY \"" +origiFTPlocation+ "\\\\"+zipfilename+ "\" \""
    + finalLocation +  "\"";
    try{
         Process run = Runtime.getRuntime().exec(cmd);
         run.waitFor();
         }catch(Exception e){System.out.print(e.getMessage());               
    cmd = COPY "C:\\Documents and Settings\\psd_tmp4\\My Documents\\JavaProjX\\OWF\\origiFTPlocation\\age_v0_i0_ao.zip" "C:\\Documents and Settings\\psd_tmp4\\My Documents\\JavaProjX\\OWF\\finalLocation"I get the following error:
    can not tun program "COPY": createprocess error=2, the sytem cannot find the file specified
    but this works fine when copying and pasting into comand line???
    I have tried converting to single slashes but get the same
    Edited by: Mr_Tuition on Jan 2, 2008 8:21 AM

    I don't know much about DOS-ish commands, but presumably copy is not an executable program,
    but rather the cmd.exe equivalent of what's called a "shell built-in" in unix. That is, I would guess that
    the command "copy" is interpreted directly by cmd.exe.
    If that's the case, I see the following options:
    1) Execute cmd.exe and tell it to run the copy command. This probably has its own quirks that I'm not familiar with.
    2) Find a copy executable somewhere on your system and invoke that (if it exists).
    3) Create a .bat file that contains the copy command and execute that.
    4) Do the file copy directly in Java, without invoking Runtime.exec.

  • Maintain Blanks in SXPG_COMMAND_EXECUTE additional parameters

    Hello guys,
    we are trying to execute some commands in a Z function calling the function SXPG_COMMAND_EXECUTE.
    We have a command Z and in the additional parameters and we fill the command with CMD('COPY T:
    Documents
    PXXX2
    IEXXX.DOC \"E:
    WORK
    600613 MATERIAL     100333 (12345)\" ').
    We want to maintain the blanks, but during the execution of function SXPG_COMMAND_EXECUTE a CONDENSE of the field additional parameters is done.
    There is any way to maintain the blanks calling this function? There is another function that also executes commands and maintain the blanks?
    Many thanks in advance.
    Regards,
    Xavi.

    Hi,
    thanks for the answer. But thats doesn't match my problem. What I want is to start a shell-script with parameter whereas some parameters might include one or more blanks. Like for examples a script with only one parameter:
    shell-script 'this is a parameter'
    What I found out while testing with SM49 is, when I put the parameter into apostrophe than the parameter is passed as a single parameter to the script. But SM49 elsewell SXPG_COMMAND_EXECUTE condense more than blank to only one blank. And the apostrophe remain in the parameter.
    SM49:
    shell-script 'This   is a parameter'
    The shell-script gets the parameter 'This is a parameter' , whereas the apostrophe ' and the start and at the end is part of the parameter.
    Using the function modules SXPG_RFCDEST_OPEN_INT, SAPXPG_START_XPG and SAPXPG_END_XPG instead of SXPG_COMMAND_EXECUTE solves the problem of condensing the blanks to one blank. But the apostrophe is still part of the parameter. And I have to consider that the apostrophe might be originally part of the parameter.
    And I have to solve this problem.
    Regards
    Karl-Wilhelm

  • Printing chr report on local printer thru windows.

    Hi
    Can anybody tell me better way of printing report. Here is my requirement and setup
    1. 3 tier architecture.
    2. forms and reports services run of different machines
    3. client is windows-xp,
    4. printer is connected to local lpt1:
    My requirement is to print this report in char mode on to printer.
    Currently I am doing following, (it works fine) i want some better way.
    1. call report with run_report_object from forms.
    2. copy output file from reports server to forms server using COPY_REPORT_OBJECT_OUTPUT.
    3. using webutil transfer output file to client machine
    4. give print command using client_host('cmd / copy filename lpt1:');
    can anybody tell me a better way than this.
    rgds

    You could use Reports Remote Printing Utility (orarrp). At the following link you can get more information.
    http://www.oracle.com/technology/sample_code/products/reports/index.html#orarrp
    It requires client install and is no supported by Oracle however
    Marcos

  • Read-only aaa statements

    I've setup the TACACS server with two groups
    -FULL admin rights
    -READ only rights
    Two users have been created
    -admin_test
    -read_test
    The admin_test config works fine on AAA but i keep getting stuck with read_test configs. I can never get to enable mode eventhough i've defined it on the group policy. Is there something wrong with my aaa statements below?
    aaa authentication login default group tacacs+ line enable
    aaa authentication enable default group tacacs+ enable line
    aaa authorization exec default if-authenticated
    aaa accounting exec default start-stop group tacacs+
    aaa accounting commands 15 default start-stop group tacacs+

    Privilege is not scalable in a big environment.
    What you need is authorization on the ACS
    server. In Cisco Freeware TACACS+ I defined
    the following groups: readonly, advanced and
    admin:
    group = readonly {
    default service = deny
    cmd = show { deny .* }
    cmd = show { permit .* }
    cmd = copy { permit .* }
    cmd = ping { permit .* }
    cmd = enable { permit .* }
    cmd = configure { deny .* }
    cmd = disable { permit .* }
    cmd = telnet { permit .* }
    cmd = disconnect { permit .* }
    cmd = where { permit .* }
    cmd = set { permit .* }
    cmd = clear { permit line }
    cmd = exit { permit .* }
    cmd = debug { permit .* }
    group = advanced {
    default service = deny
    cmd = show { permit .* }
    cmd = copy { permit flash }
    cmd = copy { permit running }
    cmd = ping { permit .* }
    cmd = configure { permit .* }
    cmd = enable { permit .* }
    cmd = disable { permit .* }
    cmd = telnet { permit .* }
    cmd = disconnect { permit .* }
    cmd = where { permit .* }
    cmd = set { permit .* }
    cmd = clear { permit line }
    cmd = exit { permit .* }
    cmd = interface { permit .* }
    group = admin {
    default service = permit
    As you can see, admin can access everything,
    readonly can only read. Advanced can make
    limited changes and admin can do everything.
    On the Cisco router, I have the following
    configuration:
    aaa authentication login notac none
    aaa authentication login VTY group tacacs+ local
    aaa authentication enable default group tacacs+ enable
    aaa authorization console
    aaa authorization config-commands
    aaa authorization exec notac none
    aaa authorization exec VTY group tacacs+ if-authenticated none
    aaa authorization commands 0 VTY group tacacs+ if-authenticated none
    aaa authorization commands 1 VTY group tacacs+ if-authenticated none
    aaa authorization commands 15 VTY group tacacs+ if-authenticated none
    aaa authorization network VTY group tacacs+ if-authenticated none
    aaa accounting exec VTY start-stop group tacacs+
    aaa accounting commands 0 VTY start-stop group tacacs+
    aaa accounting commands 1 VTY start-stop group tacacs+
    aaa accounting commands 15 VTY start-stop group tacacs+
    aaa accounting network VTY start-stop group tacacs+
    aaa accounting connection VTY start-stop group tacacs+
    I find that by doing it this way, it is much
    more scalable than using privilege commands
    on the router itself.
    David
    CCIE Security

  • Problems using Quick Migrate in SQL Developer 1.5 for MySQL to Oracle 10g

    Hi all,
    I am trying to use SQL Developer 1.5 migration tools (Quick Migrate) to perform online capture and build source model to migrate from MySQL 5.x to Oracle 10g on Windows platform. I get these errors and the Quick Migrate process fails:
    oracle.dbtools.metadata.persistence.PersistableObject.doInsert(PersistableObject.java:238)
    I did a search and used the sqldeveloper.cmd script but still fails. Then I created a new database and truncated the repository. I now get the above error plus two new ones listed below:
    oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    Error loading nls:OALL8 is in an inconsistent state
    Error occurred during capture: Protocol violation
    It fails during the capture process for MySQL 5.1 database
    when it begins to capture the tables from MySQL.
    Does anyone know how to resolve these issues when migrating from MySQL to Oracle 10g using Quick Migrate with SQL Developer 1.5 release?
    Regards,
    Ben Prusinski
    Message was edited by:
    benprusinski
    Message was edited by:
    benprusinski

    Hi all,
    I put the following in my sqldeveloper.cmd file:
    SET ORACLE_HOME=%CD%
    What is very confusing is that with SQL Developer 1.5, there are several levels and several SQL Developer executables! I am really not sure which of these to use:
    I created the SQLDeveloper 1.5 directory called SQLDeveloper1_5 on Windows:
    1) cd C:\sqldeveloper1_5\sqldeveloper-5338
    there exists a sqldeveloper.exe
    2) cd c:\sqldeveloper1_5\sqldeveloper-5338\sqldeveloper\sqldeveloper.exe
    3) cd c:\sqldeveloper1_5\sqldeveloper-5338\sqldeveloper\sqldeveloer\bin\sqldeveloper.exe
    Which SQLDeveloper 1.5 executable should I be using and where should I place the
    sqldeveloper.cmd file?
    Also I did try to use a different database and schema for the repository with Quick Migrate but it appears a bug exists in SQL Developer 1.5 version that causes errors with Quick Migrate for MySQL to Oracle? Is this correct?
    As an update, I ran the following commands:
    cd to
    c:\sqldeveloper1_5\sqldeveloper-5338\sqldeveloper\sqldeveloper\bin
    sqldeveloper.cmd sqldeveloper.exe
    Start sqldeveloper.exe
    Perform standard capture for MySQL using the new mig2 schema as the new repository
    It starts the capture but fails on the errors below:
    Error loading nls:OALL8 is in an inconsistent state
    UPDATE
    ============================
    I tried this again and it worked with the exception of one error message listed below:
    Here are the steps that I followed:
    1. Create a Windows cmd script
    Put the following entries in the script:
    SET ORACLE_HOME=%CD%
    save the command windows script as sqldeveloper.cmd
    Copy this script to the base installation directory for SQLDeveloper
    Example:
    1. cd c:\SQLDeveloper1_5\sqldeveloper-5338\sqldeveloper
    2. Start SQLDeveloper with the command script that you created earlier
    Example:
    Open a Windows shell prompt window and execute the following scripts:
    a) sqldeveloper.cmd sqldeveloper.exe
    b) sqldeveloper.exe
    3) In SQL Developer 1.5
    From the Migrate menu,
    a) Delete current repository and create a new schema in Oracle target database call it mig2.
    b) Then create a new repository in SQL Developer 1.5
    c) Right mouse click on the MySQL 5.x database and choose capture
    It worked with the exception of one error message:
    o.jdbc.driver.OracleDriver     
    Error while registering Oracle JDBC Diagnosability MBean.
    So it looks like something is screwed up with my JDBC drivers and configuration for MySQL. How do I diagnose the JDBC driver issue for MySQL?
    Thanks!!!
    Ben
    Thanks
    Ben

  • Run os command from UDF

    hi I am using this code which needs to copy file
    import java.io.File;
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    public class RunSystemCommand {
         public static void main(String args[]) {
         String s = null;
    //        system command to run
         String cmd = "copy a.txt b.txt";
    //        set the working directory for the OS command processor
         File workDir = new File("c:
    temp");
         try {
         Process p = Runtime.getRuntime().exec(cmd, null, workDir);
         int i = p.waitFor();
         if (i == 0){
         BufferedReader stdInput = new BufferedReader(new InputStreamReader(p.getInputStream()));
    //        read the output from the command
         while ((s = stdInput.readLine()) != null) {
         System.out.println(s);
         else {
         BufferedReader stdErr = new BufferedReader(new InputStreamReader(p.getErrorStream()));
    //        read the output from the command
         while ((s = stdErr.readLine()) != null) {
         System.out.println(s);
         catch (Exception e) {
         System.out.println(e);
    it doesnt work,the error is
    java.io.IOException: CreateProcess: copy a.txt b.txt error=2
    thx,Shai

    If you are using SQL*Plus to execute the script, you can use the SQL*Plus command HOST. If you are trying to execute an operating system command from a PL/SQL block (i.e. a stored procedure), you would need to use an external procedure or a Java stored procedure that uses Java's shell functionality.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • HOWTO:Deploy BC4J as Session Bean in Weblogic

    This document describes Howto deploy a BC4J Appmodule as EJB Session Bean to Weblogic and
    test the appmodule through the BC4J tester.
    =>create a BC4J Application using Business Components Wizard.
    =>test it using BC4J tester
    =>make the Application Module Remotable [list]
    [*]Select Appmodule and right mouse on it to select the edit option
    [*]Select Remote tab
    [*]Select the check box for Remotable Application Module
    [*]Select EJB Session Bean and shuttle it from Available list to Selected list
    [*]Click on the finish button[list]
    => Do File| Save All and a Rebuild on the project
    => create the weblogic XML Deployment Descriptor[list]
    [*]Choose File|New
    [*]Select the web objects tab
    [*]Select XML and click ok
    [*]Rename the file as ejb-jar.xml using File|Rename
    [*]Save it in the JDEV_HOME/myclasses/META-INF directory.
    [*]Open the xml file by double clicking on it.
    [*]Paste the following into the file
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
    <ejb-jar>
    <enterprise-beans>
    <session>
    <ejb-name>wl.WlModule</ejb-name>
    <home>wl.common.ejb.WlModuleHome</home>
    <remote>wl.common.ejb.RemoteWlModule</remote>
    <ejb-class>wl.server.ejb.WlModuleServerEJB</ejb-class>
    <session-type>Stateful</session-type>
    <transaction-type>Bean</transaction-type>
    </session>
    </enterprise-beans>
    <assembly-descriptor>
    </assembly-descriptor>
    </ejb-jar>
    [*]Choose File|New
    [*]Select the web objects tab
    [*]Select XML and click ok
    [*]Rename the file as weblogic-ejb-jar.xml using File|Rename
    [*]Save it in the JDEV_HOME/myclasses/META-INF directory.
    [*]Open the xml file by double clicking on it.
    [*]Paste the following into the file
    <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN' 'http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd'>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>wl.WlModule</ejb-name>
    <caching-descriptor>
    <max-beans-in-free-pool>100</max-beans-in-free-pool>
    <max-beans-in-cache>100</max-beans-in-cache>
    <idle-timeout-seconds>60</idle-timeout-seconds>
    </caching-descriptor>
    <jndi-name>wl.WlModule</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    In this example "wl" is the package name and "WlModule" is the Appmodule name.[list]
    => generate the jar file for appmodule along with xml deployment descriptors[list]
    [*]from the command line in JDEV_HOME/myclasses directory run
    [*]jar cvf0 wlappmodule.jar wl META-INF[list]
    => edit the setenv.cmd file in WEBLOGIC_HOME directory[list]
    [*]set JAVA_HOME=f:\jdev32\java1.2
    [*]set JBOLIB=f:\jdev32\lib
    [*]set JDBC_CLASSES=f:\jdev32\jdbc\lib\oracle8.1.7\classes12.zip
    [*]set JBO_RUNTIME=%JBOLIB%\jboorasql.zip;%JDBC_CLASSES%;%JBOLIB%\jbodatum12.zip;%JBOLIB%\xmlparserv2.jar;%JBOLIB%\jbomt.zip;%JBOLIB%\jboejb.jar
    [*]add JBO_RUNTIME in the set CLASSPATH variable[list]
    => create a bc4j deploy batch file "Deploybc4j.cmd" in the WEB_LOGIC HOME
    which will generate the server side jar files
    @setlocal
    set JAVA=java
    set JAVAC=javac
    set BEAN_JAR=%1
    set EJB_TEMP=f:\jdev32\myclasses\wl
    set XMLPARSERV2=f:\jdev32\lib\xmlparserv2.jar;
    set JDBC_LIBS=f:\jdev32\jdbc\oracle8.1.7\lib\classes12.zip
    set JBO_EJB_RUNTIME=f:\jdev32\lib\jbomt.zip;f:\jdev32\lib\jboejb.jar;%XMLPARSERV2%;%JDBC_LIBS%
    set CLASSPATH=%CLASSPATH%;%JBO_EJB_RUNTIME%;%BEAN_JAR%;%EJB_TEMP%
    %JAVA% weblogic.ejbc -compiler javac f:\jdev32\myclasses\wlappmodule.jar f:\jdev32\myclasses\wlAppModuleGenerated.jar;f:\jdev32\lib\jbodomorcl.zip
    pushd %EJB_TEMP%
    @endlocal
    Note: substittue appropriate jar file and directory structure names
    => Run setenv.cmd
    => Run deploybc4j.cmd
    => Configure Weblogic server[list]
    If your weblogic server is residing on a different machine then
    [*]copy wlAppModuleGenerated.jar (generated jar file from deploybc4j.cmd)
    [*]Copy classes12.zip from JDEV_HOME/jdbc/lib/oracle8.1.7/ directory
    [*]Copy jbodomorcl.zip
    [*]jbodatum12.zip
    [*]xmlparserv2.jar
    [*]jbomt.zip
    [*]jboejb.jar from JDEV_HOME/lib directory
    [*]edit weblogic.properties file in WEBLOGIC_HOME directory
    [*]In the WEBLOGIC EJB DEMO PROPERTIES sectio
    [*]add weblogic.ejb.deploy=E:/weblogic/myserver/wlAppModuleGenerated.jar
    (generated jar file from deploybc4j.cmd file)
    [*]edit startweblogic.cmd file in WEBLOGIC_HOME directory
    [*]set POST_CLASSPATH=f:\jdev32\jdbc\oracle8.1.7\lib\classes12.zip;f:\jdev32\lib\jboorasql.zip;f:\jdev32\lib\jbodatum12.zip;f:\jdev32\lib\xmlparserv2.jar;f:\jdev32\lib\jbomt.zip;f:\jdev32 \lib\jboEJB.jar;f:\jdev32\lib\jbodomorcl.zip
    [*]add E:/weblogic/myserver/wlAppModuleGenerated.jar
    (generated jar file from deploybc4j.cmd file) in the weblogic_classpath setting[list]
    Note: modify the directory structure of jar files as apporpriate
    => Run the BC4J tester to test the deployed BC4J Appmodule as session bean to Weblogic[list]
    [*]Add a new library
    [*]Select the Project in which you developed the BC4J Appmodule
    [*]Project | Project Properties
    [*]select libraries tab
    [*]Click on Add
    [*]Click on New
    [*]Specify "JBO WL Client" in the NAME
    [*]Click on ... button for adding the jar files
    [*]Click on Add/Zip jar button to add the following files
    weblogicaux.jar
    jboremoteejb.zip
    jboremote.zip
    <Weblogic_home>/classes
    [*]Click on OK
    [*]Start the weblogic server
    [*]Bring the BC4J Tester by doing a right mouse on the appmodule and selecting Test option
    [*]In the Middle Tier Server Type Select "Weblogic"
    [*]Specify Host name and port # of weblogic server
    [*]Click on Connect[list]
    raghu
    null

    Although this explains how to then deploy to Weblogic on another server, it still presumes that it is installed on the same computer as JDev. I moved the weblogic.jar file over to the computer and fudged a few things to get it to work.
    Also, I am testing this with Weblogic 6.0, so some of the information does not work as prescribed. I edited the config.xml instead of the weblogic.properties file. I am trying to figure out where to put all of the *.jar and *.zip files that I copied over to the Solaris machine with Weblogic. Any suggestions?
    And one of the steps in the section to create the deploybc4j.cmd file is wrong. It says
    "%JAVA% weblogic.ejbc -compiler javac f:\jdev32\myclasses\wlappmodule.jar f:\jdev32\myclasses\wlAppModuleGenerated.jar;f:\jdev32\lib\jbodomorcl.zip"
    Which does not work. I took off the last part:
    "%JAVA% weblogic.ejbc -compiler javac f:\jdev32\myclasses\wlappmodule.jar f:\jdev32\myclasses\wlAppModuleGenerated.jar"
    and it worked. It was getting that whole last part and trying to create a directory with that name and failing.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by David Shanes ([email protected]):
    This seems to assume that JDev and Weblogic are installed on the same server (I refer to the section on setting the setenv.cmd file in the WEBLOGIC_HOME dir that includes the path to the JDev install.
    I have JDev installed on a Win 2k box and Weblogic installed on a Solaris. Any suggestions? I got all the way up to the setenv.cmd step fine.<HR></BLOCKQUOTE>
    null

  • OBIEE 11g as a service in windows

    Here are the steps to configure OBIEE 11g as windows service.
    Admin server and bi server needs to be configured as service.
    Create boot.properties files with weblogic admin username and password in security folder.
    Here are the changes I made to make it work. I created two copies of installsvc.cmd file in wls_home/server/bin and renamed them to be used in scripts and make changes.
    One for admin server and other for node manager (bi server).
    cmd file for admin server.
    SETLOCAL
    set DOMAIN_NAME=bifoundation_domain
    set USERDOMAIN_HOME=D:\BI\user_projects\domains\bifoundation_domain
    set SERVER_NAME=AdminServer
    set MEM_ARGS=-Xms256m -Xmx512m
    cd %USERDOMAIN_HOME%
    call %USERDOMAIN_HOME%\bin\setDomainEnv.cmd
    call "D:\BI\wlserver_10.3\server\bin\installSvc_Admin.cmd" --see comment below.
    ENDLOCAL
    Added delay parameter.(it is in milliseconds)
    rem *** Install the service
    "%WL_HOME%\server\bin\beasvc" -install -svcname:"beasvc %DOMAIN_NAME%_%SERVER_NAME%" -delay:120000 -javahome:"%JAVA_HOME%" -execdir:"%USERDOMAIN_HOME%" -maxconnectretries:"%MAX_CONNECT_RETRIES%" -host:"%HOST%" -port:"%PORT%" -extrapath:"%EXTRAPATH%" -password:"%WLS_PW%" -cmdline:%CMDLINE%
    CMD file to start BI server and make it wait for the admin server to come up.
    SETLOCAL
    set DOMAIN_NAME=bifoundation_domain
    set USERDOMAIN_HOME=D:\BI\user_projects\domains\bifoundation_domain
    set ORACLE_BI_HOME=d:\BI\Oracle_BI1
    set SERVER_NAME=bi_server1
    set PRODUCTION_MODE=true
    set ADMIN_URL=t3://hostname:7001 - if you are using ssl it is should be t3s
    set MEM_ARGS=-Xms256m -Xmx512m
    cd %USERDOMAIN_HOME%
    call %USERDOMAIN_HOME%\bin\setDomainEnv.cmd
    call "D:\BI\wlserver_10.3\server\bin\install_OBIEE_Svc.cmd"
    ENDLOCAL
    In install_OBIEE_Svc.cmd (copy of installsvc.cmd) file added dependency and delay parameter
    rem *** Install the service
    "%WL_HOME%\server\bin\beasvc" -install -svcname:"beasvc %DOMAIN_NAME%_%SERVER_NAME%" -dependency:"beasvc bifoundation_domain_AdminServer" -delay:12000 -javahome:"%JAVA_HOME%" -execdir:"%USERDOMAIN_HOME%" -maxconnectretries:"%MAX_CONNECT_RETRIES%" -host:"%HOST%" -port:"%PORT%" -extrapath:"%EXTRAPATH%" -password:"%WLS_PW%" -cmdline:%CMDLINE%
    I have tested it and it works.
    Provide feed back to this thread, works or fails. This allows me to update the comments with solution to any problem faced.
    Edited by: SP Reddy on Nov 10, 2010 1:38 PM

    Hi
    Have managed to run oc4j as a service as follows under xp pro
    Download runexescv from http://www.judoscript.com/goodies/index.html
    Unpack and run
    Create service say OracleOc4j
    Needs basic parameters setup
    Cmdline and Home
    My setup is
    debug=false
    cmdline=c:\ora9ias\jdk\bin\java - Dorg.omg.CORBA. ORBClass=com.inprise.vbroker.orb.ORB -Dorg.omg.CORBA.ORBSingletonClass=com.inprise.vbroker.orb.ORB -Doracle.security.jazn.config=c:\ora9ias\j2ee\Oracle9iDS\config\jazn.xml -Doracle.home=c:\ora9ias -DORACLE_HOME=c:\ora9ias -jar c:\ora9ias\j2ee\home\oc4j.jar -userThreads -config c:\ora9ias\j2ee\Oracle9iDS\config\server.xml
    ( all from startinst.bat )
    home=C:\ora9ias\j2ee\home\
    Save and close
    Oracleoc4j will now be set up as service
    Change service to auto and start service !!
    Appears to be neat and easy way of setting up an OC4J service
    Ian

  • OS level calls in Java.. example.

    Simple and perhaps idiotic question... but here it goes.
    Is there a way to make OS level calls in Java (i.e such as the cp, mv or ls/dir commands)?
    What class due I need to instantiate do to this? and is it the same for UNIX and win32 systems?
    Here is what I attempted to do:
    ================
    import java.io.*;
    public class Test {
    private static void main(String args[]) {
    String cmd[] =
    {"copy", "c:\\temp\\test.txt", "c:\\temp\\test2.txt"};
    try {
    Process p = Runtime.getRuntime().exec("copy test.txt test2.txt");
    p = Runtime.getRuntime().exec(cmd);
    } catch (Exception e) {
    e.printStackTrace();
    However, the above code results in the following error at runtime...
    =============
    java.io.IOException: CreateProcess: copy c:\temp\test.txt c:\temp\test2.txt error=2
    at java.lang.Win32Process.create(Native Method)
    at java.lang.Win32Process.<init>(Win32Process.java:61)
    at java.lang.Runtime.execInternal(Native Method)
    at java.lang.Runtime.exec(Runtime.java:546)
    at java.lang.Runtime.exec(Runtime.java:413)
    at java.lang.Runtime.exec(Runtime.java:356)
    at java.lang.Runtime.exec(Runtime.java:320)
    at Test.main(Test.java:7)
    ==============
    Thoughts?
    Any help is greatly appreciated.
    Regards
    echardrd

    Almost right...
    "copy" is a shell builtin for Windows, so you need to call it as an argument to cmd.exe (or command.com on older systems). E.g. in Win2000 you can go:
    Runtime.getRuntime().exec( "cmd /c copy c:\\test1.txt c:\\test2.txt" );Where the /c is the parameter to tell cmd to carry out the given command. You could run this with the "start" command to push it into the background.
    Unix behaviour is roughly similar: cp is a Bash builtin for example, so you probably need to execute a shell process and pass it cp (I'm not sure about that one, I didn't test it)

  • Open,save,view pdf through form

    Hi!
    1)I have to open a pdf using open dialog box(get_file_name)
    2)then saved it to a "new" location without openinig dialog box
    3)then view that file from the "new" location.
    currently i am using api but "one" dll should be in orant\bin to run this form at every PC.
    Host opens dos screen so it is not a good solution.
    is there any other oracle built-in to accomplish this task
    thanx

    Host opens dos screen so it is not a good solution.Please try the following code.
    DECLARE
    cmd varchar2(4000);
    s varchar2(4000);
    BEGIN
    cmd := 'copy /b c:\forms9iDemos9_0_0_1.zip c:\new_file.zip';
    TOOL_ENV.GETVAR( 'COMSPEC', s );
    Host( s || ' /c '||cmd, NO_SCREEN );
    END;

  • BPEL with inline JAVA to run shell command

    I'm quite happy I figured this out.
    Issues I discovered include JDeveloper wants to rearrange the order of the inline java to be placed after the Return_Output Assign which should be placed after it.
    I could only discover this by looking at the BPEL source as graphicly it was still
    displayed in the expected order.
    Also I had issues in the past with not being able to reference the input and output message variables from inline Java so I bypassed that headache and provide ordinary variables for Java to interact with and simply XML Copy operations to
    populate and use those variables.
    If you are trying to build this yourself from scratch you will have to edit the BPEL source to have the java import lines as there is no drag and drop functionality for that.
    For testing , from the BPEL console
    shell = /bin/bash
    shellOpts = -c
    cmd = ls /home/soa
    cmdArgs
    cmdArgs didn't work when populated instead they worked when included in cmd.
    Also tried
    shell = /usr/bin/perl
    shellOpts = -e
    cmd = print "Hello World";
    cmdArgs
    Both returned expected text output.
    Fun!!
    This was built as a synchronous BPEL process...
    <?xml version = "1.0" encoding = "UTF-8" ?>
    <!--
    Oracle JDeveloper BPEL Designer
    Created: Mon Feb 18 10:38:58 PST 2008
    Author: rtaylor
    Purpose: Synchronous BPEL Process
    -->
    <process name="Call_Script"
    targetNamespace="http://xmlns.oracle.com/Call_Script"
    xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    xmlns:client="http://xmlns.oracle.com/Call_Script"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc">
    <!--
    PARTNERLINKS
    List of services participating in this BPEL process
    -->
    <partnerLinks>
    <!--
    The 'client' role represents the requester of this service. It is
    used for callback. The location and correlation information associated
    with the client role are automatically set using WS-Addressing.
    -->
    <partnerLink name="client" partnerLinkType="client:Call_Script"
    myRole="Call_ScriptProvider"/>
    </partnerLinks>
    <!--
    VARIABLES
    List of messages and XML documents used within this BPEL process
    -->
    <variables>
    <!-- Reference to the message passed as input during initiation -->
    <!-- Reference to the message that will be returned to the requester-->
    <variable name="inputVariable"
    messageType="client:Call_ScriptRequestMessage"/>
    <variable name="outputVariable"
    messageType="client:Call_ScriptResponseMessage"/>
    <variable name="shell" type="xsd:string"/>
    <variable name="shellOpts" type="xsd:string"/>
    <variable name="cmd" type="xsd:string"/>
    <variable name="cmdArgs" type="xsd:string"/>
    <variable name="commandOutput_external" type="xsd:string"/>
    </variables>
    <!--
    ORCHESTRATION LOGIC
    Set of activities coordinating the flow of messages across the
    services integrated within this business process
    -->
    <sequence name="main">
    <!-- Receive input from requestor. (Note: This maps to operation defined in Call_Script.wsdl) -->
    <receive name="receiveInput" partnerLink="client"
    portType="client:Call_Script" operation="process"
    variable="inputVariable" createInstance="yes"/>
    <!-- Generate reply to synchronous request -->
    <assign name="Assign_Script">
    <copy>
    <from variable="inputVariable" part="payload"
    query="/client:Call_ScriptProcessRequest/client:shell"/>
    <to variable="shell"/>
    </copy>
    <copy>
    <from variable="inputVariable" part="payload"
    query="/client:Call_ScriptProcessRequest/client:shellOpts"/>
    <to variable="shellOpts"/>
    </copy>
    <copy>
    <from variable="inputVariable" part="payload"
    query="/client:Call_ScriptProcessRequest/client:cmd"/>
    <to variable="cmd"/>
    </copy>
    <copy>
    <from variable="inputVariable" part="payload"
    query="/client:Call_ScriptProcessRequest/client:cmdArgs"/>
    <to variable="cmdArgs"/>
    </copy>
    <copy>
    <from expression='"Initialize"'/>
    <to variable="commandOutput_external"/>
    </copy>
    </assign>
    <bpelx:exec import="java.io.InputStreamReader"/>
    <bpelx:exec import="java.io.BufferedReader"/>
    <bpelx:exec import="java.io.IOException"/>
    <bpelx:exec name="Call_Script" language="java" version="1.3">
    <![CDATA[/*Write your java code below e.g.                     
         System.out.println("Hello, World");                    
    addAuditTrailEntry("Initializing Strings");             
    String shell = (String)getVariableData("shell");                   
    String shellOpts = (String)getVariableData("shellOpts");                   
    String cmd = (String)getVariableData("cmd");                   
    String cmdArgs = (String)getVariableData("cmdArgs");                   
    String[] cmdString = { shell, shellOpts, cmd, cmdArgs };
    addAuditTrailEntry("Command String = " + cmdString[0] + " " + cmdString[1] +
    " " + cmdString[2] + " " + cmdString[3]);
    int[] retCode = {1};
    String commandOutput = null;
    try {                      
    Process p = Runtime.getRuntime().exec(cmdString);
    BufferedReader pOutput =
    new BufferedReader(new InputStreamReader(p.getInputStream()));
    String line;
    StringBuffer tmpCommandOutput = new StringBuffer();
    try
    while ((line = pOutput.readLine()) != null)
    tmpCommandOutput.append(line).append("\n");
    commandOutput = tmpCommandOutput.toString();
    addAuditTrailEntry("commandOutput: " + commandOutput);
    setVariableData("commandOutput_external",commandOutput);
    catch (IOException e) {            
    addAuditTrailEntry("had problem with string buffer: " + e);
    p.waitFor(); retCode[0] = p.exitValue(); pOutput.close();
    catch (IOException e) {            
    addAuditTrailEntry("had problem running command: " + e);
    catch (InterruptedException e) { addAuditTrailEntry(e); }
    catch (Exception e) { addAuditTrailEntry(e); }]]>
    </bpelx:exec>
    <bpelx:exec import="java.io.FileInputStream"/>
    <assign name="Return_Output">
    <copy>
    <from variable="commandOutput_external"/>
    <to variable="outputVariable" part="payload"
    query="/client:Call_ScriptProcessResponse/client:commandOutput"/>
    </copy>
    </assign>
    <reply name="replyOutput" partnerLink="client" portType="client:Call_Script"
    operation="process" variable="outputVariable"/>
    </sequence>
    </process>

    Try this....
    Process p = Runtime.getRuntime().exec("sh");
    java.io.BufferedWriter bw = new java.io.BufferedWriter(new java.io.OutputStreamWriter(p.getOutputStream()));
    bw.write("script1");
    bw.flush();
    bw.close();

  • App-V 5.0 Package and system folders

    Hope someone can help me, having a weird issue with an App-V package that I've sequenced. I am sequencing an application on Windows 8 x64, and during install the application adds .dll files to the
    c:\Windows\SysWOW64 folder. My sequenced machine is a VM with a saved snapshot, so for testing I revert back to the snapshot and expand the package to the local system. The program runs fine on the sequenced machine, and all the .dll files
    appear correctly in the SysWOW64 folder.
    When I go and deploy the package to a workstation (also running Win 8 x64) I get
    missing .dll errors and the files required are not in the SysWOW64 folder. I tried editing the package and under
    Package Files tab, changed the SystemX86
    folder to Override Local Directory. Still this does not solve the problem.
    What I don't understand is that it works perfectly on the sequenced machine, but does not for a workstation on our domain. Is there an issue with adding virtual files to protected folders? Or is there another way I can get this working?
    If anyone could help me with this issue, I would be greatly appreciated. It's sending me mad!
    Cheers!

    I have the same problem with Casesoft TimeMap 4 and Notemap 2.  No joke, cmen.dll is supposed to be in c:\windows\syswow64 but the virtual file system in AppV puts it in {systemx86}.  I'm not sure what path that resolves to but these two programs
    cannot find it where it's supposed to be.  If I add a file from c:\windows\system32, the variable is {system} and if I put it in c:\windows\system, it puts it in Windows\system in the VFS.  
    I tried forcing the path to be Windows\SysWOW64 but appv auto creates the path when you select the file and won't let you edit it manually.  
    I ended up making a cmd copy installer since it has simple copy protection of a plain text registry key

  • Error 225 When Loading DLL Compiled on This Computer

    Brief background and intent: Building a small high-precision math library for use in a special-purpose scripting language under development
    Recently completed a revision of the 64-bit DLL library's assembly source to improve performance of existing 128-bit division routines. Now when I load the library from any executable I get Windows
    Error 225 (ERROR_VIRUS_INFECTED). Furthermore, Windows 7 is deleting the files
    without notice at every call to LoadLibrary at the path. I can rebuild the file, but I cannot copy it out of its project folder using Explorer because it somehow
    immediately deletes copies without warning (I kid not), though cmd copy works.
    At prior versions the file had previously loaded successfully when built from earlier source. Now I cannot even test the file as a DLL without removing the new code sections.
    I have of course scanned the file with Avast, and it checks out. Object and library even disassemble and show components as expected.
    So is Windows doing some manner of static analysis of my executable? If so, what patterns in my design might be causing the false positives? Admittedly, there's a bit of spaghetti within the 600 bytes that make up the new division section, but I've
    seen far more grievous sins load up just fine. I can provide [ugly] source if it's deemed useful.
    Relevant System Details:
    Operating System:
    Windows 7 Home Premium SP1, 64 bit
    Associated Tools:
    Assembler: NASM version 2.11.05
    Linker: LINK version 12.00.30501.0
    LINK command line:
    link /DLL /ENTRY:DllMain /OUT:BigTypes.dll BigTypes.obj
    ...Yes, I run very minimal when I've the option to do so.

    Before sending the issue to the development forum I performed some further investigation regarding what characteristics of a DLL will cause Windows 7 to refuse to load it due to a false positive on virus identification.
    Technical explanation: Any time routines share a common exit point that is not declared as 'export' for the purposes of the DLL, the Windows loader could raise the red flag if the jump crosses another exported label that the loader does
    not understand to be part of the the body of the routine. This would cause critical components of a program to fail to load, likely without notice to the user.
    Seems to be a well-intended but poorly-conceived security feature of the Windows 7 loader.
    Potential consequences: As evidenced by my example, Windows also deletes the suspect file - also completely bypassing the recycle bin, and without warning -
    so for most users the error would be unrecoverable even with a system restore.
    Conclusion: Not sure if this is a Windows 7-specific issue or if this is a 'feature' of all versions of Windows. Had I a 64-bit machine running any other OS version I would be happy to test it. This makes me wonder specifically if early
    64-bit Windows XP loaders would behave similarly; and if not, this could help explain why some users report anonymous failures of certain programs to load with Vista and upward, or even after some updates to XP.
    Once I have time to create a more formal report I plan on submitting it to whomever at Microsoft is best equipped to address or in the very least
    document the behavior so both end-users and developers alike are aware of why application components are failing.

  • AAA authentication and authorization question

    Hi Everyone,
    I have a situation that is driving me crazy.
    I am using Cisco Freeware TACACS running on RedHat
    Enterprise Linux 3. I've modified the source code
    so that I can assign each individual users his/her
    own enable password. So far so good.
    I create two groups: group_A and group_S. group_A
    is for advanced users and group_S is for super
    users. Users that belong to group_A can have
    privilege level 15 but there are certain commands
    that they can not perform such as "write mem"
    or "reload". users that belong to group_S can do
    EVERYTHING.
    Here is my configuration on the TACACS configuration
    file:
    user = xyz {
    member = admin
    name = "User X"
    login = des 6.z8oIm9UGHo
    user = $xyz$ {
    member = admin
    name = "User X"
    login = des c2bUC43cmsac.
    user = abc {
    member = advanced
    name = "User abc"
    login = cleartext "cisco123"
    user = $abc$ {
    member = advanced
    name = "User abc"
    login = cleartext "cisco123"
    group = advanced {
    default service = deny
    cmd = show { permit .* }
    cmd = copy { permit flash }
    cmd = copy { permit running }
    cmd = ping { permit .* }
    cmd = configure { permit .* }
    cmd = enable { permit .* }
    cmd = disable { permit .* }
    cmd = telnet { permit .* }
    cmd = disconnect { permit .* }
    cmd = where { permit .* }
    cmd = set { permit .* }
    cmd = clear { permit line }
    cmd = exit { permit .* }
    group = admin {
    default service = permit
    configuration of the router:
    aaa new-model
    aaa authentication login notac none
    aaa authentication login VTY group tacacs+ local
    aaa authentication login web local enable
    aaa authentication enable default group tacacs+ enable
    aaa authorization exec notac none
    aaa authorization exec VTY group tacacs+ if-authenticated none
    aaa authorization commands 0 VTY group tacacs+ if-authenticated none
    aaa authorization commands 1 VTY group tacacs+ if-authenticated none
    aaa authorization commands 15 VTY group tacacs+ if-authenticated none
    aaa authorization network VTY group tacacs+ if-authenticated none
    aaa accounting exec TAC start-stop group tacacs+
    aaa accounting exec VTY start-stop group tacacs+
    aaa accounting commands 0 TAC start-stop group tacacs+
    aaa accounting commands 0 VTY start-stop group tacacs+
    aaa accounting commands 1 TAC start-stop group tacacs+
    aaa accounting commands 1 VTY start-stop group tacacs+
    aaa accounting commands 10 TAC start-stop group tacacs+
    aaa accounting commands 15 TAC start-stop group tacacs+
    aaa accounting commands 15 VTY start-stop group tacacs+
    aaa accounting network VTY start-stop group tacacs+
    aaa session-id common
    line vty 0 15
    exec-timeout 0 0
    authorization commands 0 VTY
    authorization commands 1 VTY
    authorization commands 15 VTY
    authorization exec VTY
    accounting commands 0 VTY
    accounting commands 1 VTY
    accounting commands 15 VTY
    accounting exec VTY
    login authentication VTY
    However, what I would like to do is to assign users
    in group_A the ability to go into "configuration t"
    but I do NOT want them to have the ability to peform
    "no tacacs-server host x.x.x.x key cisco". Furthermore,
    I would like to do everything via TACACS, I don't
    want configure "privilege level" on the router itself.
    Is that possible? Thanks.
    David

    Command Authorization Sets?Command authorization sets provide a centralized mechanism to manage TACACS+ administrative control. Driven by some of the largest enterprise and service provider networks that use Cisco Secure ACS, command authorization sets provide a method to group and name device command profiles that can be paired with users, groups of users, or network device groups. A key benefit of command authorization sets is the ability to remove any requirement of individual privilege level or command restrictions on each AAA client. This feature greatly enhances the scalability and manageability of setting device command authorization restrictions for network administrators.
    http://www.cisco.com/en/US/products/sw/secursw/ps2086/prod_release_note09186a00800ada4c.html

Maybe you are looking for