How do I determine in Java if running local or deployed weblogic server

Using JDeveloper 11.1.1.4.0
I need to determine in my Java code, if I am running my application locally (JDeveloper/Weblogic) or if the application is running on a deployed Weblogic server. The code will be used to determine where to place files when testing on PC verses where to place files when deployed. For example (c:\temp or /usr2/upload).
Thanks,
Troy

Hi,
well one way is to identify using weblogic system properties here is the one example to get weblogic managed server name of application running in java http://www.baigzeeshan.com/2011/11/oracle-adf-how-to-get-managed-server.html
check other properties as well http://docs.oracle.com/cd/E13222_01/wls/docs90/config_scripting/config_WLS.html#1019588
Zeeshan

Similar Messages

  • How can I determine which jobs are running on NT?

    Hello,
    How do I determine which processes are in execution on an NT box from a JAVA
    application? I figure it must involve runtime exec'ing some run32dll
    program, but which one?
    TIA

    Search microsoft.com, or MSDN. That isn't anything to do with Java Programming.

  • How do I determine what processes are running?

    I'd like to determine what processes are running on my iMac running Mtn Lion.  Is there an analog to Windows Task Manager?

    Open the Activity Monitor in the /Applications/Utilities/ folder.
    (76553)

  • HT3696 how can I determine whether I am running 64 or 32 bit on my i7 mac

    I have a i7 that is 64 bit I want to run in 32 bit how can I view which bit its running ?

    If it's OS X 10.7 it's 64 bit OS, if you have 32 bit Intel programs they can run, but only use half the registers, swtich to 64 bit versions of your programs when avaialble.
    No need to worry about anything.
    Having a issue?

  • How to run FVC utility for Weblogic server?

    Hi all,
    I want to use FVC(Form Version Controller) utility to update the database for some users.
    I have provided the required parameters in the "fvc.properties".
    When i run the utility from command prompt it is just printing the parameters given in the fvc properties file and the execution stops.
    When i check the database nothing is updated.
    I'm using BEA-Weblogic Version 8.1 as application server.
    But in another environment where I'm using OC4J as application server I'm able to run the FVC utility and it is also updating the database.
    Is there any other steps that we have to follow ,if we want to use this utility for Weblogic?
    Thanks.

    Hi,
    The following is script found in fvcutil.cmd
    @echo off
    setlocal
    if "%1" == "" goto usage
    if "%2" == "" goto usage
    call classpath
    set CLASSPATH=%CLASSPATH%;.\lib\xlFvcUtil.jar;.\ext\jbossall-client.jar;.\ext\weblogic.jar;.\ext\oscache.jar;.\ext\javagroups-all.jar;.\ext\commons-logging.jar
    D:\oracle_dev_design/xlclient/java\bin\java -DXL.FvcProps=fvc.properties -DXL.HomeDir=. -Djava.security.auth.login.config=.\config\authwl.conf com.thortech.xl.util.fvcutil.FVCUtil %1 %2
    goto end
    :usage
    echo.
    echo "USAGE : fvcutil.cmd <USERNAME> <PASSWORD>"
    echo.
    :end
    endlocal
    authwl is set properly. But when we run this command we get only parameters given in the fvc property file.
    But when we run the same in another environment using (OC4J Application server) we are able to update the database using fvc.
    Please guide us out on this regard to execute the same in weblogic server enabled environment.
    Thanks

  • Error in Jdeveloper while running a project on weblogic server.

    Hi ,
    I am receiving below error while running a project in Weblogic. I am using Jeveloper 11.1.1.2.0
    *** Using port 7101 ***
    "C:\Documents and Settings\nlatif\Application Data\JDeveloper\system11.1.1.2.36.55.36\DefaultDomain\bin\startWebLogic.cmd"
    [waiting for the server to complete its initialization...]
    The system cannot find the path specified.
    The JRE was not found in directory D:\OracleJeveloper\Middleware\jdk160_14_R27.6.5-32. (JAVA_HOME)
    Please edit your environment and set the JAVA_HOME
    variable to point to the root directory of your Java installation.
    Press any key to continue . . .
    where as I can run the same project in other machine on Jdeveloper with out this error.
    Thanks & regards,
    Noman

    Noman,
    have you checked that the folder D:\OracleJeveloper\Middleware\jdk160_14_R27.6.5-32 contains the jre?
    Timo

  • How to receive emails of the same inbox from in a Weblogic Server cluster

    Hi All,
    I have an application running on WebLogic Server with 6 instances. Many requests for the application come from Email. We already set up an email account that will be used by all clients to send email to. But the problem is that the email account inbox can only be opened for reading by a single connection, unlike a typical database. Currently I can only deploy the email reading service on a single server instance, this will effectively create a single point of failure and unbalanced load. What's the best way to read from the same inbox from multiple servers? I am thinking developing something using a database table, sort of leasing, whoever locked the table own the lease and can connect to the email server, but this is pretty hard to implement correctly in all circumstances.
    I did an intensive search on the internet, but couldn't find anything.
    I appreciate your help very much.
    Thanks
    Tao

    Hi Aditya
    By default, OPA 10.4 will collect the minimum amount of information needed to answer the goal of your interview and then display the answer and the reasons for the answer.You can change what appears on these screens within OPM itself (you don't need to change those settings).
    So I would:
    - add a Summary Screen to your project (if you haven't already)
    - add <your goal attribute> to your summary screen. This will display as a link if the goal is unknown and as a sentence showing the outcome and a Why? link when it is known. 
    - add a label to the summary screen, providing information about the outcome (eg "Congratulations you are eligible") or simply show the value of the outcome (eg Your total deduction is %deduction_amount%). 
    - use visibility rules to control which items to display at the start/end of your interview (in your case, maybe hide your goal once it is known and show your label once your goal is known). See OPA help topic "Tutorial: Hiding and displaying summary screen elements".
    The Inferred Brand Discount sample supplied in the OPM install provides an example of this (see Help topic Sample Rulebases for information on how to open this).
    Hope that helps,
    Fiona

  • How do I convert an war file to ear file, deploying weblogic apps

    Problem Description: I have a war file from a legacy application that needs to be migrated to weblogic. To migrate this application to weblogic, we need a ear file. Reading weblogic doc. it says we needs to use ant utility on an exploded web content application folder/ directory to create the ear file. I need to covert the existing war file to ear file , if it is doable or create one from the scratch. I need to know how to do that in weblogic. Please let me know if you have any hints .
    Thanks

    HI,
    Please try the following to convert your WAR file into an EAR exploded archieve:
    *1).* Create a Directory in your file system.
    Example:
    /home/apps/MyFirstEAR
    *2).* Place the WAR file inside the above Directory. (Suppose your WAR file name is test.war)
    Example:
    /home/apps/MyFirstEAR/test.war
    *3).* Now create a "META-INF" directory inside "/home/apps/MyFirstEAR" directory
    *4).* Now create an "application.xml" file like following inside "/home/apps/MyFirstEAR/META-INF" directory:
    <?xml version="1.0" encoding="UTF-8"?>
    <application xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.4">
    <description>Test EAR Example</description>
    <display-name>TestEAR Example</display-name>
    <module>
    <web>
    <web-uri>test.war</web-uri>
    <context-root>test</context-root>
    </web>
    </module>
    </application>
    *5).* Your EAR is ready now you can deploy the "MyFirstEAR" directory in the WebLogic Server.
    NOTE: if you want to place the "test.war" file also as an exploaded format content inside the EAR then you need to extract the test.war file and then in place of the test.war you can have "test" directory at the same place.
    You need to change the "application.xml" file like below in that case:
    <?xml version="1.0" encoding="UTF-8"?>
    <application xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.4">
    <description>Test EAR Example</description>
    <display-name>TestEAR Example</display-name>
    <module>
    <web>
    <font color=red> <web-uri>test</web-uri> </font><br>
    <context-root>test</context-root>
    </web>
    </module>
    </application>
    For more information on an EAR application structure you can refer to : http://middlewaremagic.com/weblogic/?p=1952
    Thanks
    Jay SenSharma
    http://middlewaremagic.com/weblogic (Middleware Magic Is Here)

  • Unable to access java web application index page on Weblogic server 10.3.6

    Hi,
    I have deployed a Web application on Weblogic server.
    My war file is very basic with just a index page.
    I am able to deploy & access its index page properly in OC4J ( applicaton server on soa suite 10g ) and apache tomcat.
    But when i deployed same war file in weblogic am not able to access its index page, Getting below error:
    Error 503--Service Unavailable
    From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
    *10.5.4 503 Service Unavailable*The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay may be indicated in a Retry-After header. If no Retry-After is given, the client SHOULD handle the response as it would for a 500 response.
    status=Prepared, Consolidated State=Prepared, Target-Specific State= Prepared.
    what does Prepared indicates here?*
    Adminserver.log prints blow log when i try to access the index page
    ####<Dec 26, 2012 8:27:17 AM GMT> <Warning> <netuix> <soa-app-dev-01.am.health.ge.com> <AdminServer> <[ACTIVE] ExecuteThread: '21' for queue: 'weblogic.kernel.Default (self-tuning)'> <501226496> <> <9b375c7445d8c121:79ee4f70:13bc880be7a:-8000-0000000000000209> <1356510437306> <BEA-423420> <Redirect is executed in begin or refresh action. Redirect url is /console/console.portal?_nfpb=true&_pageLabel=WebAppApplicationOverviewPage&WebAppApplicationOverviewPortlethandle=com.bea.console.handles.AppDeploymentHandle%28%22com.bea%3AName%3D*Weblogs*%2CType%3DAppDeployment%22%29.>
    My Deployment descriptors are as below:
    Web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
    <display-name>Weblogs</display-name>
    <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    <servlet>
    <description></description>
    <display-name>SOA11gLogServlet</display-name>
    <servlet-name>SOA11gLogServlet</servlet-name>
    <servlet-class>com.ge.healthcare.soa.logs.SOA11gLogServlet</servlet-class>
    </servlet>
    </web-app>
    ==================================================================
    weblogic.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.3/weblogic-web-app.xsd">
    <wls:weblogic-version>10.3.6</wls:weblogic-version>
    <wls:context-root>/Weblogs</wls:context-root>
    </wls:weblogic-web-app>
    ==================================================================
    Please help me to resolve the issue,its bit urgent.Let me know in case of anything else required to check and verify.
    Thanks in advance.
    Regards,
    Rahul Aahir
    Edited by: 978673 on Dec 26, 2012 4:22 PM
    Edited by: 978673 on Dec 26, 2012 4:32 PM

    In weblogic 10.3.6, when you deploy using console, you have to click on start button which appears in Deployments page.
    Your weblogic.xml file should be as below:
    <?xml version="1.0" encoding="UTF-8"?>
    <wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.3/weblogic-web-app.xsd">
    <wls:weblogic-version>10.3.6</wls:weblogic-version>
    <wls:context-root>/logs</wls:context-root>
    <container-descriptor>
    <index-directory-enabled>true</index-directory-enabled>
    </container-descriptor>
    <virtual-directory-mapping>
         <local-path>/opt/oracle/logs</local-path> (as per your path)
         <url-pattern>/logs/*</url-pattern>
         <url-pattern>*.log</url-pattern>
    </virtual-directory-mapping>
    </wls:weblogic-web-app>

  • Java socket run on localhost against outside server

    Hi everyone,
    I am newbie to Java socket and networking. By spending this weekend over the internet reading and researching I have made my first Server-Client java socket program run sucessfully on my localhost 127.0.0.1. They can be connected and ok to communicate.
    However, when I put my server program to the LIVE server outside the network the client side says cannot connect to the server because: Connection Error, Connection refused: connect. So I read some stuff about firewall and NAT on the web but i was shamed that I don't understand there is any solution to this.
    It is great appreciated if someone can point me out how can I resolve this or make a step out because I am running out of time to give out the program against the deadline. But I really thank you anyone has been reading this.
    The server code:
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package instantmessenger;
    import java.io.*;
    import java.net.*;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
        public class Server extends JFrame implements ActionListener {
            JTextArea textreceive   =new JTextArea();
            JTextArea textsend      =new JTextArea();
            JButton button          =new JButton("Send");
            BufferedReader in;
            PrintWriter out;
            public Server () {
                    //init   controls
                    setTitle("Server");
                    setBounds(50,50,500,400);
                    getContentPane().setLayout(null);
                    getContentPane().add(textreceive);
                    getContentPane().add(textsend);
                    getContentPane().add(button);
                    textreceive.setBounds(10,10,450,300);
                    textsend.setBounds(10,320,350,30);
                    button.setBounds(370,320,70,30);
                    button.addActionListener(this);
            public void listenClient() throws IOException {
                    ServerSocket   server=new   ServerSocket(9999);
                    System.out.println("start:"+server);
                    textreceive.append("start"+server+"\n");
                    try {
                            Socket s = server.accept();
                            try {
                                    System.out.println("connecting   :"+s);
                                    textreceive.append("connecting   :"+s+"\n");
                                    in = new BufferedReader(new InputStreamReader(s.getInputStream()));
                                        out=new   PrintWriter(
                                        new   BufferedWriter(
                                        new   OutputStreamWriter(s.getOutputStream())));
                                    out = new PrintWriter(s.getOutputStream());
                                    String str=null;
                                    while(true) {
                                            str = in.readLine();
                                            System.out.println(str);
                                            textreceive.append(str+"\n");
                            finally {
                                s.close();
                    finally {
                        server.close();
            } // end function
            public void actionPerformed(ActionEvent event) {
                    String str = textsend.getText();
                    if( !str.equals("")) {
                            out.println(textsend.getText());
                            //out.println(textsend.getText());
                            out.flush();
                            textreceive.append(textsend.getText()+"\n");
                            textsend.setText("");
            } // end function
            public   static   void   main(String   args[])   throws   IOException {
                Server   s=new   Server();
                s.show();
                s.listenClient();
            } // end function
        } // end classThe client source code:
    package instantmessenger;
        import   java.net.*;
        import   java.io.*;
        import   javax.swing.*;
        import   java.awt.*;
        import   java.awt.event.*;
        public   class   Client   extends   JFrame implements   ActionListener {
            JTextArea   textreceive=new   JTextArea();
            JTextArea   textsend   =new   JTextArea();
            JButton     button   =new   JButton   ("Send");
            BufferedReader  in;
            PrintWriter     out;
            public Client(){
                    //init   controls
                    setTitle("Client");
                    setBounds(50,50,500,400);
                    getContentPane().setLayout(null);
                    getContentPane().add(textreceive);
                    getContentPane().add(textsend);
                    getContentPane().add(button);
                    button.addActionListener(this);
                    textreceive.setBounds(10,10,450,300);
                    textsend.setBounds(10,320,350,30);
                    button.setBounds(370,320,70,30);
           } // init
            public void startNet() throws IOException {
                  //Socket client=new Socket("localhost",9999);
                  Socket client=new Socket("222.33.444.5555",9999);  // NOT REAL SERVER IP
                  try {
                          System.out.println("Socket="   +client);
                          in    =   new BufferedReader(new InputStreamReader(client.getInputStream()));
                          out   =   new PrintWriter(new BufferedWriter(new OutputStreamWriter(client.getOutputStream())),true);
                          String str=null;
                          while(true) {
                              str   =   in.readLine();
                              System.out.println(str);
                              textreceive.append(str+"\n");
                  finally {
                        client.close();
            } // end function
            public void actionPerformed(ActionEvent   event) {
                String str=textsend.getText();
                if(!str.equals("")) {
                    out.println(textsend.getText());
                    //out.println(textsend.getText());
                    out.flush();
                    textreceive.append(textsend.getText()+"\n");
                    textsend.setText("");
            } // function
            public static void main(String args[]) throws IOException {
                Client c=new Client();
                c.show();
                c.startNet();
            } // function
    } // end classThank you
    Morris Lee

    However, when I put my server program to the LIVE server outside the network the client side says cannot connect to the server because: Connection Error, Connection refused: connect. So I read some stuff about firewall and NAT on the web but i was shamed that I don't understand there is any solution to this.What do you want us to do? You already know that the problem probably is that you need to open port 9999 in the firewall, and you probably also need to configure it for port forwarding.
    Most clients will be able to connect after that, but some might still have problems. E.g. some companies don't allow clients to connect to other ports than a few well known ones (e.g. 21, 80 and 443)

  • How to schedule a Stored procedure to run every hour in SQL server express

    Hi,
    I am using SQL server express and I want to schedule a Stored procedure to run every hour.
    The Stored Procedure name is UpdateData.
    Can someone please give an example of how i can schedule this to run every hour, given that I do not have SQL Server agent on my express edition.

    Hello,
    You will find more options on the following thread.
    http://stackoverflow.com/questions/1675206/how-to-run-a-stored-procedure-every-day-in-sql-server-express-edition
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • How to run two instances of weblogic server as an NT service on the same machine

    I have to have two instances, one I want to use it for development(testing
    purposes) and the other one I need to use it as a live one(Production)
    So that I can test my applications independently without disturbing the live
    application.
    Thanks
    Madhu

    I can start one instance as an NT service, but the other instance, I have to
    start with the command. I need to run as an NT service because I need to
    use NTRealm
    Security
    I have created a new domain , server listening to different port.
    Thanks
    madhu
    Bruce Blackshaw <[email protected]> wrote in message
    news:[email protected]..
    "m holur" <[email protected]> wrote in message
    news:<3c0d2b66$[email protected]>...
    I have to have two instances, one I want to use it fordevelopment(testing
    purposes) and the other one I need to use it as a live one(Production)
    So that I can test my applications independently without disturbing thelive
    application.I would not recommend having development and production on the same
    machine.
    But if you wish to do so, you can create multiple domains under the
    same installation, say one for dev and one for prod. On the same
    machine make sure they listen on different ports. This, of course,
    ties you to the same version for development and production - making
    it impossible to upgrade just one.
    You may be able to do two completely different installations (i.e.
    different BEA HOMEs) on the same machine - I haven't tried this but it
    looks possible. This would mean you could upgrade each separately. The
    presence of BEAHOMELIST in the registry on NT seems to indicate this
    should work.
    Bruce Blackshaw
    Free Java FTP Library
    http://www.enterprisedt.com/downloads/ftp.html

  • How can change ojdbc14 jar to ojdbc15.jar orcale As and weblogic server

    On the machine I installed the server, Oracle JDBC drivers are in ORACLE_HOME/jdbc/lib/ojdbc14.jar.
    How can change Oracle JDBC drivers ojdbc14 jar to ojdbc15.jar.

    >
    On the machine I installed the server, Oracle JDBC drivers are in ORACLE_HOME/jdbc/lib/ojdbc14.jar.
    How can change Oracle JDBC drivers ojdbc14 jar to ojdbc15.jar.
    >
    You can't - do not attempt to or you may break Oracle.
    The JVM is an integral part of Oracle and without the proper, certified version of the JVM the database will not run properly. In fact if you use Oracle installer and elect to remove the JVM the database itself will be removed also.
    Oracle 11g installs with JDK 1.5 and that is the ONLY version that is certified to work properly with 11g. If you attempt to use any other version you are violating your support contract and will likely have errors.
    The installed version of the JDK is the version that Oracle itself uses and is the version that will be used for any Java classes that you load into the database and run from within Oracle.
    You are free to use any version of the JDK you want for external Java applications.

  • Message 40010 run local form in the server

    hi all
    i want to run a form that saved in the client machine by using another machine (server) as application server URL
    i specefiy the server url in the developer but i keep getting message
    40010 can not read form
    since it works fine if i choose the client application server URL
    any help would be nice ,
    thanx

    Q - can the server read the directory where your form is?
    The app server will be looking in a specific directory to read the forms. This is specified in the .env file.
    If you want to test a form you can always specify the form name in the URL on the app server e.g. http://<server>:<port>/forms90/f90servlet?config=......&form=<formname>
    HTHs!
    L :-)

  • BI 4.1 How to easily find which APS is running a particular service?

    I am trying to track down an error with BI4.1 version management (note 2008275)
    and the correction says
    "Ensure that only 1 APS server is defined with a "Lifecycle management service" and running across the entire cluster."
    This led me this question, how can you determine which APS is running a particular service without having to hunt and peck through every APS?
    I ran the 4.1 wizard and I have 20 APS.
    Just curious if there is a better way for future reference.
    Thanks
    Lee Lewis

    Hi Lee,
    The BI Platform Support Tool would be the most productive/easiest way find and compare APS services,
    See the wiki below:
    http://wiki.scn.sap.com/wiki/display/BOBJ/SAP+BI+Platform+Support+Tool
    ~Valdrin

Maybe you are looking for

  • Pension Contribution not deducting correctly and Arrears

    Dear Experts! I am facing with a big problem with calculation Pension Contribution in India Payroll. First, the issue with employee join into company in middle month, i have modified EXIT_HINCALC0_002 and it's right. However, the problem when a emplo

  • The Weather Channel is gettign on my nerves

    Intellicast app. Both Android and iOS - sorry, WM, no one knows how to program for you :`(

  • Numeric field in Access DB

    I have a numeric field in my Access database - when I use the Insert Record wizard - I make sure that field says numeric - the page crashes - how do I fix this problem? Thanks

  • Getting error while trying to delete multiple rows

    Hi Experts, Working in jdev 11.1.1.3.0 with ADF BC and rich faces. i am trying to delete multiple records from the table, everything is working fine if i use filter or not using horizontal scroll bar of the table. if i try to delete last records on t

  • Labview can not detect my smart camera ,1774c

    Hello. I have a 1774c camera and a computer with Labview2012 with Vision Acquisition Software and Real Time module installed as well. MAX detects my camera and allows me to grab video or snap pictures. But when I try to create a Labview vi and use a