To set environment variables in OC4J stand alone server

Hello,
I deployed my application to OC4J standalone server. I need to set some environment variables, which will be accessed from my application.
Could you please let me know, how to set the environment variables for the application which runs from stand alone OC4J server ?
Thanks!

Hello,
Thanks for providing me the information. Here is what I am trying to accomplish...
I have a Web service application which in turn calls a Java application and which invokes a third party application. The third party application expects some environment variables to be set.
I set these environment on my local machine, and when I executed the Java application as a standalone application within JDeveloper - it works. But when I deployed this application to the stand alone OC4J server and when I execute the application, the third party application is not getting the environment variables correctly. (that's what I am guessing here..)
I just put System.getenv() to get the environment variables and the value is displaying correctly.
As Jacco suggested, I passed these env. variables thru' the startup of OC4J server.
(i.e.) java -D<variable1>=value1 -D<variable2>=<value2> -jar oc4j.jar and still didn't work.
Do I have to pass these values thru' any XML file within OC4J server..
Any thoughts ? I appreciate if you can provide some input.
Thanks!

Similar Messages

  • Web Services - Issue with running OC4J stand alone server from JDeveloper

    I created a stand alone OC4J App. server instance in JDeveloper. I deployed my Webservice (WebServices.deploy) to that OC4J server.
    Now I want to test my web service. I opened a browser window and I specfied the URL as
    http://localhost:<RMI Port#>/<Project1>-context-root/<Webservice name>.
    Default RMI Port#23791.
    http://localhost:23791/<Project1>-context-root/<Webservice name>.
    and I am getting the following error message
    ã vInvalid protocol verification, illegal ORMI request or request performed with an incompatible version of this protocolvInvalid protocol verification, illegal ORMI request or request performed with an incompatible version of this protocol.
    Could you please let me know, what's going on.
    Thanks!

    OK, so there's two threads in this email.
    1. When using a Web browser client and an OC4J standalone instance, the default address of the OC4J website is http://host:8888/.
    The port you keep referring to is the ORMI port. That is a different protocol that is used with EJBs, and our remote deployment mechanism. As you have observed, JDeveloper uses it to deploy to the OC4J instance.
    2. The root problem you are seeing is related to the message you posted on the console.
    OC4J 10g (10.1.3) Default Web Site. Application: bc4j does not exist. Error creating Web application: webapp
    Because this web app is misconfigured, its not starting so you can't access it.
    In the j2ee/home/config/default-web-site.xml file, there is a reference to an application called BC4J -- which is not available on the server as a deployed application.
    So you need to correct that situation -- BC4J is not normally present in a vanilla OC4J standalone distribution.
    You can try editing the j2ee/home/config/default-web-site.xml file and remove the <web-app> entry that mentions BC4J and then try starting OC4J.
    If you don't have a lot of time invested in configuring the instance, you could also try extracting oc4j_extended.zip again and starting with a fresh one.
    cheers
    -steve-

  • Set environment variable in oracle 10g application server control rel3

    hi all,
    i am trying to connect to emc centera through 10g rel3 , here i am getting error .
    error name is:
    com.filepool.fplibrary.FPLibraryException: Error loading FPLibrary or one of its dependencies
    at com.filepool.fplibrary.FPPool.<init>(Unknown Source)
    if any body knows please help me.
    Thanks and regards
    Pravin

    Hello,
    Take a look to http://buttso.blogspot.com/2006/08/accessing-environment-variables-from.html
    Regards
    Tugdual Grall

  • Response.addCookie() not working on OC4j stand alone server

    Hi,
    I have problem with response.addCookie(). see the code below:
    if ((isCookie == null)||(!(isCookie.equals("yes")))) {
    String cookiestr="I am OK";
    Cookie m_cookie = new Cookie("msign",cookieStr);
    m_cookie.setMaxAge(300);
    response.addCookie(m_cookie);
    This part of the code is in Struts Action class. The read Cookie part is in JSP.
    Cookie[] cookies= request.getCookies();
    if(cookies != null)
    for (int i = 0; i < cookies.length; i++)
    if (cookies.getName().equals("msign"))
    String infor = cookies[i].getValue();
    response.sendRedirect("hellow.jsp");
    break;
    Add cookie and read cookie work fine on my computer If I runs application on JDeveloper 10g embeded OC4j server. I can see the cookie in the Temporary Internet files
    However, I deployed the application on OC4j standalone server, it does not work. response.addCookie() does not work at all. The cookie is not sent to the browser at all. There is no this cookie in Temporary internet file. The page is not directed to hellow.jsp.
    Does anybody here know why? Any idea?
    Thank you very much!
    jfu
    Edited by: jfu on Dec 15, 2009 1:26 PM

    Hi,
    I have problem with response.addCookie(). see the code below:
    if ((isCookie == null)||(!(isCookie.equals("yes")))) {
    String cookiestr="I am OK";
    Cookie m_cookie = new Cookie("msign",cookieStr);
    m_cookie.setMaxAge(300);
    response.addCookie(m_cookie);
    This part of the code is in Struts Action class. The read Cookie part is in JSP.
    Cookie[] cookies= request.getCookies();
    if(cookies != null)
    for (int i = 0; i < cookies.length; i++)
    if (cookies.getName().equals("msign"))
    String infor = cookies[i].getValue();
    response.sendRedirect("hellow.jsp");
    break;
    Add cookie and read cookie work fine on my computer If I runs application on JDeveloper 10g embeded OC4j server. I can see the cookie in the Temporary Internet files
    However, I deployed the application on OC4j standalone server, it does not work. response.addCookie() does not work at all. The cookie is not sent to the browser at all. There is no this cookie in Temporary internet file. The page is not directed to hellow.jsp.
    Does anybody here know why? Any idea?
    Thank you very much!
    jfu
    Edited by: jfu on Dec 15, 2009 1:26 PM

  • Setting up CIMC on C220 stand-alone server for LDAP authentication.

    I'm trying to setup the CIMC so that all users who require access to the console of the server have to be authenticated by Active Directory. I have placed my authenticated users in an AD group called "APAC IT Administrators".
    Here are the fields I have so far:
    Enable LDAP: Checked
    BaseDN: DC=mydomain,DC=com
    Domain: mydomain.com
    Enable Encryption: Checked
    Time Out: 60s
    Configure LDAP Servers: Checked
    Server 1: 10.0.0.100
    Port: 389
    Server 1: 10.0.0.101
    Port: 389
    Binding paramters:
    Method: Login Credentials
    Search Parameters:
    Filter Attribute: sAMAccountName
    Group Attribute: memberOf
    Attribute: CiscoAVPair
    LDAP Group Auhtorisation: Checked
    Index: 1
    Group Name: APAC IT Administrators
    Group Domain: mydomain.com
    Role: Admin
    I've read here (http://www.aaviso.com/tech/?p=94) something about having to create a new attribute for domain users then assigning the attribute to the specific users, which I have not done so far as I do not have permission to do this and needs to be done by a higher source, but would this be the reason I cannot get the CIMC logon to authenticate against AD? Is there a log I can check to see what the problem is?
    When I try to log onto the CIMC using the format "mydomain\myusername", I get the error "Login failed. Verify that your username and password are correct."
    CIMC is version 2.0(3e).
    Thanks.

    Ingo thanks very much for replying..
    We called up BusinessObjects Service to ask where we can download the SAP Integration Kit for Crystal XI but they had didnt have a solid answer for us.
    We have the SAP GUI and also installed the Crystal Reports Designer XI from the CD.  Also the installation of Crystal XI prompted me to download SP1 from internet and we did that.
    As a result of the Service Pack installation another SAP component got installed called the "SAPInteractiveXL1" which is excel based.  There is a connection SAP icon toolbar in SAPInteractiveCl1 but when the SAP GUI pops up and I input my logon information it just says says "Connecting..." and the excel just hangs....
    So right now I have no clue where to get
    - Client components from the BusinessObjects SAP Integration Kit

  • Maximum concurrent user on OC4J Stand Alone ?

    Hi All,
    I have questions on OC4J :
    1) How many concurrent user that can be supported by OC4J 10.1.3 Stand Alone ?
    2) What is different between OC4J Stand Alone and OC4J Stand Alone that comes with JDev ?
    Thank you,
    xtanto

    Hi,
    1.) This depends on your application and of the configuration of OC4J (for example JVM parameter).
    2.) Afaik there is no difference between both OC4J. OC4J which comes with JDev
    is the J2EE runtime environment for JDeveloper. For development purposes it is much easier to use the embedded OC4J instead of deploying first the application to a remote OC4J.
    Regards
    Kersten

  • Mountain Lion: how set environment variables

    Am I correct that for Mountain Lion, if not earlier, the only way to set environment variables at the system level is to use (or create) a file /etc/launchd.conf that contains commands such as:
    setenv CATALINA_BASE /opt/local/share/java/tomcat6
    (That does seem to work as expected.)
    If so, how does one do this by referencing the value of something else, e.g., to set JAVA_HOME? I tried
    setenv JAVA_HOME $(/usr/libexec/java_home)
    but then in Terminal if I run
    echo $JAVA_HOME
    I just get back $(/usr/libexec/java_home).
    By contrast, if I put that same setenv JAVA_HOME $(/usr/libexec/java_home) command into my ~/.profile, then the result of echo $JAVA_HOME is the actual value referenced, namely, /Library/Java/JavaVirtualMachines/jdk1.7.0_15.jdk/Contents/Home.

    Linc Davis wrote:
    launchd is not a shell and does not peform expansion. You have to use literal expressions. But you can also modify the bash environment system-wide by editing the file /etc/profile.
    But sudo emacs /etc/profile won't let me edit this file: it's read-protected, emacs says.
    What permissions should I give it? Right now it's in group wheel, owned by root but with Read permission only.
    P.S. And is it really a good idea to edit /etc/profile -- assuming I can suitably set the permissions to do so? Apple goes out of its way to try to hide this file: /etc is a link to /private/etc, e.g.

  • Forget to set environment variable export SAPINST_USE_HOSTNAME

    Dear Experts
    we have installed the SAP ECC6.0 EhP4 in HACMP environment with AIX6.1 ,Power HA cluster6.1, oracle 11g database
    the problem is while installing the CI and ASCS and Dialog instance I  missed  to set environment variable
    export SAPINST_USE_HOSTNAME = <virtual Host Name> and while starting the sap-inst also i didn't start as like
    ./sapint SAPINST_USE_HOSTNAME  = <virtual Host Name>,Now i am facing problem while doing cluster fail over to another node
    Node A host Name is not reflecting in Node B and I am not able to start  the SAP with host name of Node A
    in AIX6.1 in IBM Admin they didnt give any virtual host name they said that they  have configured  the cluster with two service IP there is no virtual IP in AIX6.1
      please help me out how to resolve this host Name issue and to start the SAP in Node B
    Thanks in Advance
    krishna

    Hi Krishna,
    I dont agree with the AIX 6.1 having no virtual ip's, because i recently installed a HA instance with ASCS, SCS & also ERS on 6.1
    to answer your questions:-
    "can you tell is this correct setup or anything we did mistake for file system setup and installation"
    This depends on what your requirement is. Typically a cluster will have Oracle on one host and SAP on the other host. Ill explain the VCS concept, so you will have a better understanding.
    Lets consider Node1 & Node2. Now each node will have a physical IP and a virtual IP. The Virtual IP will be associated with a set of file systems. For example /oracle will be associated to virtual ip lets say "xyzDB" & the /usr/sap/<sid>, TRANS & sap mount will be associated with virtual ip lets say "abcCI". Now when the cluster fails over to which ever node, these file systems will still be associated with their respective virtual ip's.
    So, the start profile will always have START_DVEBMGS_abcCI. Irrespective of which Node the sap is in, when you start the SAP, it will use the virtual hostname and start up SAP. I hope your getting the concept.?
    Coming back to the setup, since you have ASCS, Oracle , CI & a dialog instance. Im not sure what file systems you have associated with VCS groups. Can you give command "hastatus -sum" and post the output?
    Regarding your other question
    "this file system is moving to Node B but while starting SAP on Node B host Name is not reflecting and SAP is not coming up  due to there hostname didnt change in Node B,, can you advice me please ,,"
    This is inline with what i explained above for cluster mechanism. The physical IP will not change. It is only the virtual IP that is associated with a set of file systems.
    Ill give you one more example, Consider the parameter rdisp/mshost = <> . What should this be? Physical host or Virtual host?? :-) .It should be Virtual. Because the CI can be in Node1 or Node2. If we give the physical host, then if the SAP fails over to the other node. How will it start up? because the profiles still say the message server is in the other host... Getting my point?
    Regards,
    Shanser

  • Not able to download OC4J stand-alone user's guide

    Hi,
    I tried to download Oracle9iAS J2EE container (OC4J) stand-alone users guide ( The file name is
    http://otn.oracle.com/tech/java/oc4j/pdf/oc4j_so_usersguide_r2.pdf). It is a pdf file. It shows the first page of the document in the browser. When try to go to other pages, it hangs-up and says
    " A File I/O occurred. Connection Timed-out"
    after some time.
    Could u please correct it ? If not, atleaset, could u let me know whether atleast HTML version is available ?
    tnr,
    Sai

    Hi,
    try the following URL, there can you select which version of the docs you would like to display:
    http://otn.oracle.com/documentation/ias.html
    Thanks
    @

  • How to set environment variables in WL ?

    Hi,
    How to set environment variables in WL ?
    Thanks,
    Srivi

    Hi,
    You can set the environmet variable in Weblogic by using the below commands
    setWLSEnv.cmd/sh ==>Set the CLASSPATH to include the WebLogic Server classes.
    Overview of WebLogic Server Domains
    or you can use to set the Environment variable along with domain specific varables using the SetDomainEnv.cmd
    To run SetDomainEnv.sh in Linux please use
    . ./setDomainEnv.sh it require two dots (Dont miss it )
    http://docs.oracle.com/cd/E28280_01/web.1111/e13749/weblogicserver.htm#ADMRF205
    Hope it helps

  • Set environment variables

    Does a user need to have certain rights or access to certain libraries to
    set environment variables off or on when running a pl/sql script?
    environment variables such as:
    set echo off;
    set termout off;
    thanks

    It is possible to disable certain SQL*Plus, SQL and PL/SQL commands, using the PRODUCT_USER_PROFILE table (note that this only affects the SQL*Plus environment).
    See: http://download-west.oracle.com/docs/cd/B10501_01/server.920/a90842/ch10.htm#1005596

  • How to set environment variable ORACLE_HOME ?

    Hi
    I trying to install SAP Solution manager 4.0 SR3:
    OS: Linux RHEL4u4
    DB: Oracle
    SAPinst now stops the installation.
    To proceed with the installation, install the Oracle database as follows:
    1.Log in as user orassm.
    2.Set the DISPLAY variable.
    3.Change to directory /oracle/stage/102_32/database/SAP.
    4.Start './RUNINSTALLER'.
    After you installed the Oracle database software, proceed with the database instance
    installation by choosing 'OK' in this dialog box.
    ./RUNINSTALLER
    oracle_stage is not set (OK)
    oracle_base is not set (OK)
    oracle_home is not set (OK)
    oracle_sid is not set (OK)
    oracle_home_name is not set (OK)
    oracle_inst_group is not set (OK)
    from_location is not set (OK)
    tmp_netca_file is not set (OK)
    tmp_dbca_file is not set (OK)
    Working in /oracle/stage/102_32/database/SAP ...
    The environment variable ORACLE_HOME is not set! abort ...
    How to set environment variable ORACLE_HOME ?
    Regards
    Eric

    i
    Switch shell to bash:
    orassm:x:502:503:SAP Database Administrator:/oracle/SSM:/bin/bash
    [root@csp-p-sm00 ~]# su - orassm
    [orassm@csp-p-sm00 ~]$
    But when try to run ./RUNINSTALL
    [orassm@csp-p-sm00 SAP]$ ./RUNINSTALLER
    oracle_stage is not set (OK)
    oracle_base is not set (OK)
    oracle_home is not set (OK)
    oracle_sid is not set (OK)
    oracle_home_name is not set (OK)
    oracle_inst_group is not set (OK)
    from_location is not set (OK)
    tmp_netca_file is not set (OK)
    tmp_dbca_file is not set (OK)
    Working in /oracle/stage/102_32/database/SAP ...
    The environment variable ORACLE_HOME is not set! abort ...
    Additionaly I've post csh.cshrc and csh.login
    /etc/cshrc
    csh configuration for all shell invocations.
    by default, we want this to get set.
    Even for non-interactive, non-login shells.
    [ "`id -gn`" = "`id -un`" -a `id -u` -gt 99 ]
    if $status then
            umask 022
    else
            umask 002
    endif
    if ($?prompt) then
      if ($?tcsh) then
        set prompt='[%n@%m %c]$ '
      else
        set prompt=\[`id -nu`@`hostname -s`\]\$\
      endif
    endif
    if ( $?tcsh ) then
            bindkey "^[[3~" delete-char
    endif
    setenv MAIL "/var/spool/mail/$USER"
    limit coredumpsize 0
    if ( -d /etc/profile.d ) then
            set nonomatch
            foreach i ( /etc/profile.d/*.csh )
                    if ( -r $i ) then
                            source $i
                    endif
            end
            unset i nonomatch
    endif
    /etc/csh.login
    System wide environment and startup programs, for login setup
    if ($?PATH) then
            if ( "$" !~ /usr/X11R6/bin ) then
                    setenv PATH "$:/usr/X11R6/bin"
            endif
    else
            if ( $uid == 0 ) then
                    setenv PATH "/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin"
            else
                    setenv PATH "/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin"
            endif
    endif
    setenv HOSTNAME `/bin/hostname`
    set history=1000
    if ( ! -f $HOME/.inputrc ) then
            setenv INPUTRC /etc/inputrc
    endif
    Regards
    Eric

  • 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().

  • 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

  • Error when execute Stand Alone Server

    Hi All,
    After installation Java Development Environment Release 6.20. I tried to execute the Stand Alone Server, but this error message occured:
    Loading core services:
    Starting core service monitor ... done.
    Starting core service p4 ... done.
    Starting core service log ... done.
    Starting core service dbms ... done.
    Starting core service security ... done.
    System Exception * Fail to start Naming. Exception is: java.security.AccessContr
    olException: access denied (com.inqmy.lib.security.DomainsEnumerationPermission
    ProtectionDomainEnumeration)
    java.security.AccessControlException: access denied (com.inqmy.lib.security.Doma
    insEnumerationPermission ProtectionDomainEnumeration)
    at java.security.AccessControlContext.checkPermission(AccessControlConte
    xt.java:269)
    at java.security.AccessController.checkPermission(AccessController.java:
    401)
    at com.inqmy.core.policy.PolicyManager.getProtectionDomainStack(PolicyMa
    nager.java:311)
    at com.inqmy.core.service.context.container.security.DefaultProtectionDo
    mainContext.getProtectionDomainStack(DefaultProtectionDomainContext.java:99)
    at com.inqmy.services.security.domains.ProtectionDomainManagerImpl.getPr
    otectionDomainStack(ProtectionDomainManagerImpl.java:96)
    at com.inqmy.services.jndi.InitialContextFactoryImpl.getInitialContext(I
    nitialContextFactoryImpl.java:72)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
    62)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243
    at javax.naming.InitialContext.init(InitialContext.java:219)
    at javax.naming.InitialContext.<init>(InitialContext.java:175)
    at com.inqmy.services.jndi.JNDIFrame.bindReferences(JNDIFrame.java:278)
    at com.inqmy.services.jndi.JNDIFrame.start(JNDIFrame.java:176)
    at com.inqmy.core.service.application.ApplicationServiceRunner.startFram
    e(ApplicationServiceRunner.java:55)
    at com.inqmy.core.service.container.ServiceRunner.run(ServiceRunner.java
    :126)
    at com.inqmy.core.thread.impl2.SingleThread.run(SingleThread.java:118)
    Starting core service naming ... done.
    Please Help.
    Warm regard,
    Edward.

    The error is caused by JDK 1.4.*
    Thank you
    Edward.

Maybe you are looking for

  • Macbook pro or air. Which to buy

    13 inch Macbook pro retina 8gb/256gb or fully loaded 13 inch air 256gb? I want to get into ios app development so I plan on using xcode quite a bit. Also im a compsci major and will be graduating  in december. I plan on doing a lot of programming in

  • Get week ending date from Year and Week Number

    I would like to display the week ending date in a Report. My dataset query has grouped the results by year and week number, so I am trying to construct the week ending date from year and week number.

  • SCCM Cross-Forest Collection Creation

    Hi All, I have a Central site Server and three primary Sites under one forest. There is a second forest, which is also being managed by one of the primary sites. 2-way trust is enabled between them. If I need to create collections that should be polu

  • Moving a library from work computer to laptop

    I bought an ipod about a year ago. I loded itunes on my work computer. My wife has bought me a new ipod and she will be having the old one. I have itunes installed on my laptop and spent the weekend putting music onto my new ipod. There are some song

  • Is it possible to Save current song as new template without any audio files

    I'm trying to find a way to save an open song as a new song template sans the audio files of the current song. I tried deleting them from the arrange window before saving as template, but that still leaves them in the audio window attaching them to t