OC4J MBean: determining current JVM

There appear to be a number of standard MBeans in OC4J; notably, there's one named oc4j:j2eeType=JVM. It contains information about the current node and cluster, which is just the information I want.
My question is: at deployment time, there could potentially be a number of different JVMs running. From within application code, how can I figure out which JVM is running me, and query the appropriate MBean?

My message in Re: OC4J Instance name should be helpful to figure out which JVM is running your application.

Similar Messages

  • Installing sp19 to ep60: could not determine current working direcory

    Hi,
    upgrading EP 6.0 from SP15 to SP19 using sapinst I get the following error message:
    ERROR 2007-08-23 10:19:27
    CJS-20076  Error while retrieving the mode of the Java EE Engine.<br>SOLUTION: See output of logfile /tmp/sapinst_instdir/PATCH/ORA/getEngineMode.log: 'Error occurred during initialization of VMjava.lang.Error: Properties init: Could not determine current working directory.'.
    Can someone help?
    Renate

    Hi Renate,
    This very much sounds like a permission problem. The user with whom you have started SAPINST (and which then started a JVM) seems not to have the permission to read ithin the JVM working directory. Google for "Properties init: Could not determine current working directory" leads to different similar problems.
    Check that you start SAPINST with an administrative user (should be the one with whom the installation happened).
    Hope it helps
    Detlev

  • How to know the current jvm name executable ?

    Hi,
    I should want know what is the current jvm executable, from a java program. For exemple c:\foo\bar\bin\java.exe, or /home/foo/bar/java_1.6/jre/bin/java and other.
    With system properties, I can know java home, version, vendor etc of JVM, but how I can know "bin\java.exe" or other ?
    Thanks.

    Yes.
    I see java.runtime.name=Java(TM) SE Runtime Environment, I see the classpath, I see java.runtime.version=1.6.0_14-b08, I see java.home=/home/herve/java/jdk1.6.0_14/jre, but I don't see the name of java programme.
    For me it is something like {java.home}/bin/java. I don't see that in system properties.

  • How to determine current period start and end dates

    Hi All,
    If given previous period start date and end date, how to determine current period start date and end date?
    Suppose if given previous period start and end dates are 12/28/08 - 01/30/09, then current period start date and end date will be 01/30/09 - 02/27/09. (where 12 is the previous period, 28 is the day, 08 is the year......)
    Can you please suggest an FM to determine the current period dates?
    Thanks & Regards
    Gowthami

    >
    gowthami karunya wrote:
    > If given previous period start date and end date, how to determine current period start date and end date?
    > Suppose if given previous period start and end dates are 12/28/08 - 01/30/09, then current period start date and end date will be 01/30/09 - 02/27/09. (where 12 is the previous period, 28 is the day, 08 is the year......)
    Hello,
    I am assuming you have the Company Code with you & proposing this solution.
    TABLES: bkpf.
    PARAMETERS:
    p_bukrs TYPE bukrs.
    SELECT-OPTIONS:
    s_date FOR bkpf-budat.
    DATA :
    l_perio LIKE bkpf-monat,
    l_poper TYPE poper,
    l_year  LIKE bkpf-gjahr,
    l_spmon TYPE spmon,
    l_periv TYPE periv,
    l_date1 TYPE datum,
    l_date2 TYPE datum.
    CALL FUNCTION 'BAPI_COMPANYCODE_GET_PERIOD'
      EXPORTING
        companycodeid = p_bukrs
        posting_date  = s_date-high
      IMPORTING
        fiscal_year   = l_year
        fiscal_period = l_perio.
    CONCATENATE l_year l_perio INTO l_spmon.
    * Get the next period
    IF l_perio < 12.
      l_perio = l_perio + 1.
    ELSE.
      l_perio = '01'.
      l_year = l_year + 1.
    ENDIF.
    MOVE l_perio TO l_poper.
    SELECT SINGLE periv INTO l_periv
    FROM t001
    WHERE bukrs = p_bukrs.
    IF sy-subrc = 0.
      CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
        EXPORTING
          i_gjahr        = l_year
          i_periv        = l_periv
          i_poper        = l_poper
        IMPORTING
          e_date         = l_date1
        EXCEPTIONS
          input_false    = 1
          t009_notfound  = 2
          t009b_notfound = 3
          OTHERS         = 4.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
        EXPORTING
          i_gjahr        = l_year
          i_periv        = l_periv
          i_poper        = l_poper
        IMPORTING
          e_date         = l_date2
        EXCEPTIONS
          input_false    = 1
          t009_notfound  = 2
          t009b_notfound = 3
          OTHERS         = 4.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      WRITE: / l_date1, l_date2.
    ENDIF.

  • How to register and unregister Mbean server when jvm is crashed.

    Hi All,
    how to register and unregister Mbean server when jvm is crashed with specifying like internal error(xxxxxxxxxxxsome number)
    I am getting error NameAlreadyBindExcetion when i call the below method in my program, how to unregister and register again, can any one can help on this topic?
    internalConnectorService.start();
    regards
    Prasad.Nadendla

    Looks like your server object is already bound and registered and your trying to re-register the same...
    is that a corba server? if yes, you'd be able to check that with the NamingService tools

  • What's an easy way to start an agent in current JVM after it is running?

    I want to be able to start a Java agent in the current JVM. I cannot control how the JVM is started, therefore I cannot specify -javaagent on the java command.
    I know the attach API lets me attach to a JVM if I have its PID. But unless I have missed something there is no platform-independent way of getting the current PID to pass to VirtualMachine.attach.
    I have run an experiment that seems to work in which my code:
    1. Uses File.createTempFile to create a unique temp file.
    2. Sets a system property to the temp file's path.
    3. Uses VirtualMachine.list to get VirtualMachineDescriptors for all known VMs.
    4. For each VMD:
    4a. Attaches to the VM using theVirtualMachineDescriptor.id().
    4b. Retrieves the system properties from the VM.
    4c. Searches the Properties for the system property name and, if found, checks its value.
    4d. If they match, the VirtualMachine in the loop is the currently-running VM one and do what I want.
    4e. If they do not match, detach from that VM and check the next VM in the list.
    This is terribly cumbersome, plus it requires that tools.jar be available.
    Is there no simpler way to establish an agent in the current VM? Or to attach to the current VM?
    (I also tried passing an empty string and "-1" as the PID to VirtualMachine.attach with no luck. Not that I expected those to work, given that the JavaDoc said nothing about these special values.)
    Thanks.
    - Tim
    Edited slightly for clarity by: tjquinn on Jan 23, 2008 4:26 PM

    Thanks a lot for the pointers, Alan.
    The real underlying difficulty I didn't mention earlier is that Java Web Start is launching the applications of interest here. The JNLP spec currently provides no way of indicating an agent in the JNLP document, the -javaagent command line option is not one of the ones that Java Web Start chooses to handle (for the obvious security reasons I presume), and JNLP provides no mechanism for defining environment variables. So perhaps this is a lost cause until the JNLP spec and/or the Java Web Start implementation evolve.
    (There is a bug from years ago filed against Java Web Start asking for the equivalent of the -javaagent feature.)
    My questions in this thread reflect my (unsuccessful) attempts at side-stepping those Java Web Start restrictions.
    It does seem to me that the management enhancements over the past several Java SE versions have done a nice job of allowing different JVMs to manage and monitor each other. The special case of a JVM managing or monitoring itself is not so easy. In my particular case I don't really need the ability to attach to a different JVM. If I could just get the VirtualMachine instance for the current JVM (without needing tools.jar) I'd be done and on my way.
    Is that worth an RFE against management/monitoring do you think?
    - Tim

  • Dynamic Variant to determine current wednesday  date

    Hi,
    I would like to know how to create a custom Dynamic Selection Variable to determine current wednesday date of the week which I can use in variant.
    Your response is much appreciated and awarded.
    Regards
    Kasi

    Hi Kasi,
    Please try this and assuming your week starting from Monday to Sunday.
    REPORT ZZFL_TEST07.
    PARAMETERS: P_DATE LIKE SY-DATUM.
    DATA: DAY LIKE SCAL-INDICATOR.
    INITIALIZATION.
      CALL FUNCTION 'DATE_COMPUTE_DAY'
        EXPORTING
          DATE = SY-DATUM
        IMPORTING
          DAY  = DAY.
      CASE DAY.
        WHEN '1'.
          P_DATE = SY-DATUM + 2.
        WHEN '2'.
          P_DATE = SY-DATUM + 1.
        WHEN '3'.
          P_DATE = SY-DATUM.
        WHEN '4'.
          P_DATE = SY-DATUM - 1.
        WHEN '5'.
          P_DATE = SY-DATUM - 2.
        WHEN '6'.
          P_DATE = SY-DATUM - 3.
        WHEN '7'.
          P_DATE = SY-DATUM - 4.
        WHEN OTHERS.
      ENDCASE.
    Regards,
    Ferry Lianto

  • Unable to determine current location at this time Mavericks

    Hello,
    I can't get location service running in Mavericks.
    I know it worked before. But somehow it stopped working. It doesn't work with map neither.
    Thanks in advance.

    Perhaps the 'network time server' for the region, that Apple uses, is down at this time(?)
    Not sure how one would go about reporting an issue, to somewhere it would matter...
    Try unchecking the box next to the automatic time zone location item & set it manually.
    {Edit to add: I noticed you asked of this in an older thread, that had suggested this:
    OS X Mavericks: Manage which apps can use Location Services
    http://support.apple.com/kb/PH14318 
    And I looked into that link, but it does not explain your issue.}
    The same item has occurred several times, as indicated by a few similar named topics
    that come up on a search via google of those same words; here's the link to that:
    https://www.google.com/?gws_rd=ssl#q=mac+os+x+unable+to+determine+current+locati on+at+this+time
    You may have to set the TimeZone manually and turn off the automatic location.
    This has been an issue in some places (regional, etc) since OS X 10.6.8. but
    I have no way of knowing if the cause may be the same or another behind it.
    However such an outage (if it could be proven as such) would be difficult to work
    around; short of testing the computer in a different Time Zone to see if that network
    server was working. Then you could tell if the issue is in the Time Zone you wanted
    to be using, and not in the computer itself. A matter of troubleshooting.
    {Since these ASC discussion are generally and simply product users who volunteer &
    try to answer some varying levels of questions, an inquiry here does not constitute a
    contact with Apple, Inc, directly. So please keep that in mind should nobody know
    where to look (if possible) to discover an exact match to your issue.}
    So, see if the clock and time zone work if you do not have the Automatic location set
    and choose the location manually instead. I don't believe a reset of the System
    Management Controller (SMC) or the NVRAM/PRAM may be of help; though these
    do have some bearing on settings in the computer, for different purposes.
    •Intel-based Macs: Resetting the System Management Controller (SMC)
    •About NVRAM and PRAM
    Hopefully you won't have to reset anything but the Date/Time panel in the Mac.
    Good luck & happy computing!
    edited 2x

  • Apple Configurator: "Unable to determine current price of app"

    I'm trying to import an free app to the Apple Configurator. Every time I attempt this I get the error message "Unable to determine current price of app."
    I've tried creating a new Apple ID to download the app, swapping the Apple ID associated with Apple Configurator, different phones (I have 25 to deploy) and all with the same problem.
    I can only find one other mention of this problem http://techrecess.com/2012/03/supervising-devices-with-apple-configurator/ and there's no solution. I'm hoping somebody else will ahve experienced this and found an answer.
    Thanks in advance for any help you can provide.

    I think you may have given me the solution. I'll ask the company to make the app available on the US store too and I'll see what happens then.
    I might file a bug report or similar with Apple. It would be useful if the configurator checked via the store relevant to the country that the account is registered with. Partially defeats the point of setting an account in the configurator.
    Thanks for your help.

  • Java.lang.Error: Properties init: Could not determine current working direc

    Hi,
    We have an application which will copy all the files from a directory on the main server (manager) to all other servers in the cluster.The process is little bit tricky in the sense that all servers will pull the data from manager, copy it to a pending directory and then shut down the rmi process on them, rename pending directory with the original name (some name) and start the rmi process. All the communication is done using RMI calls. We use a GUI tool on windows to initiate this process. We are also running some shell scripts from java in this process. We run this process daily.
    The problem is, once in a while we are getting the follwing error on some of the servers in the cluster and the data updates are not happening any more.
    Error occurred during initialization of VM
    java.lang.Error: Properties init: Could not determine current working directory
    We had to start the rmi process on the server again where it failed with the above error and Initiate the process again from GUI. Any ideas, why we get this error? Also, why only once in a while? Our application is running under root context, so i think, running as "root" is not an issue as I see on some of the forums. Any help is greatly appreciated.
    Thank you

    It is possible to remove or rename the working directory of a running process. It (or a child process) might then have trouble when looking for its current working directory.
    posman@linux:~> mkdir scratch
    posman@linux:~> cd scratch/
    posman@linux:~/scratch> pwd
    /home/posman/scratch
    posman@linux:~/scratch> rmdir `pwd`
    posman@linux:~/scratch> bash
    shell-init: could not get current directory: getcwd: cannot access parent directories: No such file or directory
    locale: Cannot set LC_CTYPE to default locale: No such file or directory
    locale: Cannot set LC_MESSAGES to default locale: No such file or directory
    locale: Cannot set LC_ALL to default locale: No such file or directory
    dirs: could not get current directory: getcwd: cannot access parent directories: No such file or directory
    posman@linux:~/scratch>

  • Tar warning cannot determine current directory

    Greetings,
    I'm having difficulty using tar in a partion called /disk6 when not root. As another user I can write and read in the partition. Whenever I use the tar command I get these message.
    &#91;oracle&#64;acastest&#93;tar -cvf test.tar /disk6/dev_cold_backup
    tar: A parent directory cannot be read: Permission denied
    &#91;oracle&#64;acastest&#93;ls -al
    ./..: Permission denied
    total 22
    drwxrwxrwx 5 root root 512 Oct 12 10:00 .
    drwxrwxrwx 3 oracle oinstall 512 Oct 12 08:24 dev_cold_backup
    drwx------ 2 root root 8192 Aug 31 13:09 lost+found
    drwxrwxrwx 2 oracle oinstall 512 Oct 12 08:43 ora6
    -rw-r--r-- 1 oracle oinstall 0 Oct 12 10:00 test.tar
    &#91;oracle&#64;acastest&#93;pwd
    /disk6
    &#91;oracle&#64;acastest&#93;
    If I type in which tar I get this message:
    &#91;oracle&#64;acastest&#93;which tar
    Warning: cannot determine current directory
    /usr/bin/tar
    I've changed the ownership to oracle at the /disk6 level and no different result. A couple months ago a sun tech added a 146 gb drive and /disk6 is part of the partition with some swap space. I can read and write to this /disk6 partition but can't use the tar other than root. Thanks for any advice.

    Just a guess but umount /disk6 and then check the permissions of the mount point /disk6 directory. It might not have write permission for user oracle.

  • Load balancing HTTP requests for an OC4J instance w/multiple JVMs

    Hello everyone,
    I am using OAS 10.1.3.1 and wish to load balance HTTP requests across an OC4J group of one or more OC4J instances, where each like named OC4J instance may have multiple JVMs or it may just have one JVM.
    My mod_oc4j.conf file would contain the following directives :
    Oc4jSelectMethod roundrobin:local
    Oc4jRoutingMode Static
    Oc4JMount /xyz/* xyz
    In the degenerate case, I would like to have an OC4J group with a cluster size of one, and have that one OC4J instance have two or more JVMs. I would like to be able to receive a request within my web application, determine that the JVM that has been sent the request is the wrong JVM to process the request, and then call HttpServletResponse.sendRedirect("/xyz"). Then, when the browser receives the HTTP 302 response and issues the subsequent HTTP request, have that request sent to a different JVM than the previous JVM that issued the sendRedirect().
    What I have seen is that the subsequent request is sent back to the same JVM that issued the sendRedirect(). I also call invalidate() against the HttpSession prior to calling sendRedirect(), but that does not seem to affect the behavior that I see.
    In the full blown case, I would have an OC4J group with a cluster size > 1, and each of those OC4J instances would have at least one JVM. In that case, I wish the sendRedirect() call to allow the subsequent request to be sent to any one of the OC4J instances in the group, and any one of those JVMs within all of those OC4J instances.
    Can anyone verify that my mod_oc4j mount directive is appropriate given the select method and routing mode? What else might I need to do to have a chance to have a different JVM respond to the request that results from a sendRedirect()?
    Thank you,
    Doug

    I should clarify that in the full blown environment, the OC4J instances that form a group will each be housed within a separate OAS instance that resides on its own machine.
    So ideally, a request could be inbound to say OAS instance 1 on machine A, OC4J instance AA, JVM 2, and I need to force a redirect so that the request can actually be serviced by OAS instance 3 on machine C, OC4J instance AA, JVM 1, and I need to be able to call sendRedirect() against an HttpServletResponse from within a JVM until the subsequent request from the browser, Internet Explorer in my case, is serviced by that JVM.
    Thanks,
    Doug

  • Determining where jvm.dll is + extensive CPU usage

    Hi,
    I am trying to create a JNI wrapper for my java application. I have reached the stage where I can launch the program, providing I have the path to jvm.dll in my path variable.
    I was wondering if there was any way to determine this path at runtime, seeming as it is highly unlikely anyone using this program would have it pre-set. I was thinking I could use run a command from within the program to set the path variable temporarily, however how would I determine where their javavm was installed?
    Is there no way of shipping the dll with the program?
    Also when running my java program through the JNI wrapper it uses about 85 - 90% of my CPU whereas when running it w/o the cpu usage is nominal (about 2 - 10%)
    Why is this?

    Sorry for the lack of response... Been doing other things and forgot about this post...
    First you can search for current version but if your Java >app has a mandatory min version
    that must be greater than the current version found then >you could search the keys for max version to see if it fits >to use.My program requires j1.6 though could be downgraded to req 1.5 with the removal of 1 class
    ]On Windows you read the registry database for this >information.
    Specifically you read the value of the string >CurrentVersion from the key >HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java >Runtime Environment.
    Then you use that value to read the value of the string >RuntimeLib
    from the key >HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java >Runtime Environment/{CurrentVersion value}.
    This value gives you the absolute path of the jvm.dll file.sorry I probably didn't explain how new I am at JNI. All I have is minimal C++ experience (command line hello world apps and the like), and amateur experimentation with java (only 15, not out of secondary education yet.) How does one go about reading the registry using C/C++, (although I'm sure I could find some documentation somewhere on the net.)
    Depends on what you want to do with multiple JREs >installed.get the newest one :)
    Basic wrapper code I am using at the moment...: (all I want to do is execute my java app from a .exe file rather than an executable jar)
    As you can probably see.. is just a bodge of an example from the internet.
    Currently my program searches for jvm.dll from the PATH variable.
    #include <stdio.h>
    #include <jni.h>
    void invoke_class(JNIEnv* env) {
         jclass helloWorldClass;
         jmethodID mainMethod;
         jobjectArray applicationArgs;
         jstring applicationArg0;
         helloWorldClass = (*env)->FindClass(env, "be/bavardage/vocab/VocabGUI");
         mainMethod = (*env)->GetStaticMethodID(env, helloWorldClass, "main", "([Ljava/lang/String;)V");
         applicationArgs = (*env)->NewObjectArray(env, 1, (*env)->FindClass(env, "java/lang/String"), NULL);
         applicationArg0 = (*env)->NewStringUTF(env, "From-C-program");
         (*env)->SetObjectArrayElement(env, applicationArgs, 0, applicationArg0);
         (*env)->CallStaticVoidMethod(env, helloWorldClass, mainMethod, applicationArgs);
    int main(int argc, char **argv) {
    JavaVM* jvm;
         JNIEnv* env;
         JavaVMInitArgs args;
         JavaVMOption options[1];
         /* There is a new JNI_VERSION_1_4, but it doesn't add anything for the purposes of our example. */
         args.version = JNI_VERSION_1_6;
         args.nOptions = 1;
         //options[0].optionString = "-Djava.class.path=c:\\package\\";
         options[0].optionString = "-Djava.class.path=vocab.jar";
         args.options = options;
         args.ignoreUnrecognized = JNI_FALSE;
         JNI_CreateJavaVM(&jvm, (void **)&env, &args);
         env;
         invoke_class( env );
         while (!(*env)->ExceptionCheck( env )) {
          //nothing
        (*env)->ExceptionCheck( env );
        (*env)->ExceptionDescribe( env );
        (*jvm)->DestroyJavaVM( jvm );
    }Message was edited by:
    bavardage - used tags...Message was edited by:
    bavardage

  • HT4009 I'm in Subscription **** on the iPad.  Is there an App or faster way to determine current Magazine subscriptions?

    How can I easily be sure I don't already have a magazine subscription or a single issue in Newsstand (or Zinio) when confronted with a purchase option. Is there an App or faster way to determine this information?  Both Newsstand and Zenio have seen fit to "hide" this data deep in another App or menu, perhaps as a marketing tool to get you to buy multiple copies of the same magazine.  I travel for a living and buy and delete digital magazine all the time.  Sometimes, I buy them and am unable to download immediately due to slow WiFi or restrictions in airports, this adds to the confusion as what I have bought, deleted, or never downloaded, especially with multiple readers.  Additionally, the App store manages current subscriptions on one menu and single purchases in another.    I love reading on the new iPad, but the management of subscriptions has been an absolute nightmare.   Is there another Newstand App that is easier to use or perhaps a Subscription Management App?     

    Take a look here:
    http://support.apple.com/kb/HT4098
    Other than looking in the various locations or doing a search for the title, I don't know of any way to easily find single-issue purchases.
    Regards.

  • How do we determine the JVM encoding of an R/3 system sending idoc to EAI?

    Hi experts,
    can you please help me find out the JVM encoding or our R/3 system. We are currently sending an IDOC via RFC connection to webmethods. the recieving side is not able to process special characters like the TradeMark (TM) superscript, and they are suspecting that the JVM encoding is not in sych. I have search already to find this out in the R/3 system but have not found any clue. I am a bit skeptical though, this is the first time i heard that JVM is being used on RFC.
    Thanks in Advance!
    Regards,
    Alden

    Ken, take a look at the value being mapped to the E1EDK01-BSART field.  Is it 'CRME' or 'INVO' or other?  This value controls the setting of the variable 'bsart_cremem' and subsequent debit/credit handling from there in the IDOC process code.

Maybe you are looking for

  • IPhoto slowed to a crawl - unusable - help!

    hi I returned to use iPhoto for the first time in a couple of months - during which I've updated to 10.5.2 and the latest iPhoto updates - now it's slowed to a crawl to a point where it's unusable - simply scrolling brings up the beachball - nothing'

  • Secure CFFTP

    I am trying to connect to an FTP server usinfg CFFTP. The server requires a secure connection. Does CFFTP support secure connections? Thanks.

  • Why can't I print in color from Photoshop to my HP 3500 wireless printer?

    I have Photoshop CS6. I just noticed last night that when I go to print files from Photoshop, (or even Preview right now... or straight from Google Chrome), it only prints grayscale. I have NOT figured out how to fix this setting in the HP 3511 wirel

  • To know about the fault of phone

    i m a user of nokia 5130 express music  and recently using PC i updated the software  after the completing the update  the phone is not  switching on when i try to swicth it on after removing and replacing batrry once its just flashed and not respons

  • EDI 810 - Delivery note/service entry sheet does not exist

    Hello, When 810 Inbound Invoice IDOC is processed with two different materials having the same delivery note number using the function module IDOC_INPUT_INVOIC_MRM, the IDOC post with error code '51 Delivery note/service entry sheet does not exist'