Using exec() to set Environment Vars in OSX

Hi everybody
I have some problems using the exec() command. Want I want to do is to start the tomcat Server out of my programm. Due to this reason I need to set two environment Variables and execute a shell script.
Standardshell in OS X is Tcsh. So I first tried to set the variables with setenv. It works great if I type it directly in the shell, if I do it over the exec() command there is an IO exception that command dont exists.
command = new String [] { "setenv" , "CATALINA_HOME='/users/piersrom/application/jakarta-tomcat-4.0.1'" };
process = runtime.exec(command);
After that I tried it with a shell call (also worked fine directly typed in to the shell):
command = new String [] { "/bin/sh" , "-c" , "export CATALINA_HOME=/users/piersrom/application/jakarta-tomcat-4.0.1" };
process = runtime.exec(command);
This code didnt worked too. There is no exception but the variables are not set.
The only thing that work out of the programm is to startup the server. But only after I set the variables manually before directly in the shell.
command = new String [] { "sh" , "/users/piersrom/applications/jakarta-tomcat-4.0.1/bin/startup.sh" };
process = runtime.exec(command);
So I am a little bit confused about the exec() command, I cant see the mistake. Maybe its a problem with the Policy? If yes what type of RuntimePermission has to be set?
Well I hope somebody see the problem...
Thx Roman

Thanks a lot for your help. Well I dont understand the difference between a shell and a OS command.
This would mean that for example finger is a OS command because this works without problems. How do I know which commands are shell and which OS specific?
I already wrote my own shell script and stored it in a file, made it executable and started it with exec(). It works great, only I was interested in solve everything with the exec() command (this seems more elegant to me....).
Thx Roman

Similar Messages

  • Runtime.exec and setting environment variables

    Runtime.exec and setting environment variables
    I need a decent example which works on Windows.
    Got any?

    Thank you.
    I was hoping for an example of the use of
    http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runti
    e.html#exec(java.lang.String,%20java.lang.String[]) or
    http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Runti
    e.html#exec(java.lang.String,%20java.lang.String[],%20j
    va.io.File) which take environment variable
    information such as PATH.
    The reason is because there is a library which is
    being loaded via loadLibrary (
    http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Syste
    .html#loadLibrary(java.lang.String) ). However, for
    the child process to find the library the PATH needs
    to be updated.
    Any example regarding changing the PATH variable via
    Java so that libraries can be loaded and processes
    created? (Perhaps, I should make a new post and
    restate the question with this more explicit
    information?)
    That won't work. LoadLibrary occurs in the JVM environment. As I said you can't change the JVM environment via exec().
    If the shared library needs something in the path then you are going to have to set the path before your application starts up.
    If you just need to load the library from someplace that is not on the path then you should be using System.load().

  • Set the environment vars

    Is there anyway to setup env variables inside java application. In CGI progs, I used to do putenv and setup all the environment I needed. How I can do the same thing in Java servlet or just java.
    -Raj

    Why?
    Changing a env var will not affect anything in java. And it will not propogate back up once it exits either (very limited usage for this last case.)
    And if you want to shell, via Runtime.exec() it has a way to set the vars for the shell.

  • Setting environment using custom script

    In our environment we have multiple db's of different versions running on same server.
    We are building a custom env script to set all env variables. We have created below script, it's not setting environment.
    Script is :
    #!/bin/sh
    set -x
    if [ $# != 1 ] ; then
    echo "Wrong number of parameters.Expected Oracle sid as parameter..exiting!!"
    exit 1
    fi
    PATH=/var/opt/oracle/bin:/usr/bin:/usr/xpg4/bin:/usr/ucb:/usr/openwin/bin:/usr/dt/bin:/usr/local/bin:/usr/ccs/bin:/opt/SUNWspro/
    bin:/opt/EMCpower/bin:/etc:/var/opt/oracle/standard/bin:/sbin:/usr/5bin:/usr/sbin:/usr/openv/neer/bin:/usr/openv/netbackup/bin:/
    usr/proc/bin:/usr/afsws/bin; export PATH
    unset ORACLE_SID LD_LIBRARY_PATH LIBPATH ORA_NLS33 ORA_NLS10
    ORACLE_SID=$1
    export ORACLE_SID
    ORAENV_ASK="NO";export ORAENV_ASK
    . oraenv
    if [ $? != 0 ] ; then
    echo "Running oraenv again from standard location /usr/local/bin/oraenv"
    . /usr/local/bin/oraenv
    fi
    echo "Oracle home is $ORACLE_HOME"
    LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH
    LIBPATH=$ORACLE_HOME/lib; export LIBPATH
    SHLIB_PATH=$ORACLE_HOME/lib; export SHLIB_PATH
    ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data; export ORA_NLS33
    ORA_NLS10=$ORACLE_HOME/nls/data; export ORA_NLS10
    If I do env | grep ora after script finishes. Changes in environment variable are not reflected. kindly help. Although I used set -x and saw that it's running fine.

    Not sure what you mean, but if I understand your need, functions might be a solution.
    The following is my oracle user's profile (it's Linux, but Solaris shouldn't be different) :
    export EDITOR=vi
    umask 022
    export ORACLE_BASE=/home/oracle/base
    o10()
    {       export ORACLE_SID=db102
            export ORACLE_HOME=$ORACLE_BASE/OraHome10
            export LD_LIBRARY_PATH=$ORACLE_HOME/lib
            export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
            export TNS_ADMIN=$ORACLE_BASE/OraHome11/network/admin
            export PS1='[\u@\h_10 \W]\$ '
    o92()
    {       export ORACLE_SID=db92
            export ORACLE_HOME=/scsi/OraHome92
            export LD_LIBRARY_PATH=$ORACLE_HOME/lib
            export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
            export TNS_ADMIN=$ORACLE_BASE/OraHome11/network/admin
            export PS1='[\u@\h_92 \W]\$ '
    o11()
    {       export ORACLE_SID=db11
            export ORACLE_HOME=$ORACLE_BASE/OraHome11
            export LD_LIBRARY_PATH=$ORACLE_HOME/lib
            export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
            export PS1='[\u@\h_11 \W]\$ '
    xe()
    {       export ORACLE_SID=XE
            export ORACLE_BASE=/usr/lib/oracle/xe/app/oracle
            export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/server
            export LD_LIBRARY_PATH=$ORACLE_HOME/lib
            export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
            export TNS_ADMIN=/home/oracle/base/OraHome11/network/admin
            export PS1='[\u@\h_XE \W]\$ '
    }If I want to set Oracle 10 environment I enter
    $ o10
    and similarly for others.

  • Runtime.exec Problem with setting environment

    Hello
    I will run a command with a new process environment. As example I take "ls". If I use the "exec(String)" method it works fine (like it should; my PATH is ...:/usr/bin:...).
    Next when I use "exec(String cmd, String[] env)" with cmd = ls and env = {PATH=} then the programm also prints out the listing of the current directory. In my opinion this shoudn't work.
    I have the problem using jdk1.2.2 (Solaris VM (build olaris_JDK_1.2.2_10, native threads, sunwjit)) on Solaris 8.
    As I understand the exec the method should work like this:
    1. fork a new Process
    2 set environment for the new process
    3 exec the new Programm in this process
    Is this statement right?
    On Solaris 2.6 the program works fine and I get an IOException.
    Some hints way the env for the process isn't set?
    Thanks
    ========================================================
    import java.io.*;
    public class Test {
    /** Version der Klasse. */
    public static final String VERSION = "$Revision:$";
    public static void main(String[] arg) {
    try {
    call("ls", new String[]{"PATH="});
    } catch (Exception ex) {
    System.out.println(ex);
    private static void call(String cmd, String[] env)
    throws Exception
    Runtime rt = Runtime.getRuntime();
    try {
    System.out.println(cmd);
    Process p = rt.exec(cmd, env);
    StreamGobbler errorGobbler = new
    StreamGobbler(p.getErrorStream(), "ERROR", System.err);
    StreamGobbler outputGobbler = new
    StreamGobbler(p.getInputStream(), "OUTPUT", System.out);
    errorGobbler.start();
    outputGobbler.start();
    try {
    p.waitFor();
    } catch (InterruptedException e) {
    if (p.exitValue() != 0) {
    throw new Exception("Process failed");
    } catch (IOException ex) {
    System.out.println("IOException: " + ex.toString());
    class StreamGobbler extends Thread {
    private InputStream m_input;
    private OutputStream m_output;
    private String m_type;
    private StringBuffer m_message;
    StreamGobbler(InputStream is, String type, OutputStream os) {
    this.m_input = is;
    this.m_output = os;
    this.m_type = type;
    this.m_message = new StringBuffer();
    outputGobbler.start();
    try {
    p.waitFor();
    } catch (InterruptedException e) {
    if (p.exitValue() != 0) {
    throw new Exception("Process failed");
    } catch (IOException ex) {
    System.out.println("IOException: " + ex.toString());
    class StreamGobbler extends Thread {
    private InputStream m_input;
    private OutputStream m_output;
    private String m_type;
    private StringBuffer m_message;
    StreamGobbler(InputStream is, String type, OutputStream os) {
    this.m_input = is;
    this.m_output = os;
    this.m_type = type;
    this.m_message = new StringBuffer();
    public synchronized void run() {
    try {
    InputStreamReader reader = new InputStreamReader(m_input);
    BufferedReader bufferedReader = new BufferedReader(reader);
    PrintWriter writer = new PrintWriter(m_output, true);
    String line = null;
    while ( (line = bufferedReader.readLine()) != null) {
    writer.println(m_type + "> " + line);
    this.m_message.append(m_type + "> " + line + "\r\n");
    } catch (IOException ioe) {
    ioe.printStackTrace();
    public synchronized String getMessage() {
    return this.m_message.toString();

    I'm having the same problem...
    Have you been able to solve your problem yet?

  • How to set environment variables using java program

    Hi all
    I want to set environment variables on windows 98/200/xp system, such as path and classpath using a java program.
    How to do this using a java program.
    Any body plz helppppppppp.

    #1 05-02-2003, 07:38 AM
    Goodz13 Join Date: Jan 2002, Posts: 985
    Location: Halifax, NS, Canada
    Reputation:
    Java FAQ's and tutorials
    Java FAQ's
    Path and ClassPath:
    PATH
    In Windows 9x you would set it up in the autoexec.bat file
    ie.
    SET PATH=%PATH%;c:\jdk1.4.2\bin\;
    where c:\jdk1.4.2\ is the path where you installed Java.
    In Windows 2000 and XP
    Right click on My Computer->Properties->Advanced Tab->Environment Variables... Button.
    If you see a PATH in System Variables, click that and edit it. If you don't, you will need to create a new System variable.
    It should look something like this:
    %SystemRoot%\system32;%SystemRoot%;c:\jdk1.4.2\bin\;
    Any querry email me to [email protected]
    Answer by
    Rajasekhar Goli
    DS UNICS Infotech

  • Unabled to set Environment Variables to point to javac.exe

    Hi everyone
    I have recently installed the Java Development Kit 6 in my Windows 7 Ultimate 32 bit installation but not been able to set the path to the javac compiler in the Environment Variables. What I have done so far is:
    Opened the Environment Variables dialog obx
    Created a new PATH to C:\Program Files\Java\jdk1.6.0_20\bin under User Variables
    Added C:\Program Files\Java\jdk1.6.0_20\bin to the right end of the series of directories called 'Path' under System Variables
    The instructions on this in the Oracle website seems to be written for Windows XP and apparently different setup is required for Windows 7. All I want to do is every time I launch Command Prompt, the Prompt knows where javac.exe is so it can execute it without my typing the path to the compiler.
    A funny thing I noticed is that Windows 7 only has a variable called 'Path' under System Variables not under User Variables.
    I would like to have as much as avice/instructions as possible because it has been nagging me for quite some time and irresolvable.
    Thank you in advance,
    Derek

    Environment (env) variable names are case insensitive. So Path and PATH are the same.
    The 'System' env vars are at the top.
    The 'User' env vars inherit from the 'System' env vars. So every env var in 'System' is in 'User'. The 'User' exists so that two people on the same box can have different env vars.
    If you want to use 'User' to set the Path then you would do it like this in the User panel.
    <pre>%PATH%;C:\Program Files\Java\jdk1.6.0_20\bin</pre>
    That would add your java path to the System one. If you are not concerned about users then you can just modify System.
    You can verify the settings by opening a console window and typing the following.
    <pre>set PATH</pre>
    As for why it is isn't working.
    - You forgot to say 'Ok'. I do this occassionally. Until you hit Ok on the Env Variables main box your changes do not get applied.
    - Something is actually wrong with the path that you typed.
    - Win 7 might not propogate into the OS like previous systems. I believe I have seen this. I know that the console shell was re-written for Win7 to make it a more integral part of the OS. Rebooting solves this and log in/out might as well. Or I might just be mistaken as well.

  • How i can set environment variable with java?

    i'm tring to set it using System.setProperty("java.class.path") but it dosen't work any body help?

    you will have to find out the EXACT verbage, but it's
    something like this I suppose:
    Runtime runtime = System.getRuntime();
    runtime.exec("cmd set MY_VAR=blahhhhhhh");Yes... this creates a new process, then sets the MY_VAR environment variable for that process to "blahhhhhhh", then terminates that process.
    However I think you are asking the wrong question, since your post suggests you are trying to change your classpath programatically. Ask the question you thought that was the answer to instead.

  • Getting core dump when using EXEC SQL CLOSE

    In my pro*c program , i have used a cursor to fetch the set of accounts.Once cursor is opened , code will perform set
    of operation using fetched data and then cursor is closed. Between open and closing of cursor , i have used 23 EXEC
    SQL CLOSE. For example i am copying the value of a to b using strlcpy between fetch and close cursor statement.If
    returned value from strlcpy is greater than size of destination variable, then flow should not proceed , in that case I will
    close the cursor using EXEC SQL CLOSE and return the flow to calling program. Similarly i have closed the cursor at
    another 22 locations.
    When i compile the code and run binary the core dump occurs. On analyzing the core it shows
    t@null (l@8) terminated by signal SEGV (no mapping at the fault address)
    0xffffffffffffffff: <bad address 0xffffffffffffffff>
    dbx: core file read error: address 0xfc4ffe48 not in data space
    Current function is dbMtBaseClass::Pswd_Change
    7860 sqlcxt(&_dbMtCtx, &sqlctx, &sqlstm, &sqlfpn);
    if I remove any of the three EXEC SQL CLOSE commands , core dump does not occurs.
    It looks strange.Please help me to resolve the issue.

    In my pro*c program , i have used a cursor to fetch the set of accounts.Once cursor is opened , code will perform set
    of operation using fetched data and then cursor is closed. Between open and closing of cursor , i have used 23 EXEC
    SQL CLOSE. For example i am copying the value of a to b using strlcpy between fetch and close cursor statement.If
    returned value from strlcpy is greater than size of destination variable, then flow should not proceed , in that case I will
    close the cursor using EXEC SQL CLOSE and return the flow to calling program. Similarly i have closed the cursor at
    another 22 locations.
    When i compile the code and run binary the core dump occurs. On analyzing the core it shows
    t@null (l@8) terminated by signal SEGV (no mapping at the fault address)
    0xffffffffffffffff: <bad address 0xffffffffffffffff>
    dbx: core file read error: address 0xfc4ffe48 not in data space
    Current function is dbMtBaseClass::Pswd_Change
    7860 sqlcxt(&_dbMtCtx, &sqlctx, &sqlstm, &sqlfpn);
    if I remove any of the three EXEC SQL CLOSE commands , core dump does not occurs.
    It looks strange.Please help me to resolve the issue.

  • How to use different Apple ID on AppStore in OSX ML

    Hello Together,
    We have a new Machbook in out Family, so I used my wifes iCloud ID to configue everything, so her contacts Photos and all the rest will be there. But like on here iPhone I normally use my AppleID for the Appstore. In iOS I can set up a differnt one explicit for the Appstore. This is our family-cloud ID. Where do i set this up in OSX Mountain Lion?
    Kind regards
    Markus

    Sorry for this question, somethimes google knows better where to look.
    http://support.apple.com/kb/HT4895
    For all that search in App Store --> go to iTunes to manage the Store Account :-)

  • How to use AppleScript to set "character fill color" in Pages 5.2?

    For Pages 5.2 on OSX 10.9.3, what is the correct applescript for changing the "character fill" of text in pages. 
    If you highlight text, you do this via your mouse in the inspector by clicking "style," "advanced option (the gear wheel to the right of bold, italics, and underline), "character fill color (clicking on the multi-color circle, not the dropdown menu), and then choosing a color that comes up in the "colors" dialogue box.
    I've looked all over and cannot find how to use applescript to set the character fill color in pages. 
    In some examples (not directly related) I see "character fill" used. 
    In others, I see "colorfill." 
    Basically, I want to use applescript, embedded in a keyboard maestro macro, to change the background color of the text (not the text color itself) to particular colors. 
    Given the changes and updates to Pages this year, and to applescript, what's the easy way to do this?
    Thanks!
    Chuck

    Pages v5.2 still does not include selection-object, or character background color entries in its AppleScript dictionary, as does Pages ’09. Indirectly, using System Events, you can get the text selection in Pages v5.2, but then you can do nothing to change the selection. No assurances as to if or when Apple will mature the AppleScript dictionary support for Pages v5 series.

  • How to use "Reference Structure" setting in analysis grid item

    Hello expert,
            in Bex analyzer, how to use "Reference Structure" setting in analysis grid item by example?
    Many thanks,

    The variable needs assigned a value, that's why you're getting prompted. When you execute the statement, it's not executing the variable and exec lines.
    Having script output available in a grid would be an enhancement request.

  • Error using wldeploy in unix environment

    I am trying to use wldeploy ant task to deploy and undeploy applications from my server in a unix environment, and keep getting errors there, and not locally on a XP development workstation. Below are my buildfile and the error that I am getting. Anyone have any ideas as to what may be wrong?
    build.xml
    <target name="undeploy" description="Undeploys app">
    <wldeploy user="${user}" password="${password}"
    adminurl="${adminurl}" remote="true"
         action="stop" name="${appname}" debug="true"
    verbose="true"/>
    </target>
    And here is the error:
    [wldeploy] weblogic.Deployer -debug -remote -verbose -noexit -name ${appname} -adminurl iiop://${host}:${port} -user ${user} -password ${password} -stop
    [wldeploy] weblogic.Deployer invoked with options: -debug -remote -verbose -noexit -name broker-co
    ntact.ear -adminurl iiop://${host}:${port} -user ${user} -stop
    [wldeploy] [WebLogicDeploymentManagerImpl.<init>():103] : Constructing DeploymentManager for J2EE v
    ersion V1_4 deployments
    [wldeploy] [WebLogicDeploymentManagerImpl.getNewConnection():146] : Connecting to admin server at a
    lice.healthpartners.com:8001, as user system
    [wldeploy] [ServerConnectionImpl.getEnvironment():288] : setting environment
    [wldeploy] [Debug.say():43] : getting context using iiop://alice.healthpartners.com:8001
    [wldeploy] [Debug.say():43] : Connecting to MBeanServer at service:jmx:iiop://${host}:${port}/jndi/weblogic.management.mbeanservers.domainruntime
    [wldeploy] java.io.IOException
    [wldeploy] at weblogic.management.remote.common.ClientProviderBase.makeConnection(ClientProvide
    rBase.java:135)
    [wldeploy] at weblogic.management.remote.common.ClientProviderBase.newJMXConnector(ClientProvid
    erBase.java:79)
    [wldeploy] at javax.management.remote.JMXConnectorFactory.newJMXConnector(JMXConnectorFactory.j
    ava:341)
    [wldeploy] at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:262)
    [wldeploy] at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.getMBeanServer(Serve
    rConnectionImpl.java:240)
    [wldeploy] at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.getMBeanServerForTyp
    e(ServerConnectionImpl.java:191)
    [wldeploy] at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.init(ServerConnectio
    nImpl.java:147)
    [wldeploy] at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.getNewConnection(Web
    LogicDeploymentManagerImpl.java:148)
    [wldeploy] at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.<init>(WebLogicDeplo
    ymentManagerImpl.java:118)
    [wldeploy] at weblogic.deploy.api.spi.factories.internal.DeploymentFactoryImpl.getDeploymentMan
    ager(DeploymentFactoryImpl.java:84)
    [wldeploy] at weblogic.deploy.api.tools.SessionHelper.getDeploymentManager(SessionHelper.java:4
    32)
    [wldeploy] at weblogic.deploy.api.tools.deployer.Jsr88Operation.connect(Jsr88Operation.java:302
    [wldeploy] at weblogic.deploy.api.tools.deployer.Deployer.perform(Deployer.java:137)
    [wldeploy] at weblogic.deploy.api.tools.deployer.Deployer.runBody(Deployer.java:88)
    [wldeploy] at weblogic.utils.compiler.Tool.run(Tool.java:158)
    [wldeploy] at weblogic.utils.compiler.Tool.run(Tool.java:115)
    [wldeploy] at weblogic.Deployer.run(Deployer.java:70)
    [wldeploy] at weblogic.Deployer.mainWithExceptions(Deployer.java:62)
    [wldeploy] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [wldeploy] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
    [wldeploy] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java
    :43)
    [wldeploy] at java.lang.reflect.Method.invoke(Method.java:615)
    [wldeploy] at weblogic.ant.taskdefs.management.WLDeploy.invokeMain(WLDeploy.java:419)
    [wldeploy] at weblogic.ant.taskdefs.management.WLDeploy.execute(WLDeploy.java:349)
    [wldeploy] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
    [wldeploy] at org.apache.tools.ant.Task.perform(Task.java:364)
    [wldeploy] at org.apache.tools.ant.Target.execute(Target.java:341)
    [wldeploy] at org.apache.tools.ant.Target.performTasks(Target.java:369)
    [wldeploy] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
    [wldeploy] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
    [wldeploy] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:4
    0)
    [wldeploy] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
    [wldeploy] at org.apache.tools.ant.Main.runBuild(Main.java:668)
    [wldeploy] at org.apache.tools.ant.Main.startAnt(Main.java:187)
    [wldeploy] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
    [wldeploy] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
    [wldeploy] Caused by: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
    [wldeploy] java.io.EOFException]
    [wldeploy] at weblogic.jrmp.Context.lookup(Context.java:189)
    [wldeploy] at weblogic.jrmp.Context.lookup(Context.java:195)
    [wldeploy] at javax.naming.InitialContext.lookup(InitialContext.java:363)
    [wldeploy] at weblogic.management.remote.common.ClientProviderBase.makeConnection(ClientProvide
    rBase.java:126)
    [wldeploy] ... 35 more
    [wldeploy] Caused by: java.rmi.ConnectIOException: error during JRMP connection establishment; nest
    ed exception is:
    [wldeploy] java.io.EOFException
    [wldeploy] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:293)
    [wldeploy] at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:190)
    [wldeploy] at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:321)
    [wldeploy] at weblogic.jrmp.BaseRemoteRef.invoke(BaseRemoteRef.java:221)
    [wldeploy] at weblogic.jrmp.RegistryImpl_Stub.lookup(Unknown Source)
    [wldeploy] at weblogic.jrmp.Context.lookup(Context.java:185)
    [wldeploy] ... 38 more
    [wldeploy] Caused by: java.io.EOFException
    [wldeploy] at java.io.DataInputStream.readByte(DataInputStream.java:269)
    [wldeploy] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:234)
    [wldeploy] ... 43 more
    [wldeploy] [Debug.say():43] : Closing DM connection
    [wldeploy] [Debug.say():43] : Unregistered all listeners
    [wldeploy] weblogic.deploy.api.tools.deployer.DeployerException: Unable to connect to 'iiop://${host}:${port}': null. Ensure the url represents a running admin server and that the crede
    ntials are correct. If using http protocol, tunneling must be enabled on the admin server.
    Thanks.
    Scott

    Hi Richard,
    I had the same issue using Eclipse. I just tried to run the
    ant script outside of Eclipse and it worked fine.
    This is an Eclipse-Ant Class Loader issue.
    In order to make it work in Eclipse, You have to :
    1. Open the External Tool Run Configuration.
    2. Select your Ant script.
    3. Select JRE Tab.
    4. In Runtime JRE section, choose Seperate JRE.
    Hope this helps !
    Eric

  • Rework using reference operation set

    Dear Gurus,
    Am working in an ECC 6.0 environment.
    Want to create rework order using reference operation set.
    Master data created:
    BoM
    Reference Operation set to which the header material is assigned to which a BoM is assigned.
    The settings in OPL8 for order type ZXXX are:
    Production version :  manual selection
    Routing:
    Application: Routing
    Selection Id: RW (priority 01, task list type 'S', and usage 1)
    Task list type: S
    Routing Selection: 4
    BoM:
    Application: PP01
    Create a production order (CO01), with order type ZXXX. The system asks to select the task list group once the order quantity and dates are entered. On selection of the Group for the reference operation set system generates an error 'No valid BoM exsists for Material xxxxx Plant xxxx'.
    SAP helps says - A reference operation set cannot be used directly in production.
    Am I doing something wrong?
    Your expert advice please.
    Tarang

    Dear first create a reference operation set go to CA11 just press enter without entering anything then enter plant,usage,status and lot size in component allocation you can select the required BOM and assign with the operation.
    and create the order in CO07 enter the plant and order type in next screen don't give any material code give description rework and give the quantity to be reworked and in components give the required components for consumption during rework before this you need to give the reference operation set group and task list in the popup and in settlement rule maintain the category and settlement receiver and save the order.
    You can confirm the order in CO15 by providing the order number and enter the yield quantity to confirm and save.
    Please note that during this rework order confirmation, only Goods issue will happen based on the input given in the components tab rework order and NO GOODS RECIEPT will happen.
    Cheers
    KK

  • Failed using exec and wait_for_file functions in Unix for DS X3.1

    Hi,
    Unix version --> 11.23 running of HP-UXIA64
    DS version   --> Data Services X3.1
    I able to run exec and wait_for_file fuctions in my local Windows environment using cmd.exe to move files or copy files around folders.
    A) However, I failed to run Unix command using exec function to get any similar results, the test script that i wrote in DS is like this:
    (1) DS Scripts:
    ==========
    $G_Var1 = exec('/usr/bin/sh', 'pwd', 8);
    Print('**** Unix result: \[$G_Var1\] ****');
    log returns as such:
    ==================
    PRINTFN     5/12/2008 11:56:35 AM     **** Unix result:       1: pwd: invalid multibyte character ****
    (2) DS Scripts:
    ==========
    $G_Var1 = exec('', '/usr/bin/sh pwd', 8);
    Print('**** Unix result: \[$G_Var1\] ****');
    log returns as such:
    ==================
    PRINTFN     5/12/2008 11:59:10 AM     **** Unix result:       0:  ****   (--> although 0 but can't see any return pwd result)
    I have tried several versions such as using just sh instead of full path /usr/bin/sh, but also can't work.
    B) For the wait_for_file function, the script is:
    wait_for_file('/source/data/dummy.txt', 0, 0, 1, $G_Path_Filename);
    print('**** Source file and path is = \[$G_Path_Filename\] ****');
    (--> nothing return for the global variable)
    Please advice and thank you.

    Hi,
    I found out one peculiar behavior regarding to Unix delete command of 'rm'.
    My goal is to delete some files using '*.txt' wildcard in Unix command.
    I could perform all following shell scripts at Unix level successfully, but just can't find a way to use the method inside exec function.
    The differrent ways that I had tried out:
    1) exec('rm', '-f *.txt', 0);                -
    > no effect, doesn't work.
    2) exec('rm', '-f `ls *.txt`', 0);          -
    > no effect, doesn't work.
    3) exec('rm', '-f data.txt', 0);          -
    > It worked, but I want to delete few files of type txt, not just one specific file.
    Please advice is it a bug some where?
    Edited by: Chow Ming Darren Cheeng on Dec 9, 2008 3:10 AM

Maybe you are looking for

  • Windows XP and iOS 5

    So does anyone have any idea as to why when I updated iTunes to 10.5 and now my iPod touch is no longer recognized by my computer?  I've been trying to figure this one out, the Apple support pages haven't been any help.  I've basically done everythin

  • Add inspection characteristics to production order created via CO07

    Hi, all. We're creating production orders to perform production rework on assemblies using transaction CO07.  We have a requirement to inspect and make a usage decision on the reworked assembly. Since there is no material at the header level for CO07

  • Supported file formats in Photoshop CS6

    This question was posted in response to the following article: http://helpx.adobe.com/content/help/en/photoshop/using/supported-file-formats-photoshop-cs 6

  • Elements 10 Organizer Issue

    Whenever I edit a photo and close editor, the Organizer jumps back to the first photo in the catalog.  Has anyone else had this problem with Elements 10?  All my previous versions of Elements Organizer stay on the photo I just edited.

  • Caching Result Set ?

    folks I have a search page which returns a result set and the results are put in the session to be able to access when user clicks on the page numbers(pagination) in the results pane. Is there any way we can store or cache this and access instead of