"To be deliverd" problem

Hello,
I implement scenario from file to RFC in ECC system.
In development environment the scenario work ok.
I transfer the scenario to test environment and here I have a strange problem.
The message not delivered to ECC system.
In SXMB_MONI is look ok and I have black-white flags.
In RWB I found 2 lines per message:
     To Be Delivered     25.06.2009 07:51:52                 Freight_cost_Transfer           NTQ400     urn:sap-com:document:sap:rfc:functions
ZSD_GET_COST_TMS_FROM_XI
     Successful     25.06.2009 07:51:51     25.06.2009 07:51:52           Freight_cost_Transfer                 com:netafim:ecc:freight_cost
Freight_cost_OB
In development where the scenario work ok I found in RWB only 1 line per message:
25.06.2009 07:07:57     25.06.2009 07:08:15           Freight_cost_Transfer     com:netafim:ecc:freight_cost
Freight_cost_OB           DEV400     urn:sap-com:document:sap:rfc:functions
ZSD_GET_COST_TMS_FROM_XI
Thank you for your help
Elad

Hi
S as said b4r unless u delete all old message in "to be delivered" state u cannot process further.
U can see in Runtime Work bench against the message status a radio button select the message with the above status of "to be deleivered" and in header u can find the option with botton "Cancel" message
then refresh / update the list --> status would change once all are cleared then post fresh message it will get processed
If u r not deleting it will proceed further.
Srini

Similar Messages

  • Error in new purchase requisitions, for already deliverd materials

    Dear all,
    I have a problem with newly created purchase requisitions, although material was partially delivered and no delivery is expected anymore.
    For example I have ordered 1767kg of oil and a total sum of 1766.2kg was deliverd. This means only a minor amount of material was not deliverd and only 80gramm are missing. The purchase value key allows a 5% over and under delivery.
    Usually I would expect, that because of the purchasing value key of 5 % over and under deliverance allowence this situation should not occur anymore. Additionally at the time of goods receipt the key of final delivery was set and the purchase order is updated correctly.
    But when I run the MRP again I will have another purchase requisition. The dependend requiement of the material above still existis as production is not finished yet or this is still a planned order.
    What keys do I need to set in total for allowing a "partial delivery"?
    - Purchaseing value key in the material master
    - Delivery completed at the time of goods receipt
    Maybe this question is to basic as I cannot find any questions / answers related to this issue here in the forum.
    In some points, I found that I need to set up the vendor accordingly to set up partial deliveries. But I cannot find the right setting to allow the vendor to do so. I use MK02 for the change of the vendor settings.
    Thank you very much for your support!
    With best greetings,
    Bjoern

    Hello Jürgen,
    yes after thinking about this issue again, I think this might not be an appropriate solution. Now I am thinking about other possibilities.
    1) Automatically change the value in the production order at the time of saving MIGO - will not create any more missing material messages and no new purchase requisitions .
    2) Errror message, that for this positions no more postings are possible as the purchase order still remains "open"
    3) I need to find the customizing of the indicator "delivery completed". At the moment I just dont see, the influence of this indicator.
    Sorry for my "stupid" questions, but I am quiete new to these MM topics. Up to now I was always doing only PP and QM but our collegue for MM has left the team and there are some open issues which now belong to me. Lucky me.
    I have created a new posting at:
    With best greetings,
    Bjoern

  • IDVD 08 - problem with scene selection tabs not working after "burn"

    I have a movie that is about an hour long (made in iMovie08 using mostly still photos). I wanted to have "chapters" -- but with that option gone, I used the Scene Selection option in iDVD08. This created menus with 15 scene selection buttons (I chose every 4 minutes). The menus were automatically created by iDVD and I did nothing to change them, except to type in scene info (two-three words).
    The buttons all worked fine on the computer, and I burned a DVD. The DVD worked great in my VCR player. I'd select Play Movie and it would go. I'd select Scene Selection and I'd get the menus for that. But when I'd highlight one of the scene selections and "enter" (select) -- it wouldn't go to that scene. I could go back and forth between menus, and could move around and highlight the scene buttons, but selecting would not start the scene to play. The movie played fine from start to finish, and the other remote features worked (stop, pause, menu, etc.).
    I went back to iDVD and chose a different theme (thinking maybe I'd inadvertently done something to mess things up. The only thing I did differently in addition to the new theme, was to add two small movie clips - and I rearranged the buttons on the menu (dragging) to get them positioned where I wanted them. So my first menu says "Play Movie". The second menu has: Play Movie, Scene Selections, Little Movie 1, Little Movie 2. Everything worked greated in iDVD. Then I created a disk image to view using DVD Player (rather than waste another DVD). Same problem -- only worse. This time I couldn't even highlight Scene Selection to get to the scenes' menus.
    Any thoughts on why I'm not able to get the "Scene Selection" buttons to work after a burn? Am I missing a step somewhere in iDVD?
    Thanks.

    I am not sure, but does your post concerning the problem, that all Remote Control function will work properly within iDVD'08 but after burning the DVD absolutely not with the RC of your set top DVD player connected to your TV?
    If this is it:
    Meanwhile I could figure out - after many nights of not been very productive and only working out on all the iDVD'08 problems - that **ALL** of the *7.0 Themes* have a major problem in generally.
    The following points are concerning iDVD'08 using any of the 7.0 Themes:
    - Complete deep freeze of your Mac under Leopard when rendering/coding/burning a movie which has chapters and you use movies instead of still images in drop zones. (LeopardiDVD087.0Themes)
    - Functions on remote control of your set top DVD player are not working correctly when making a movie with chapters. This is generally on Tiger and Leopard the same problem using iDVD08 with any of the 7.0 Themes.
    Quick and dirty workaround:
    You may avoid this if you simply use a 6.0 Theme or lower version of the Themes.
    But this is of course not the clue...
    It is VERY DISAPPOINTING, having software at such a low quality level deliverd by Apple. And somehow it looks like they DO NOTHING against it. No statement, no excuse, they really remain silent.
    This may also be a thread you could be interested in:
    http://discussions.apple.com/thread.jspa?threadID=1203323
    Cheers,
    Roland

  • Weird problem w. mysql 4.0 when inserting  into a table with auto_incremet

    Since I upgraded my mysql database from 3.23 to 4.0.1
    the following code does not work anymore:
    I get this error msg:
    <b>"Invalid argument value: Duplicate entry '2147483647' for key 1"</b>
    <code>
    package mysql4test;
    import java.sql.*;
    class test {
    public test() {
    public static void main(String[] args) {
    Connection connection = null;
    Statement st = null;
    try {
    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    connection = DriverManager.getConnection
    ("jdbc:mysql://192.168.0.4/x?user=x&password=");
    st = connection.createStatement();
    for (int i=1;i<10;i++)
    String insert = "insert into x (b) values('hello');";
    System.out.println(insert);
    st.executeUpdate(insert);
    } catch (Exception ex) { System.err.println(ex.getMessage());}
    </code>
    The table definition of table x is the following:
    create table x(a int(11) primary key auto_increment, b varchar(10));
    What makes the thing even more mysterious is, that doing the same thing as this programm does manually on an mysql client does not produces any error message.
    insert into x (b) values('hello'); works fine on the mysql client deliverd with the server.

    Hi eggsurplus!
    Yes, I succeeded in different ways to solve the problem. changing the table was one of it. but the problem is that i can't simply change all tables (there are a lot) as the are used in other programms.
    The simplest solution that i figured out so far was changing the insert from
    insert into x (b) values('hello')
    to
    insert into x (a,b) values("+i+",'hello')"
    But this solution is still not satisfactory as in more complex programs you can't just use the i variable of the for loop, but you have to add a new variable that increments on every insert.
    This still means changing a lot of code that i wrote for mysql 3.x.
    Besides, i tried also another jdbc driver and it still didn't work.
    The same bug was reported in a PHP forum, but without solution

  • Problem With Sales order

    Hi Guys
    we created a Salesorder  with  10 items in which the material for last item of  118 qty  was got abosolute before getting deliveres and a new item was created throught back order on the next day and allocated 1 qty from 118 qty
    the remaining Items and one qty conformed was deliverd and got shipped.
    here my problem is
    the item which i talking got stucked at that level with out making availability check for the remaining 117 qty thought there is stock for that material
    and also it is disabling the feilds in the VA02 Tcode to change the status .
    the one qty conformed was deliverd and shipped to cust with the othere items
    below are the two lines of item in  my sales order
    120     8201532     118     EA     START-DEV  ZOBS             0     D     10/17/2006     F002
    130     8201786     118     EA     START-DEV  ZTAN             120     D     10/17/2006     F002
    can any tell me please why and where this problem occured
    Thanks & Regards
    Babu

    Hi,
    Check up the material type of the Sales item and the availabillity checking group allocated in the material master.
    Reward points if satisfied.
    Thanks
    Augustine Ponraj

  • Problems Car-Kit CK-7W Bluetooth connection not st...

    Hello,
    I have the following problem :
    I have in my Car a Nokia CK-7W Car-Kit. The phone i use is a Nokia N73 with the latest software 4.0736.3.2.1.
    the only connection i use is the bluetooth i dont use the cable connection.
    Verry often when i am calling someone the connection is suddenly not good anymore. there is suddenly a lot of noise so the person on the other side is just hearing noise and could not understand me anymore.
    Calling again will not solve the problem they cant understand what i am saying.
    The only solution is to turn the ignition key to 0 so the car-kit is turned off and then restart again.
    Also has to power off the N73 and back on --> problem solved for a while.
    I have tried with my older Phone Nokia 6280 there the problem is not the same. Sometimes it is also not good but not the same as with the N73.
    With the 6280 i have also a different problem that it is not posible to disconnect the line when calling. so when i push the CK-7W button for a disconnect the line keeps open the only option is the read key on the phone.
    So i dont know exacly what is defective , is it the car-kit or are both the phones not good.
    Does anyone has the same problem.
    Someone told me that it is because i have one of the first CD-7W car-kits so they have software that is to old. I dont think that it is normal that there are so much problems. They have told me that i have one of the first versions because my paing key is not 0000 but a nr in my case 1819.
    When the CK-7W Module is defective , does anyone know if it is possibe that i just buy a Module without the other accessories.
    Thanks for the advice.
    DCA

    Hello,
    I can ubderstand if yo have installed more than 100 CK-7W that you are sure that the passcode must be 0000.
    I am 100% sure that on my original box there is CK-7W and on the manual the passcode is 1819.
    I have also a POP connector + cable (wich is not installed ) to connect the phone with cable. Has the CK-1W also this possibility ?
    What i dont can see is the correct nr ont the main unit because it is stiil someware behind the dashboard.
    The only think i can think of is that i have received a ck-1W like you told but is was in a CK-7W box. The manual deliverd was also CK-7W but the passcode was on a label that was put on the manual so they have the possibility to make a misttake.
    I dont think that after +- 3 year i can go to Nokia an ask them for the correct one ?
    So someone had made a mistake , maybe at Nokia or maybe in the shop. Why i dont know . the only thing i know is that i have a lot of problemens with this stupid thing.
    If you have installed 100's of the CK-7W can you advice me if the stupid thing is working fine or that i be better of to buy another one ?
    I only need a goed stable working Car-Kit not with display,....
    Thanks
    DCA

  • PP_Goods deliverded

    Dear friends,
       Please explain me how to go about this scenario.
    This is sugar manufacturing industry.
    Strategy:Make to stock
    Our finished goods is: Branded sugar--measured in bales.
    Semi finished goods are:
    1. Packed sugar measured in Each
    2. Manufactured sugar measured in Kgs.
    One bale of branded sugar contains 20 numbers of packed sugar.
    Each number of packed sugar contains 1/2 kg of manufactured sugar. So 20 packets(per bale) will weigh 10 kgs of manufactured sugar.
    (We deliver the finished goods to stores in terms bales.Then stotes will deliver the same goods to marketing in the same "bales" units)
    I will do my final confirmation (Production order status:CNF)
    We will deliver the finished goods to stores through t.code MB31(movement type:101).
    So i will get my production order status as "DLV(Deliverd).
    Here is my problem:
    After transfering my goods to stores , they will transfer the goods to marketing through goods train.
    During transportation some of the packets in the bales will get damaged.
    So they will send back the entire bale (in that bale some packets are damaged)to stores for reprocessing.
    Is it possible to take back(revert back the production order) the bales into production since my production order has the status "DLV(Delivered)?
    Otherwise guide me how to handle the scenario?
    Thanks in advance
    Senthil

    hi these links can be usefull
    http://help.sap.com/saphelp_47x200/helpdata/en/4d/2b8e8343ad11d189410000e829fbbd/frameset.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/4d/2b8e8343ad11d189410000e829fbbd/frameset.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/4d/2b8e8343ad11d189410000e829fbbd/frameset.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/4d/2b8e8343ad11d189410000e829fbbd/frameset.htm
    -ashok

  • TV @nywhere card A/D problems

    1.Product Type:TV @nywhere card A/D
    2.Driver version:latest
    3.Operating System:vista
    4.Problem Description: I recently bought a new computer (3weeks) with this tv card build in. A had one day colour television, but after a day it went to black and white + the sound wasnt synchronised with the image. At the moment i dont have anything at all. All that i see over all the chanels, is black. + the remote who had been delivered with the card never worked.I already tried an other tv cable but that didnt fixed anything.
    The program used to watch tv is DTV (deliverd with the card)
    What do i have to do?
    P.S. Dont know if it could help but this are my pc specs:
    1 x     Antec Performance P182 zwart zonder voeding     
    1 x    DVD-RW NEC AD7173 18X Dual Layer zwart (bulk)    
    1 x    Apacer interne kaartlezer 16 in 1 zwart    
    2 x     Apacer 2 gig ram    
    1 x    Gigabyte GA-P35-DS3 socket 775    
    1 x    OCZ 700W GameXStream SLI voeding    
    1 x    BFG 8800GTX 768mb DDR3 OC Edition PCI-express
    1 x    MSI TV@nywhere A/D Hybrid TV Tuner Card    
    1 x    Microsoft Vista Home Premium 64bit NL OEM    
    1 x    Intel Core™2 Duo Processor E6850 3.0Ghz 4MB Box socket 775    
    1 x    Samsung 500Gb T166 7200rpm 16mb SATAII    
    (some words are in dutch because i live in belgium)

    Use correct driver and application for your card ---> http://global.msi.com.tw/index.php?func=driverfile&dno=2522&i=0

  • Flash cs6 native ane publish problem

    hi! i was very lucky to download and test flash cs6, but there are directly problems with the publish function
    after i add an ane file, i get this error:
    DVFreeThread - CFMachPortCreateWithPort hack = 0x18fe90, fPowerNotifyPort= 0x19d5a0
    DVFreeThread - CFMachPortCreateWithPort hack = 0x1a96b0, fPowerNotifyPort= 0x18c5e0
    DVFreeThread - CFMachPortCreateWithPort hack = 0x19d0a0, fPowerNotifyPort= 0x19d5a0
    invalid profile specified 'Application does not support current profile'
    if i'm testing another ane file, i get this error:
    DVFreeThread - CFMachPortCreateWithPort hack = 0x32a460, fPowerNotifyPort= 0x319fc0
    DVFreeThread - CFMachPortCreateWithPort hack = 0x1454b0, fPowerNotifyPort= 0x12c400
    The content cannot be loaded because there was a problem loading an extension: Error: Requested extension com.wolfknock.idialog is not supported for MacOS-x86.
    both ane files was supported on the cs5.5 version. so should cs6 not be besser than 5.5?
    i'm using the default deliverd air3.2 and mac lion..
    maybe it's because the new option ios sdk 5.1 (checkbox?)

    Unfortunately it's a compile time error not a runtime error. If it was runtime then yes you could certainly check the typical isSupported() method most ANEs have. Although you need to compile to get to that point and the compiler is throwing the error.
    Flash CS5.5 didn't have a problem because you needed to package with ADT command line to include a native extension as it had no idea what it was so it makes sense you could test using it. Flash Builder users (which has had ANE support) have had to deal with keeping ANEs from being packaged to avoid the same compiler errors you're getting. We're very used to the PITA that it is
    All an ANE developer needs to do is provide an implementation for a particular platform, even if it doesn't work, and you won't get errors. During creating the static library for the ANE the iOS developer could specify support for it in the build. Unfortunately the ANE you're using doesn't have that. It's telling Flash it only works on a device.

  • Msi X79A-GD45 (8D) Power on Problem

    Dear Msi Users.
    I got a Strange problem with a Msi X79A-GD45 (8d) Motherboard.
    The Motherboard runs a Intel i7 3930K with a Kingston HyperX 32gb 1600mhz Kit (KHX1600C9D3K8/32GX), a Ati 7770 2gb, A SSD + HDD and a DVDRom
    We deliverd 9 systems and 8 of them are Working just great (Al the Set-ups are the same).
    One of them is giving strange problems with powering on the whole System.
    When i boot the Machine it goes on for a couple of Seconds (Without signal) and then powers off for 2 Seconds, afher that it boot's again and the problem is the same.
    So we tried a couple of things, change Memory kit (result the same), change Cpu (result the same), change power supply (result the same), new Motherboard (result the Same).
    Then i tried 32gb 1333 kit and the system works great, goes on like normal and boot's windows like normal.
    But when i put the 1600ghz 32gb kit back the problem is back right away. Even with a New 32gb Kit.
    The Bios is the Last version, We are in the Dark now. Is there a smart guy who can help us?
    Thnx in Advance and Greets from Holland.

    Quote from: RemusM on 24-October-12, 21:48:57
    If they need 1.65V, they are overvolted & overclocked DDR3-1333 chips for sure.
    So ...
    Be sure XMP is disabled.
    If it doesn't work on "Auto", you need to manually set the speed, timings and voltage (for 8 modules I recommend around 1.60V).
    Good luck.
    Oke will do that, does not work on auto indeed, one rimm (of 4) does but 8 does not.
    Quote from: xmad on 24-October-12, 21:44:13
    I can almost gaurantee that ram is 1333, with an 1600 oc profile.(XMP)
    So it is running at 1333 by default, this indiciates either different bios, or something different about the ram you used previously. Which was why I was thinking perhaps they switched memory makers or something. Something has to be different. The only thing you have tried differently is a different brand of memory.
    That is just the Stragest thing.
    We Orderd 9 cpu's, 9 Motherboards, 9 Dimm kits, 9 SSD's, 9 HDD's, 9 Grafixcards, 9 CPU Coolers, 36 (4x9) CaseFan's and 9 PC Cases.
    All build on one day and all works great, after 4 weeks of great use, 1 of them is giving this problem.
    In the Netherlands we call this "Schiet me maar in een balonnetje" with means "Shoot me in a baloon" 

  • A problem with threads

    I am trying to implement some kind of a server listening for requests. The listener part of the app, is a daemon thread that listens for connections and instantiates a handling daemon thread once it gets some. However, my problem is that i must be able to kill the listening thread at the user's will (say via a sto button). I have done this via the Sun's proposed way, by testing a boolean flag in the loop, which is set to false when i wish to kill the thread. The problem with this thing is the following...
    Once the thread starts excecuting, it will test the flag, find it true and enter the loop. At some point it will LOCK on the server socket waiting for connection. Unless some client actually connects, it will keep on listening indefinatelly whithought ever bothering to check for the flag again (no matter how many times you set the damn thing to false).
    My question is this: Is there any real, non-theoretical, applied way to stop thread in java safely?
    Thank you in advance,
    Lefty

    This was one solution from the socket programming forum, have you tried this??
    public Thread MyThread extends Thread{
         boolean active = true;          
         public void run(){
              ss.setSoTimeout(90);               
              while (active){                   
                   try{                       
                        serverSocket = ss.accept();
                   catch (SocketTimeoutException ste){
                   // do nothing                   
         // interrupt thread           
         public void deactivate(){               
              active = false;
              // you gotta sleep for a time longer than the               
              // accept() timeout to make sure that timeout is finished.               
              try{
                   sleep(91);               
              }catch (InterruptedException ie){            
              interrupt();
    }

  • 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

  • J2ME problem with threads

    Hi all,
    I would like to ask you for a help. I need to write a small program at my university. I started to write a midlet which function would be to countdown time for sports activities. I woul like to start a new thread - the one that counts down - and at the same time make the main thread sleep. After the "countdown" thread finishes, the main thread wakes up and waits for user input. The problem is that when the "countdown" thread finishes his work, I've got Uncaught exception java/lang/NullPointerException. error and the midlet halts.
    Below you can find the code
    import java.lang.*;
    import java.util.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;
    public class intervals extends MIDlet implements CommandListener
    public Display ekran;
    private SweepCanvas sweeper;
    private Form rundy;
    private TextField round0, round1, round2, round3, round4, round5, round6, round7, round8;
    private long czas,x;
    private Command exitCommand;
    private Command addRound;
    private Command delRound;
    private Command start;
    private TextField repeat;
    private Form odliczanie;
    private Alert ostrz;
    Licznik thread;
    String test;
    StringItem test1;
    int parz,i,j,k;
    static int l;
    int ilrund;
    int ilpowt;
    Item sec;
    long sec1;
    public intervals()
        rundy = new Form("Interwa&#322;y sportowe");
        exitCommand = new Command("Wyj&#347;cie", Command.EXIT, 2);
        addRound = new Command("Dodaj","Dodaj rund&#281;", Command.ITEM,1);
        delRound = new Command("Usu&#324;","Usu&#324; ostatni&#261; rund&#281;", Command.ITEM,1);
        start = new Command("Start", Command.ITEM,1);
        odliczanie = new Form("Odliczanie");
        TextField dodaj(TextField kolej)
            kolej=new TextField("Podaj czas (s) rundy "+parz,null, 4, TextField.NUMERIC);//stworzenie nowej instancji do wybierania czasu trwania rundy
            if(rundy.size()==0)
                rundy.insert(rundy.size(),kolej);
                else
                    rundy.insert(rundy.size()-1, kolej);
            return kolej;
        void odliczanie(TextField round)
            monitor m=new monitor();
            k=Integer.parseInt(round.getString());
            ekran.setCurrent(odliczanie);
            thread=new Licznik(k,odliczanie);
            thread.start();
            ekran.setCurrent(rundy);
    public void startApp()// throws MIDletStateChangeException
        rundy.deleteAll();
        repeat = new TextField("Podaj ilo&#347;&#263; powtórze&#324;",null,1,TextField.NUMERIC);
        rundy.addCommand(addRound);
        rundy.addCommand(exitCommand);
        rundy.setCommandListener(this);
        Canvas obrazek = new MyCanvas();
        ekran = Display.getDisplay(this);
        ekran.setCurrent(obrazek);
        czas=System.currentTimeMillis();
        while (System.currentTimeMillis()<czas+1000)
            continue;
        ekran.setCurrent(rundy);
    public void pauseApp()
    public void destroyApp(boolean unconditional)
        notifyDestroyed();
    public void commandAction(Command c, Displayable s)
        if (c == exitCommand)
            destroyApp(false);
            notifyDestroyed();
        else if(c==addRound)
            if(rundy.size()==0)//Sprawdzenie ilo&#347;ci elementów w celu poprawnego wy&#347;wietlania liczby rund w formie
                parz=1;
                else
                parz=rundy.size();
            switch(parz)
                case 1:
                    round0=dodaj(round0);break;
                case 2:
                    round1=dodaj(round1);break;
                case 3:
                   round2= dodaj(round2);break;
                case 4:
                    round3=dodaj(round3);break;
                case 5:
                    round4=dodaj(round4);break;
                default:
                    ostrz=new Alert("Uwaga","Maksymalna liczba rund wynosi 9", null, AlertType.INFO);
                    ostrz.setTimeout(3000);
                    ekran.setCurrent(ostrz);
            if(rundy.size()==1)
                rundy.append(repeat);
                rundy.addCommand(start);
            rundy.addCommand(delRound);
        else if(c==delRound)
            if(rundy.size()!=0)
                rundy.delete(rundy.size()-2);
                if (rundy.size()==1)
                    rundy.deleteAll();
                if(rundy.size()==0)
                    rundy.removeCommand(delRound);
                    rundy.removeCommand(start);
        else if(c==start)
            ilrund=rundy.size()-1;
            if(this.repeat.size()>0)
                ilpowt=Integer.parseInt(this.repeat.getString());
            ekran = Display.getDisplay(this);
            for (i=1; i<=ilpowt;i++)
                odliczanie= new Form("Odliczanie");
                 for (j=0;j<ilrund;j++)
                    switch(j)
                         case 0:
                             odliczanie(round0);
                             break;
                         case 1:
                             odliczanie(round1);
                             break;
                         case 2:
                             odliczanie(round2);
                             break;
                         case 3:
                             odliczanie(round3);
                             break;
                         case 4:
                             odliczanie(round4);
                             break;
                         case 5:
                             odliczanie(round5);
                             break;
                         case 6:
                             odliczanie(round6);
                             break;
                         case 7:
                             odliczanie(round7);
                             break;
                         case 8:
                             odliczanie(round8);
                             break;
    class Licznik extends Thread
        int czas1,k;
        Form forma;
        monitor m;
        public Licznik(int k,Form formap)
            czas1=k;
            forma=formap;
        public synchronized void run()
            while(czas1>0)
                forma.deleteAll();
                forma.append("Czas pozosta&#322;y (s): "+czas1);
                try{Thread.sleep(1000);} catch(InterruptedException e){e.printStackTrace();}
                czas1--;
            if(czas1<=0)
                m.put();
        }and monitor class
    public class monitor
    boolean busy=false;
    synchronized void get()
        if(!busy)
            try
                wait();
            }catch(InterruptedException e){e.printStackTrace();}
        notify();
    synchronized void put()
        if(busy)
            try
            wait();
            }catch(InterruptedException e){e.printStackTrace();}
        busy=true;
        notify();
    }Can anybody help me with this?

    Groovemaker,
    Your Licznik class has a member m of type monitor, which has not been instantiated (in other words is null) hence, when calling m.put() you get NullPointerException. Please also mind, that using Thread.sleep(1000) is not an accurate way of measuring time.
    If I may, please use recommended for Java class naming conventions - some of your names use lower case, while other don't which is confusing to the reader.
    Daniel

  • Problem with threads within applet

    Hello,
    I got an applet, inside this applet I have a singleton, inside this singleton I have a thread.
    this thread is running in endless loop.
    he is doing something and go to sleep on and on.
    the problem is,
    when I refresh my IE6 browser I see more than 1 thread.
    for debug matter, I did the following things:
    inside the thread, sysout every time he goes to sleep.
    sysout in the singleton constructor.
    sysout in the singleton destructor.
    the output goes like this:
    when refresh the page, the singleton constructor loading but not every refresh, sometimes I see the constructor output and sometimes I dont.
    The thread inside the singleton is giving me the same output, sometime I see more than one thread at a time and sometimes I dont.
    The destructor never works (no output there).
    I don't understand what is going on.
    someone can please shed some light?
    thanks.
    btw. I am working with JRE 1.1
    this is very old and big applet and I can't convert it to something new.

    Ooops. sorry!
    I did.
         public void start() {
         public void stop() {
         public void destroy() {
              try {
                   resetAll();
                   Configuration.closeConnection();
                   QuoteItem.closeConnection();
              } finally {
                   try {
                        super.finalize();
                   } catch (Throwable e) {
                        e.printStackTrace();
         }

  • Problem with Threads and a static variable

    I have a problem with the code below. I am yet to make sure that I understand the problem. Correct me if I am wrong please.
    Code functionality:
    A timer calls SetState every second. It sets the state and sets boolean variable "changed" to true. Then notifies a main process thread to check if the state changed to send a message.
    The problem as far I understand is:
    Assume the timer Thread calls SetState twice before the main process Thread runs. As a result, "changed" is set to true twice. However, since the main process is blocked twice during the two calls to SetState, when it runs it would have the two SetState timer threads blocked on its synchronized body. It will pass the first one, send the message and set "changed" to false since it was true. Now, it will pass the second thread, but here is the problem, "changed" is already set to false. As a result, it won't send the message even though it is supposed to.
    Would you please let me know if my understanding is correct? If so, what would you propose to resolve the problem? Should I call wait some other or should I notify in a different way?
    Thanks,
    B.D.
    Code:
    private static volatile boolean bChanged = false;
    private static Thread objMainProcess;
       protected static void Init(){
            objMainProcess = new Thread() {
                public void run() {
                    while( objMainProcess == Thread.currentThread() ) {
                       GetState();
            objMainProcess.setDaemon( true );
            objMainProcess.start();
        public static void initStatusTimer(){
            if(objTimer == null)
                 objTimer = new javax.swing.Timer( 1000, new java.awt.event.ActionListener(){
                    public void actionPerformed( java.awt.event.ActionEvent evt){
                              SetState();
        private static void SetState(){
            if( objMainProcess == null ) return;
            synchronized( objMainProcess ) {
                bChanged = true;
                try{
                    objMainProcess.notify();
                }catch( IllegalMonitorStateException e ) {}
        private static boolean GetState() {
            if( objMainProcess == null ) return false;
            synchronized( objMainProcess ) {
                if( bChanged) {
                    SendMessage();
                    bChanged = false;
                    return true;
                try {
                    objMainProcess.wait();
                }catch( InterruptedException e ) {}
                return false;
        }

    Thanks DrClap for your reply. Everything you said is right. It is not easy to make them alternate since SetState() could be called from different places where the state could be anything else but a status message. Like a GREETING message for example. It is a handshaking message but not a status message.
    Again as you said, There is a reason I can't call sendMessage() inside setState().
    The only way I was able to do it is by having a counter of the number of notifies that have been called. Every time notify() is called a counter is incremented. Now instead of just checking if "changed" flag is true, I also check if notify counter is greater than zero. If both true, I send the message. If "changed" flag is false, I check again if the notify counter is greater than zero, I send the message. This way it works, but it is kind of a patch than a good design fix. I am yet to find a good solution.
    Thanks,
    B.D.

Maybe you are looking for

  • SAP BI Report Publication on CRM Web UI Reports

    Hi Experts, Im required to post a BI report on Web UI. I did the customization for the same in the path. SproCRMUI FrameworkUI Framework DefinationDisplay SAP NetWeaver BI Report in CRM.. Then I created a Logical Link id with the BI Report assigned t

  • Error in BI Content 7.03 Import

    Hi, i have installed BW 7.0 in unix machine. I am getting the follwoing error during BI content 7.03 import. Pls let me know whether , i have to import BI-content 7.01 before or i can import BI 7.03 directly I am facing error in XTA_put execution <b>

  • Streaming from a Mac mini

    Im thinking of buying a mac mini to stream music from itunes. We have 2 iphones and an ipad in the house. could different people be streaming to different rooms simultaneously from the same itunes source? Thanks David

  • Ipod Touch 4th Gen won't connect to my wifi

    I just got home from work and tried to go on my Ipod touch 4th gen to see if I got any new emails and to facetime my fiance. I check my ipod to reconnect to my wifi router and it hasn't connected(bare in mind it was connecting to my wifi fine before

  • Printing problem with the HP LaserJet 100 color MFP M175

    I have recently upgraded to Windows 8.  When running Windows 7, I could print as may documents from Word or Excel as  I wanted.  Now, with Windows 8, I can only print one document.  When I try to print another, the program freezes.  The only way I ca