Agent_home and OMS_HOME

Hi there
I am a have recently joined my new workplace and I have no clue what my agent_home and OMS_HOME is. Can anyone help me in finding agent_home and OMS_HOME.
Thanks

Hi Eric...
Thanks for your help. Below is my inventory file
<?xml version="1.0" standalone="yes" ?>
- <!-- Copyright (c) 2005 Oracle Corporation. All rights Reserved
-->
- <!-- Do not modify the contents of this file by hand.
-->
- <INVENTORY>
- <VERSION_INFO>
<SAVED_WITH>10.2.0.1.0</SAVED_WITH>
<MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
- <HOME_LIST>
<HOME NAME="OraDb10g" LOC="C:\oracle\10.2.0" TYPE="O" IDX="1" />
</HOME_LIST>
</INVENTORY>
Below is the results of emctl status agent
C:\oracle\10.2.0>emctl status agent
Oracle Enterprise Manager 10g Database Control Release 10.2.0.3.0
Copyright (c) 1996, 2006 Oracle Corporation. All rights reserved.
Agent Version : 10.1.0.5.1
OMS Version : 10.1.0.5.0
Protocol Version : 10.1.0.2.0
Agent Home : C:\oracle\10.2.0\mledbtest.colchester.ac.uk_stutest
Agent binaries : C:\oracle\10.2.0
Agent Process ID : 2716
Agent Process ID : 2716
Agent URL : http://mledbtest.colchester.ac.uk:1830/emd/main
Started at : 2010-03-10 06:08:31
Started by user : SYSTEM
Last Reload : 2010-04-07 12:33:54
Last successful upload : 2010-04-23 09:46:20
Total Megabytes of XML files uploaded so far : 184.93
Number of XML files pending upload : 0
Size of XML files pending upload(MB) : 0.00
Available disk space on upload filesystem : 31.38%
Agent is Running and Ready

Similar Messages

  • "failed to read POST response"  when adding a standby database

    Hello everybody,
    I've got a problem ...
    I try to create a standby db using the Oracle Grid Manager. When running the job, it is broken in step "httpOneDatafile" with message "failed to read POST response".
    In metalink, I found the one-off patch 6670069. As it is only applicable to Oracle agent 10.2.0.4, I've de-installed the agent 10.2.0.5 and tried to install patch 6670069 to this version, but all I get is this error:
    Prerequisite check "CheckApplicable" failed.
    The details are:
    Patch 6670069: Required component(s) missing : [ oracle.sysman.top.agent, 10.2.0.4.0 ]
    ApplySession failed during prerequisite checks: Prerequisite check "CheckApplicable" failed.
    I tried with different ORACLE_HOMEs (<path_to_db_home> or <agent_home>) and different PATH (<path_to_db_home>/bin or <agent_home>/bin) variables, but anytime, I get the same message when trying to patch the agent.
    Does someone have an idea, what's going wrong?
    Environment:
    Primary Database : 10.2.0.4 on HPUX 64 Itanium
    Standby DB: 10.2.0.4 on HPUX 64 PA-Risc (this combination is ok as we used it in a former config with two 10.2.0.2 DBs for the last 2 years...)
    Oracle agents: 10.2.0.3 up to 10.2.0.5
    As I'm trying for 1 week now, any (ANY!) idea is very welcome...
    Regards,
    Roland

    JVM is probably not the correct forum for this post. JVM is for issues related to the RDBMS resident Oracle proprietary java VM, which isn't involved in what you are doing here.

  • Error while Starting OMS

    I am getting following error while starting OMS
    Starting WebTier...
    WebTier Could Not Be Started
    Error Occurred: WebTier Could Not Be Started
    Any workaround?
    Thanks

    Hi,
    First check in logs found at $OMS_HOME/sysman/log and $OMS_HOME/opmn/log directories and post the error.

  • Install OEM 10.2.0.1 and upgrade to 10.2.0.3

    Dear all,
    I want to install the latest version of OEM 10.2.0.3 on Linux RedHat 4. However, after downloading the OEM 10.2.0.3 and reading the release note, I realized that the download is just the 10.2.0.3 upgrade patchset. I have to do a fresh base installation of OEM 10.2.0.1 first. Is this correct?
    After installing OEM 10.2.0.1 with an existing 10.2.0.1 database, I need to upgrade OEM 10.2.0.1 to OEM 10.2.0.3 using the patchset I downloaded. Because both OMS and AGENT will be upgraded, I am not sure what installation destination I shoud supply? OMS_HOME, or AGENT_HOME, or just a new home for upgrade? What are the required steps to upgrade OEM 10.2.0.1 to OEM 10.2.0.3?
    Are there any documentation or articles that I can follow to do the upgrade?
    Thanks a lot in advanced.
    Xiaoping

    Hi!
    When you start upgrading your products, you are asked for the "Installation name".
    Imagine that the installation of the entire product is divided into 3 parts:
    a) Database: db10g (the Installation Name)
    b) OMS: oms10g
    c) Agent: agent10g
    Then, to choose the perfect directory to upgrade the product, you must choose the installation name from the menu. If you select agent10, the final path is going to coincide with the original.
    Do this for the OMS and the OMR.
    Greetings.
    HeCSa.

  • OEM 10.2.0.1 installation and upgrade to 10.2.0.3

    Dear all,
    I want to install the latest version of OEM 10.2.0.3 on Linux RedHat 4. However, after downloading the OEM 10.2.0.3 and reading the release note, I realized that the download is just the 10.2.0.3 upgrade patchset. I have to do a fresh base installation of OEM 10.2.0.1 first. Is this correct?
    After installing OEM 10.2.0.1 with an existing 10.2.0.1 database, I need to upgrade OEM 10.2.0.1 to OEM 10.2.0.3 using the patchset I downloaded. Because both OMS and AGENT will be upgraded, I am not sure what installation destination I shoud supply? OMS_HOME, or AGENT_HOME, or just a new home for upgrade? What are the required steps to upgrade OEM 10.2.0.1 to OEM 10.2.0.3?
    Are there any documentation or articles that I can follow to do the upgrade?
    Thanks a lot in advanced.
    Xiaoping

    There is a README.txt file in the 10.2.0.3 patchset zip file that has the instructions for upgrading 10.2.0.1 OEM to 10.2.0.3.
    You download 10.2.0.1 separately which delivers a 10.1.0.4 database. Apply the one-off database patch to the db10g 10.1.0.4 Oracle Home via opatch, then use runInstaller to upgrade to 10.2.0.3 via 3731593. You can optionally create a db10gr2 10.2.0.1 Oracle Home, apply the 10.2.0.3 patchset then run dbua to upgrade the 10.1.0.4 repository database to 10.2.0.3.
    You probably would have had fast response posting to the Enterprise Manager Grid Control forum:
    Enterprise Manager
    2. Fresh Installation of Enterprise Manger 10g Grid Control Release 2 and upgrading it to Release 3
    In order to install Enterprise Manager 10g Grid Control Release 3, you must install either 10.2.0.1.0 or 10.2.0.2.0 Grid Control environment. This section describes steps to install Enterprise Manager 10g Grid Control Release 3 environment starting with 10.2.0.1.0 (10.2.0.2.0 for Windows) install
    2.1 Install Oracle Enterprise Manager 10g Release 2
    Installing 10g Grid Control Release 3 requires any previous releases of Grid Control, that is any 10.2.x.x.x installation, and upgrade to 10.2.0.3.0 release. If you do not have a previous release, but want to have a 10.2.0.3.0 Grid Control environment, then first install 10.2.0.1.0 Grid Control (10.2.0.2.0 for Windows), and then upgrade it to 10.2.0.3.0. Start with the Oracle Enterprise Manager 10g Release 2 Grid Control media pack (DVD) and install 10.2.0.1.0 (10.2.0.2.0 for Windows)
    - Insert DVD into your computer (note: It is better to copy the DVD contents to local hard disk for faster performance)
    - Run runInstaller (setup.exe for Windows) to start installation
    - When asked for "install type" option, choose "Enterprise Manager using New Database" option
    - Complete installation as per install guide
    Important: For information about installing 10.2.0.1.0 and 10.2.0.2.0, refer to the installation guides available at:
    http://www.oracle.com/technology/documentation/oem.html
    2.2 Apply required patches
    In the case of Grid Control environment installed via "Enterprise Manager using New Database" option, repository database version is 10.1.0.4.0. Before upgrading to 10.2.0.3, apply the patch for bug 4329444 on the Database Home. In order to apply this patch for the Solaris platform:
    - Copy the p4329444_10104_<platform>.zip file from the DVD to any directory on the host which has the repository database running on.
    - Unzip the file using following command:
    $ unzip p4329444_10104_<platform>.zip
    - Follow the instruction in 4329444/README.txt to apply the patch
    For more detail on this, refer to the release note.
    2.3 Install Oracle Enterprise Manager 10g Release 3
    2.3.1 Copy the p3731593_102030_<platform name>.zip patch set installation archive from the DVD to any directory on the host which has the Oracle Management Service running on it.
    2.3.2 Perform the installation
    - Enter the following command to unzip and extract the installation files from the downloaded image described in section 1.2:
    $ unzip p3731593_102030_<platform name>.zip
    This extracts the files to the "3731593" directory.
    - Navigate to the 3731593/Disk1 subdirectory
         $ cd 3731593/Disk1
    - Set the ORACLE_HOME variable to the Oracle Management Service(OMS) oracle home.
    - Execute the runInstaller (setup.exe for Windows)
         $ ./runInstaller
    The upgrades process then upgrades the Oracle Management Service (OMS), Oracle Management Repository and the Management Agent on the same host as the OMS to the latest Enterprise Manager 10g release 3 version.
    Important: The same Patch Set can be used for patching OMS,Repository, and Management Agent. For more detail on installing the patchset, refer to the release note.
    2.4 Optional: Upgrading Repository Database to 10.2.0.3
    If you installed Grid Control 10.2.0.1.0 (10.2.0.2.0 for Windows) via "Enterprise Manager using New Database" option, your repository database version is 10.1.0.4. In order to upgrade your repository database to 10.2.0.3, follow the steps below after upgrading your Grid Control environment to Enterprise Manager 10g release 3.
    a. Upgrade the database to 10.2.0.1
    b. Install 10.2.0.3 database patchset

  • Agent10g: Size of Management Agent Log and Trace Files get oversize ...

    Hi,
    I have the following problem:
    I had installed the EM Agent10g (v10.2.0.4) on each of all my Oracle servers. I've done a long time ago (a few months or a few years depending on wich server it was installed). Recently, I've got PERL error because the "trace" file of the Agent was too big (the emagent.trc was more than 1 Gb) !!!
    I don't know why. I checked on a particular server on the AGENT_HOME\sysman\config (Windows) for the emd.properties file.
    The following properties are specified in the emd.properties file:
    LogFileMaxSize=4096
    LogFileMaxRolls=4
    TrcFileMaxSize=4096
    TrcFileMaxRolls=4
    This file had never been modified (those properties correspond to the default value). It's the same situation for all Agent10g (setup) on all of the Oracle Server.
    Any idea ?
    NOTE: The Agent is stopped and started weekly ...
    Thank's
    Yves

    Why don't you truncate the trace file weekly. You can also delete the file. The file will be created automatically whenever there is a trace.

  • What are files in $AGENT_HOME/sysman/emd/state/statemgmt/oracle_home

    Greetings.
    I have found my OEM 12c, 12.1.0.1 reporting on some targets which don't exist ad some which are reported incorrectly. Some poking around on a particular host for which this behavior is exhibited (this host is a member of a two node cluster) lead me to the directory $AGENT_HOME/sysman/emd/state/statemgmt/oracle_home on that host. In that directory I find the files -
    agent12c1_8_hammer
    cmdevel.ucdavis.edu_cmdevel1_oracle_database_home
    cmupg.ucdavis.edu_cmupg1_oracle_database_home
    hammersteele_cluster_home
    LISTENER_SCAN10_hammersteele_oracle_listener_home
    LISTENER_SCAN2_hammersteele_oracle_listener_home
    cmupg is a database which does not exist, It may have existed at one point but if it did was removed some time ago.
    LISTENER_SCAN10 is a non-existent scan listener.
    ./emctl config agent listtargets lists both of those tqargets -
    mytest1:product/agent12g/agent_inst/bin->./emctl config agent listtargets
    Oracle Enterprise Manager 12c Cloud Control 12.1.0.1.0
    Copyright (c) 1996, 2012 Oracle Corporation. All rights reserved.
    [hammer.ucdavis.edu, host]
    [hammer.ucdavis.edu:3872, oracle_emd]
    [LISTENER_SCAN10_hammersteele_oracle_listener_home, oracle_home]
    [LISTENER_SCAN2_hammersteele_oracle_listener_home, oracle_home]
    [cmdevel.ucdavis.edu_cmdevel1_oracle_database_home, oracle_home]
    [cmupg.ucdavis.edu_cmupg1_oracle_database_home, oracle_home]
    [LISTENER_SCAN3_hammersteele, oracle_listener]
    [LISTENER_hammer.ucdavis.edu, oracle_listener]
    [+ASM1_hammer.ucdavis.edu, osm_instance]
    [agent12c1_8_hammer, oracle_home]
    [LISTENER_SCAN2_hammersteele, oracle_listener]
    [has_hammer.ucdavis.edu, has]
    (some data deleted by me)
    My question is, can anyone explain to me where those files come from, how the OEM uses them and should I clean that up? I did see SCAN_LISTENER10 reported by the console but I manually deleted it form the console.
    Another interesting observation is that there are three SCAN_LISTENERS on this cluster, 1, 2 & 3. The console reports only LISTENER_SCAN2 as being up, the others are reported as being down. COuld this have some bearing on it. SCAN_LISTENER1 is running on the other node and the file LISTENER_SCAN1_hammersteele_oracle_listener_home exists in the analocous directory on the other cluster.
    I'm puzzled. If anyone can help me out I would be most appreciative.
    Thank you.
    Bill Wagman

    Courtney,
    That makes sense and in fact the 11.2.0.2 installation was upgraded to 11.2.0.3 and 11.2.0.2 was not uninstalled so these entries from the targets.xml make sense -
    <HOME NAME="Ora11g_gridinfrahome1" LOC="/usr/local/oraGrid/product/11.2.0.2-grid" TYPE="O" IDX="1">
    <NODE_LIST>
    <NODE NAME="hammer"/>
    <NODE NAME="steele"/>
    </NODE_LIST>
    </HOME>
    <HOME NAME="OraDb11g_home1" LOC="/usr/local/oracle/product/11.2.0.2/dbhome_1" TYPE="O" IDX="2">
    <NODE_LIST>
    <NODE NAME="hammer"/>
    <NODE NAME="steele"/>
    </NODE_LIST>
    Now, on to the next question. In the statemgmt/oracle_home directory I see these files (among others) -
    cmupg.ucdavis.edu_cmupg1_oracle_database_home
    LISTENER_SCAN10_hammersteele_oracle_listener_home
    cmupg is a database which no longer exists and LISTENER_SCAN10 no longer exists. Where do those files come from? The database cmdevel does exist and I see the file -
    cmdevel.ucdavis.edu_cmdevel1_oracle_database_home
    there are three other databases on this cluster, why are there not files for these other databases? I'm very confused and appreciate your help.
    Thank you.
    Bill Wagman

  • How to start Oracle 10g RAC database and clusterware?

    I have steps to stop the 10g RAC Database and clusterware but not sure about starting it.
    I have heard executing
    $crsctl stop crs --as root
    on each node
    will start the database,asm,nodeapps .Is that true?
    or we have to do that step by step like we do in stopping the clusterware and database below
    1.Stop the agent:
    cd to $AGENT_HOME/corpng04.amhc.amhealthways.net/bin, then run: ./emctl stop agent
    2.Stop the full database
    $ oracle_home/bin/srvctl stop database -d db_name
    3.Stop the ASM Instances on node1,node2
    $ oracle_home/bin/srvctl stop asm -n node -- I guess you can't give multiple nodes in one command with comma,you need to give this multiple times with diff node name
    4.Stop the NodeApps :vip,listener,oms and gsd
    $ oracle_home/bin/srvctl stop nodeapps -n node -- I guess you can't give multiple nodes in one command with comma,you need to give this multiple times with diff node name
    5.Stop the CRS cluster processes :those bloody 3 evmd,ocssd,crsd
    $su - root
    $CRS_home/bin/crsctl stop crs

    Paul R @ NL wrote:
    before is shutting down crs i tend to stop the instances and services via srvctl then stop crs via crsctl
    just the way i do it. not saying it's the right way but it is the one i am comfortable with.Good -) If we stop CRS, but forgot shutdown oracle instances ... we'll see shutdown abort in alert log file(that mean instances are shutdowned abort).
    We should shutdown instance before stop CRS anyway.

  • What agent_home/sysman/log/agabend.log can hold?

    There are log files in the agent_home/sysman/log.agabend.log is one of them.In my agabend.log shows in the following:
    Thu May 24 09:38:07 2007
    XXXXXXXXXXXXXXXX
    Thu May 24 09:40:29 2007
    XXXXXXXXXXXXXXXX
    I am interesting why this occur when I starting agent?
    Does anyone know the reason of them or why this occur?

    Courtney,
    That makes sense and in fact the 11.2.0.2 installation was upgraded to 11.2.0.3 and 11.2.0.2 was not uninstalled so these entries from the targets.xml make sense -
    <HOME NAME="Ora11g_gridinfrahome1" LOC="/usr/local/oraGrid/product/11.2.0.2-grid" TYPE="O" IDX="1">
    <NODE_LIST>
    <NODE NAME="hammer"/>
    <NODE NAME="steele"/>
    </NODE_LIST>
    </HOME>
    <HOME NAME="OraDb11g_home1" LOC="/usr/local/oracle/product/11.2.0.2/dbhome_1" TYPE="O" IDX="2">
    <NODE_LIST>
    <NODE NAME="hammer"/>
    <NODE NAME="steele"/>
    </NODE_LIST>
    Now, on to the next question. In the statemgmt/oracle_home directory I see these files (among others) -
    cmupg.ucdavis.edu_cmupg1_oracle_database_home
    LISTENER_SCAN10_hammersteele_oracle_listener_home
    cmupg is a database which no longer exists and LISTENER_SCAN10 no longer exists. Where do those files come from? The database cmdevel does exist and I see the file -
    cmdevel.ucdavis.edu_cmdevel1_oracle_database_home
    there are three other databases on this cluster, why are there not files for these other databases? I'm very confused and appreciate your help.
    Thank you.
    Bill Wagman

  • Same O_H for OMS and DB10g - Patch installation problem

    Hello,
    I already installed the PatchSet from 10.1.0.5, and my OPatch version is 10.2.0..what this is asking me is for the OracleHome form the OMS, I have 2 OracleHomes...
    ORACLE_HOMES=c:\oraclehomes\db10g (DB)
    ORACLE_HOMES=c:\oraclehomes\oms10g (OMS)
    this Patch is looking for the rsf.rdbms_rsd component that supposed to read from DB, but how can I point the patch to 2 places that have the same O_H???
    Please I need some help.
    Thanks.

    The environment variable is ORACLE_HOME (singular).
    It is best practice to set up different environment variables for:
    OMR_HOME
    OMS_HOME
    and
    OMA_HOME

  • Need to install and/or set-up file purge process ?

    Hello,
    I have just installed OEM GC 10gR5 and when I look in the OMS & OMA directory I found lot of files being generated : are these files purged by OEM itself or do I have to setup/install another thing to have these files purged on time ?
    Regards,
    Noel

    Hello Noel,
    you should tak ea look at:
    $OMS_HOME/sysman/config
    emagentlogging.properties
    emcalog.properties
    emiasconsolelogging.properties
    emomslogging.properties
    Regards
    Rob

  • Validation - Delete Cluster from OEM and rediscover targets

    Grid Control 10204 on AIX.
    We had couple hosts we have configured as a cluster in Grid Control. The team has decided to go another route and will not be be using RAC at this time. We still want to keep the instance on one of the hosts and continue to monitor through Grid Control.
    We are trying to avoid having to reinstall the agent and we're in discussion on what the cleanest and safest options might be. What I suggested was that after the cluster piece is removed, we can then remove the all the targets from OEM GC, including the agent, wait to ensure they are deleted by checking "Management Services and Repository" under delete link. On the host, stop the agent and then run:
    m -r state/*
    rm -r <AGENT_HOME>/sysman/emd/collection/*
    rm -r <AGENT_HOME>/sysman/emd/upload/*
    rm <AGENT_HOME>/sysman/emd/lastupld.xml
    rm <AGENT_HOME>/sysman/emd/agntstmp.txt
    rm <AGENT_HOME>/sysman/emd/blackouts.xml
    rm <AGENT_HOME>/sysman/emd/protocol.ini
    and then run agentca -d on the host to rediscover the agent and the targets.
    Do the steps above seem like a valid option? Is it overkill? Not enough? Any other options.
    Thanks,

    You need to setup prefered cdedentials for clustered database and cluster itself

  • CRS and ORACLE_BASE

    In some of the documentation from Oracle, it says not to use the same ORACLE_BASE for CRS and the databases. Then the examples in the oracle manuals and in the books (including Murali Vallath's Oracle10g RAC book, page 207) show the same ORACLE_BASE for the CRS, ASM and databases.
    There is one note in the "Oracle Clusterware and Oracle RAC Installation Guide" that says "Because you must change the permissions of all the parent directories of the Oracle Clusterware home directory after installing the software to grant write access only to the root user, the Oracle Clusterware home directory must not be a subdirectory of the Oracle base directory". This seems to indicate it must be a different ORACLE_BASE as well as a different ORACLE_HOME for CRS.
    Can anyone tell me if they have encountered issues with having the same ORACLE_BASE for CRS, ASM and the RAC databases if they have different ORACLE_HOME for each?

    Thought I did follow the Oracle documentation during several of my testing and implementations (which is reflected in my book). I now tend to treat ASM and CRS as separate homes but outside the release levels.
    All the new RAC implementations I follow a different directory layout..
    Meaning ORACLE_HOME = /usr/app/oracle/product/10.2.0/db_1 but for crs and ASM I place them directly under product and not at a specific release level.
    ASM_HOME = /usr/app/oracle/product/asm or ORA_CRS_HOME=/usr/app/oracle/product/crs or
    AGENT_HOME=/usr/app/oracle/product/agent
    The reasoning for this is that while you can have multiple versions of Oracle supporting several different databases in a RAC environment, you will only have one ASM and only one CRS set of binaries for a given node. Which means while they belong to a version, may not be 'the' version of a specific database that already exists on the server.
    You will notice I still place them under ORACLE_BASE/product for managability purposes because both asm and crs are both Oracle products.

  • A problem with Threads and loops.

    Hi, I have some code that needs to be constantly running, like while(true)
          //code here
    }However, the code just checks to see if the user has input anything (and then if the user has, it goes to do some other stuff) so I don't need it constantly running and hogging up 98% of the CPU. So I made my class (which has the method that needs to be looped, call it ClassA) implement Runnable. Then I just added the method which needed to be looped into the public void run()
    I have another class which creates an instance of the above class (call it ClassB), and the main(String[] args) is in there.
    public static void main(String[] args)
              ClassA test = new ClassA();
              Thread thread = new Thread(test.getInstanceOfClassA());
              thread.start();
              while(true)
                           //I do not know what to put here
                   try
                        thread.sleep(100);
                   catch(InterruptedException iex)
         }However, the thread only calls run() once,(duh...) but I can't think of away to get it to run - sleep - run -sleep forever. Can someone help me?

    Hi, I have some code that needs to be constantly
    running, like while(true)
    //code here
    }However, the code just checks to see if the user has
    input anything (and then if the user has, it goes to
    do some other stuff) so I don't need it constantly
    running and hogging up 98% of the CPU. Where does the user input come from. Are you reading from an InputStream? If so, then your loop will be blocked anyway when reading from the InputStream until data is available. During that time, the loop will not consume processor cycles.
    public static void main(String[] args)
              ClassA test = new ClassA();
    Thread thread = new Thread(test.getInstanceOfClassA());I have never seen this idiom. If ClassA instanceof Runnable, you simply write new Thread(test).
              thread.start();
              while(true)
    //I do not know what to put
    do not know what to put here
                   try
                        thread.sleep(100);
                   catch(InterruptedException iex)
         }However, the thread only calls run() once,(duh...)Yeah, why would you want to call it more than once given that you have an infinite loop in ClassA.run()?
    Harald.
    Java Text Crunching: http://www.ebi.ac.uk/Rebholz-srv/whatizit/software

  • A problem with Threads and MMapi

    I am tring to execute a class based on Game canvas.
    The problem begin when I try to Play both a MIDI tone and to run an infinit Thread loop.
    The MIDI tone "Stammers".
    How to over come the problem?
    Thanks in advance
    Kobi
    See Code example below:
    import java.io.IOException;
    import java.io.InputStream;
    import javax.microedition.lcdui.Graphics;
    import javax.microedition.lcdui.Image;
    import javax.microedition.lcdui.game.GameCanvas;
    import javax.microedition.media.Manager;
    import javax.microedition.media.MediaException;
    import javax.microedition.media.Player;
    public class MainScreenCanvas extends GameCanvas implements Runnable {
         private MainMIDlet parent;
         private boolean mTrucking = false;
         Image imgBackgound = null;
         int imgBackgoundX = 0, imgBackgoundY = 0;
         Player player;
         public MainScreenCanvas(MainMIDlet parent)
              super(true);
              this.parent = parent;
              try
                   imgBackgound = Image.createImage("/images/area03_bkg0.png");
                   imgBackgoundX = this.getWidth() - imgBackgound.getWidth();
                   imgBackgoundY = this.getHeight() - imgBackgound.getHeight();
              catch(Exception e)
                   System.out.println(e.getMessage());
          * starts thread
         public void start()
              mTrucking = true;
              Thread t = new Thread(this);
              t.start();
          * stops thread
         public void stop()
              mTrucking = false;
         public void play()
              try
                   InputStream is = getClass().getResourceAsStream("/sounds/scale.mid");
                   player = Manager.createPlayer(is, "audio/midi");
                   player.setLoopCount(-1);
                   player.prefetch();
                   player.start();
              catch(Exception e)
                   System.out.println(e.getMessage());
         public void run()
              Graphics g = getGraphics();
              play();
              while (true)
                   tick();
                   input();
                   render(g);
          * responsible for object movements
         private void tick()
          * response to key input
         private void input()
              int keyStates = getKeyStates();
              if ((keyStates & LEFT_PRESSED) != 0)
                   imgBackgoundX++;
                   if (imgBackgoundX > 0)
                        imgBackgoundX = 0;
              if ((keyStates & RIGHT_PRESSED) != 0)
                   imgBackgoundX--;
                   if (imgBackgoundX < this.getWidth() - imgBackgound.getWidth())
                        imgBackgoundX = this.getWidth() - imgBackgound.getWidth();
          * Responsible for the drawing
          * @param g
         private void render(Graphics g)
              g.drawImage(imgBackgound, imgBackgoundX, imgBackgoundY, Graphics.TOP | Graphics.LEFT);
              this.flushGraphics();
    }

    You can also try to provide a greater Priority to your player thread so that it gains the CPU time when ever it needs it and don't harm the playback.
    However a loop in a Thread and that to an infinite loop is one kind of very bad programming, 'cuz the loop eats up most of your CPU time which in turn adds up more delays of the execution of other tasks (just as in your case it is the playback). By witting codes bit efficiently and planning out the architectural execution flow of the app before start writing the code helps solve these kind of issues.
    You can go through [this simple tutorial|http://oreilly.com/catalog/expjava/excerpt/index.html] about Basics of Java and Threads to know more about threads.
    Regds,
    SD
    N.B. And yes there are more articles and tutorials available but much of them targets the Java SE / EE, but if you want to read them here is [another great one straight from SUN|http://java.sun.com/docs/books/tutorial/essential/concurrency/index.html] .
    Edited by: find_suvro@SDN on 7 Nov, 2008 12:00 PM

Maybe you are looking for

  • How to open a file with a link ?

    I am using servlets to design an application. The application supports uploading and downloading of .DOC and .RTF files. My problem is that I am opening an uploaded file via a link. OPen File The above is also working fine and opens the file in the I

  • Would like to specify sort order in link from chart

    Hi Folks, I have a chart for which I would like to provide drill down functionality, so that when a user clicks on the "Initial Budget" bar, they navigate to a financial report for the select business user sorted by Initial Budget. Here's what I've f

  • Problem with JSplitPane

    Hi! I have the following problem with JSplitPane: Whenever I add two components to the splitpane and then add the splitpane to a JPanel, the left component is minimized, i.e. not visible. I always have to manually readjust the splitter in order to se

  • How to correctly clear I/C transactions from payments

    Everyone, We are in ECC 6.0.  We pay our vendors out of one company code while the actual vendor invoice can be in many different company codes.  Treasury is doing I/C clearing of transactions produced from F110 without confirming that the payment ha

  • Identify the Type of Font Names in Illustrator

    How to identify the type of font names like "True Type font" (or) "open Type font" for illustrator file using Scripts or any language. Could you please advice me. Thanks, Prabudass