Waiting for another script to finish...

I can no more start or stop FMS3 server, it says :
Waiting for another script to finish...
According to the start script, i check
/home/fms/tmp/script.lck and i have this file as empty, what should
i do then ?
Do you all have this file ? /home/fms/tmp/script.lck ?
Jerome

My reply is late i just read your problem after having the same, it locked up my whole Ubuntu system.
Its easy to solve just delete the lock folder you see. Server should restart and work fine.

Similar Messages

  • When server start, get "Waiting for another script to finish..." message and doesn't go anywhere.

    Hello, my engineer (Japanese) is trying to start AdobeMediaServer but he got stuck after getting "Waiting for another script to finish..." message. Any idea how to resolve this situation?
    [root@NA1SIBZDH02 /opt/adobe/ams]# ./server start
    NPTL 2.5
    chmod: changing permissions of `./tmp/': 読み込み専用ファイルシステムです
    Waiting for another script to finish...
    [root@NA1SIBZDH02 /opt/adobe/ams]#
    [root@NA1SIBZDH02 /opt/adobe/ams]#
    [root@NA1SIBZDH02 /opt/adobe/ams]# ls -l
    合計 52324
    drwxr-xr-x 15 ams  ams      4096  9月 11 17:54 Apache2.2
    -rwxr-xr-x  1 root root  1061035  9月 11 17:54 License.htm
    -rwxr-xr-x  1 root root    43374  9月 11 17:54 License.txt
    -rwxr-xr-x  1 root root    58827  9月 11 17:54 ReleaseNotes.htm
    -rwxr-xr-x  1 root root     5715  9月 11 17:54 adminserver
    -rwxr-xr-x  1 root root      871  9月 11 17:54 adobe-lq.png
    -rwxr-xr-x  1 root root     2912  9月 11 17:54 ams_icon.png
    -rwxr-xr-x  1 root root  3220552  9月 11 17:54 amsadmin
    -rw-r--r--  1 root root        6  9月 11 17:54 amsadmin.pid
    -rwxr-xr-x  1 root root 11187664  9月 11 17:54 amscore
    -rwxr-xr-x  1 root root  4331472  9月 11 17:54 amsedge
    -rwxr-xr-x  1 root root  3070840  9月 11 17:54 amsmaster
    -rw-r--r--  1 root root        6  9月 11 17:54 amsmaster.pid
    -rwxr-xr-x  1 root root     5242  9月 11 17:54 amsmgr
    drwxrwxrwx  6 ams  ams      4096  9月 11 17:54 applications
    -rwxr-xr-x  1 root root      960  9月 11 17:54 cleanup
    drwxr-x---  3 ams  ams      4096  9月 11 17:54 conf
    drwxr-xr-x  5 ams  ams      4096  9月 11 17:54 creds
    drwxr-xr-x  3 root root     4096  9月 11 17:54 documentation
    -rwxr-xr-x  1 root root 16368842  9月 11 17:54 libadbe_dme.so
    -rwxr-xr-x  1 root root   336065  9月 11 17:54 libadbe_flv.so
    -rwxr-xr-x  1 root root    59248  9月 11 17:54 libasneu.so.1
    -rwxr-xr-x  1 root root    71263  9月 11 17:54 libcares.so
    -rwxr-xr-x  1 root root    71263  9月 11 17:54 libcares.so.2
    -rwxr-xr-x  1 root root    71263  9月 11 17:54 libcares.so.2.0.0
    -rwxr-xr-x  1 root root  1968482  9月 11 17:54 libcrypto.so.1.0.0
    -rwxr-xr-x  1 root root   162403  9月 11 17:54 libexpat.so.1
    -rwxr-xr-x  1 root root  3497472  9月 11 17:54 libfmsccme.so
    -rwxr-xr-x  1 root root  6992879  9月 11 17:54 libhds.so
    -rwxr-xr-x  1 root root   403767  9月 11 17:54 libssl.so.1.0.0
    drwxr-xr-x  2 root root     4096  9月 11 17:54 licenses
    drwxrwxrwx  2 root root     4096  9月 11 17:54 logs
    drwxr-xr-x  5 root root     4096  9月 11 17:54 modules
    drwxr-xr-x  6 root root     4096  9月 11 17:54 samples
    drwxr-xr-x  3 root root     4096  9月 11 17:54 scriptlib
    -rwxr-xr-x  1 root root     7494  9月 11 17:54 server
    -rwxr-xr-x  1 root root   300864  9月 11 17:54 shmrd
    -rwxr-xr-x  1 root root    36206  9月 11 17:54 tcSrvMsg
    drwxrwxrwx  2 root root     4096  9月 11 17:54 tmp
    drwxr-xr-x  9 root root     4096  9月 11 17:54 tools
    -rwxr-xr-x  1 root root     2411  9月 11 17:54 uninstallAMS
    drwxr-xr-x  8 ams  ams      4096  9月 11 17:54 webroot
    [root@NA1SIBZDH02 /opt/adobe/ams]#
    [root@NA1SIBZDH02 /opt/adobe/ams]#
    ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー

    A possible cause is security software (firewall) that blocks or restricts Firefox or the plugin-container process without informing you, possibly after detecting changes (update) to the Firefox program.<br />
    Remove all rules for Firefox from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox and the plugin-container process and the updater process.
    See:
    * https://support.mozilla.com/kb/Server+not+found
    * https://support.mozilla.com/kb/Firewalls

  • BEx Analyzer Report error - microsoft office excel is waiting for another

    Hi,
    I am running a query from BEx Analyzer, it is throwing the error as " microsoft office excel is waiting for another application to complete an ole action "
    Here in variable screen, I am trying to give input for the variables, then it is throwing the above error message.

    The error message you are receiving means that an Excel macro is waiting for another macro to finish in order to proceed. It is an informational message so you understand why the system is slower than expected.
    The solution is on the Microsoft side, see BOJ Note 1201513.
    From the MSDN link below, you will see a description of the Display
    Alerts Property:
    http://msdn.microsoft.com/en-us/library/aa194195(office.10).aspx
    DisplayAlerts Property
    wdAlertsNone No alerts or message boxes are displayed. If a macro encounters a message box, the default value is chosen and the macro continues.
    The Note suggests changing the "Application.DisplayAlerts = False" to "Application.DisplayAlerts = wdAlertsNone"

  • Waiting for another JSP to end.

    document.dados.action = "exists.jsp?familia="+familia;
    document.dados.submit();
    alert('After ');the problem is that when I execute this peace of code the exists.jsp runs AFTER
    alert('After '); this one...
    But I wanted to do that alert before this...
    I belive the question is: how can I wait in my jsp for another jsp to finish running?
    Can you help me?
    Thanks in advance.
    Jos� Neves
    Edited by: Jose_Neves on Jul 30, 2008 5:00 AM

    Here is a link with the monthly fees:
    http://www.apple.com/iphone/easysetup/rateplans.html
    You would be forced to select one of these plans and pay for the actiavtion as well as the first month up front. With the cheapest plan this will be a little over $100.

  • Application waits for the thread to finish

    Hi all,
    I have a class let say test that extends Thread.
    In my application i say:
    test Xtest = new test();
    Xtest.start();
    System.out.println("Thread finished");
    I need my application to wait for the thread to finish for it to continue, i.e. in my example print "Thread finished" .
    Can someone help me.
    Thanks in advance for your help.
    Best regards,
    Saadi MONLA

    This should work:
    test Xtest = new test();
    Xtest.start();
    Xtest.join();
    System.out.println("Thread finished");

  • Microsoft Excel is waiting for another application to complete an Ole actio

    When I access Data Manager, I get the error message: "Microsoft Excel is waiting for another application to complete an Ole action."  When I click OK, I get another error: "Cannot download the dimension list from server.  Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached."  It never used to happen until recently.  I don't know what to tell the IT guys to do.  Thanks.

    This is a known error in V5. I have had this error at almost every V5 customer.
    The following solution (got it from support) solves it permanently.
    Changes have to be made to the outlooksoft.config file and the connectionstrings in tblappsetinfo. Be sure to restart the server(s) after applying these changes.
    1. In outlooksoft.config file of x:\OutlookSoft\Websrvr\bin folder on the web server change the following line:
    <add key="Database_AppServerDBConn" value="Server=<servername>;Database=AppServer;Trusted_Connection=True;"/>
    to
    <add key="Database_AppServerDBConn" value="Server=<servername>;Database=AppServer;Trusted_Connection=True;pooling=false"/>
    Please note that where I have <servername> you should put the name of your server ****
    Also, add the pooling=false; to every connection string in tblappsetinfo.
    I am sure this helps,
    Regards,
    Alwin Berkhout

  • Compressor 4.1.3 hangs Waiting for Create Disc to Finish

    Compressor 4.1.3 hangs at the "Waiting for Create Disc to Finish" stage.  The audio and video streams have been created and are in Finder. The correct drive has been selected in the Actions section and there is a disk in the drive. I have run Compressor Repair.  However there is no activity at the drive (which otherwise works fine and will burn a disk from Finder).  Anyone any ideas?

    I'e not run into this before. Try a different clip – preferably a QuickTime movie. Bring that into Compressor and mark a short section with in and out points. Choose Hard Drive for Output Device in the Job Action section. What happens after you submit it?
    Russ

  • Package deployment keeps getting stuck with message 'Waiting for another program'

    Hi, I just started working on SCCM.  We have an Orchestrator runbook which creates a collection and then creates an advertisement for packages and task sequences.  I was able to get a task sequence and a package successfully execute.  When
    creating the advertisement, I set it to RERUN_ALWAYS.  However, the next time I ran our runbook which creates the collection andadvertisement (I manually deleted the previous one), it does create them but the deployment is stuck to In Progres with the
    Description of 'Waiting for another program'.  This just happens for packages before and not for task sequences the other day but now, it's the same issue whether I use a package or a task sequence.   
    I see this in execmgr.log:
    <![LOG[Package UAT0007D, program Test is ready but can not be started because package , program  is currently running.]LOG]!><time="17:07:20.993+480" date="02-06-2015" component="execmgr" context=""
    type="1" thread="6804" file="executionrequest.cpp:9083">
    <![LOG[Raising event:
    [SMS_CodePage(437), SMS_LocaleID(1033)]
    instance of SoftDistProgramWaitingForAnotherProgram
    AdvertisementId = "UAT2011A";
    BlockingPackageID = "";
    BlockingProgramName = "";
    ClientID = "GUID:2FE27567-3215-4015-BE09-0E65F09767C8";
    DateTime = "20150207010721.004000+000";
    MachineName = "ACAA-UAT-SCCM";
    PackageName = "UAT0007D";
    ProcessID = 6316;
    ProgramName = "Test";
    SiteCode = "UAT";
    ThreadID = 6804;
    ]LOG]!><time="17:07:21.010+480" date="02-06-2015" component="execmgr" context="" type="1" thread="6804" file="event.cpp:729">
    <![LOG[Successfully raised SoftDistProgramWaitingForAnotherProgram event for program Test.]LOG]!><time="17:07:21.021+480" date="02-06-2015" component="execmgr" context="" type="1" thread="6804"
    file="executionrequest.cpp:9128">

    yes check the exemgr.log file and also see is that package has dependency for another package? and if yes then that package is already available non DP?
    Sharad Singh | My blogs: SharadTech | Twitter:
    @SinghSharaad | | Please remember to click “Mark as Answer” on the post that helps you.This can be beneficial to other community members reading the thread.

  • DBMS_SCHEDULER wait for job/program to finish

    Hello All,
    I've run into a little limitation on my understanding of DBMS_SCHEDULER.
    I have an executable script which does a network scan. My goal is to lauch this from an application, and wait (could be 5 minutes or 2 hours) for the scan to finish before I return the results.
    Where I'm a little confused, is the flow of the entire process works when I want to wait for the program to complete:
    1 - Define a program?
    2 - Apply arguments?
    3 - Apply credentials
    4 - Define a chain?
    Literally, I'm not sure how to tackle this task. I simply wish to launch to job and wait for it to finish before I go retreive the file from the server. This is what I have so far, just bits and pieces.
    Mayeb I simply missed somethign in the docs, and I'm overcomplicate things.
    Thanks in advance to the community for you assistance.
    Jan S.
    BEGIN
      dbms_scheduler.create_program(
        program_name   => 'network_scan',
        program_type   => 'executable',
        number_of_arguments => 5,
        program_action => 'scan_network.py',
        enabled        =>  FALSE);
      dbms_scheduler.define_program_argument('network_scan',1,'x01=1');
      dbms_scheduler.define_program_argument('network_scan',2,'x02=192.168.1.1');
      dbms_scheduler.define_program_argument('network_scan',3,'x03=24');
      dbms_scheduler.define_program_argument('network_scan',4,'x04=D');
      dbms_scheduler.define_program_argument('network_scan',5,'x05=1521-1523,7777'); 
      vJobName := dbms_scheduler.generate_job_name('NET_SCAN_');
      dbms_scheduler.create_job(job_name => vJobName,
                                  job_type => 'EXECUTABLE',
                                  job_action => '/usr/bin/scan_nework.sh',
                                  number_of_arguments => 5,
                                  enabled => FALSE,
                                  auto_drop => FALSE,
                                  comments => 'Network');
    dbms_scheduler.set_attribute(vJobName,'credential_name', 'SUCREDENTIALS');
      dbms_scheduler.run_job(vJobName,FALSE);
      dbms_scheduler.create_chain (
       chain_name            =>  'net_scan_chain',
       rule_set_name         =>  NULL,
       evaluation_interval   =>  NULL,
       comments              =>  NULL);
      dbms_scheduler.define_chain_step('net_scan_chain', 'step1', 'network_scan');
      SELECT additional_info, external_log_id
      INTO   l_additional_info, l_external_log_id
      FROM   (SELECT log_id,
                     additional_info,
                     REGEXP_SUBSTR(additional_info,'job[_0-9]*') AS external_log_id
              FROM   dba_scheduler_job_run_details
              WHERE  job_name = vJobName
              ORDER BY log_id DESC)
      WHERE  ROWNUM = 1;
      DBMS_OUTPUT.put_line('ADDITIONAL_INFO: ' || l_additional_info);
      DBMS_OUTPUT.put_line('EXTERNAL_LOG_ID: ' || l_external_log_id); 
      -- Wait at least 3 second because its distributed
      dbms_lock.sleep(3);
      SELECT job_name, status, error#, additional_info
      FROM dba_scheduler_job_run_details
      WHERE job_name= vJobName;
      dbms_lob.createtemporary(l_clob, FALSE);
      dbms_scheduler.get_file(
        source_file     => l_external_log_id ||'_stdout',
        credential_name => 'ORACLECREDENTIALS',
        file_contents   => l_clob,
        source_host     => NULL);
      DBMS_OUTPUT.put_line('stdout:');
      DBMS_OUTPUT.put_line(l_clob);
    k Scan');

    See Tom's last reply in this AskTom thread. It shows how to use the DBMS_ALERT package to signal you.
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:5320945700346034393

  • Patched Deployments issue: "waiting for another installation to complete"

    I have some percent of computers which runs into above state in monthly patch deployments. I could minimal information from execmgmr, udpatesdeployment.log,
    CliSpy and Client Center etc tools but that doesn’t offer much help to nail down the issue completely. Have any of you dealt to resolve such issue successfully ? Is there any efficient way to handle this ?
    It seems I have
    DeploymentA, waiting for the completion of DeploymentB, which in turn waiting for the completion of
    DeploymentC. Is there any better approach I could take to nail down and resolve the issue. One of my finding is,  KB articles installs (SCCM R3, SCCM Asset Intelligence) causes these issue as they restart (upgrade sort of execution) the
    agent during the execution, I need to confirm these
    Vasu

    Hi Vasu,
    This issue can be caused by a deployment was previously deployed and was now deleted. This was because the clients finished installation
    and wanted to notify the Server that it is done, but since the deployment was deleted, it couldn’t Notify its progress to the site server and the CCM_DeploymentTaskEx1 got stuck.
    Please use the following scripts to delete the instance to test this issue.
    strService = "CcmExec"
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\CCM\SoftwareUpdates\DeploymentAgent")
    Set colWMISettings = objWMIService.ExecQuery("Select * from CCM_DeploymentTaskEx1")
    For Each objWMISetting in colWMISettings
    objWMISetting.AssignmentId = ""
    objWMISetting.JobId = "{00000000-0000-0000-0000-000000000000}"
    objWMISetting.Put_
    Next
    'Stop service
    Set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    Set objService = objWMI.Get("Win32_Service.Name='" & strService & "'")
    objService.StopService()
    WScript.Sleep 10000 ' Pause to allow service to stop
    'Start service
    Set objService = objWMI.Get("Win32_Service.Name='" & strService & "'")
    objService.StartService()
    WScript.Sleep 10000 ' Pause to allow service to start
    Regards,
    Sabrina
    This posting is provided "AS IS" with no warranties or guarantees, and confers no rights. |Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.
    This can be beneficial to other community members reading the thread.

  • [Solved] systemd does not wait for the unit to finish

    My problem is described in the title. I have made a test by enabling the following unit:
    [Unit]
    Description=/etc/rc.local Compatibility
    [Service]
    Type=forking
    ExecStart=/bin/sleep 1000
    TimeoutSec=0
    RemainAfterExit=yes
    After=network.target
    [Install]
    WantedBy=multi-user.target
    The unit is well started (a process sleep 1000 exists). But with a type=forking, systemd is supposed to hang in this case. Instead, the graphical.target is launched, systemctl list-units mention it as dead, but the display manager is started before the sleep 1000 completes. Ho can I force systemd to wait?
    Last edited by olive (2015-03-16 16:49:34)

    olive, now you're making even less sense. I didn't say the sleep example was stupid and I didn't question your reasons for doing/wanting this.
    I suggested you add "Before=display-manager.service" and you respond "I added Before=graphical.target and it didn't change anything."
    I also tried to explain why systemd has no reason to delay the display-manager.service. You could have asked for further clarification, as berbae has now done. Let's try a longer explanation.
    Service startup
    Services can be started in different ways, as configured with Type=. This determines when a service is considered "started" (or when the service's start-up is considered finished). When a service reaches this state (some time after being started), units that are supposed to start After= this service will be started (and no sooner).
    With simple systemd has no further information about the start-up process. It launches whatever you specify in ExecStart and this is the main process that continues to run till the service stops. systemd assumes this type of service is started immediately. All the other types have some way for the process to indicate to systemd (either directly or indirectly) when it has finished starting.
    Actually oneshot is also a bit special and that is where RemainAfterExit comes in. For oneshot, systemd waits for the process to exit before it starts any follow-up units (and with multiple ExecStarts I assume it waits for all of them). So that automatically leads to the scheme in berbae's last post. However, with RemainAfterExit, the unit remains active even though the process has exited, so this makes it look more like "normal" service with
    begin of unit/startup ---- end of startup ------ end of unit
    This is the relevant behavior for this thread. First sleep starts, then after 1000 seconds, start-up finishes and follow-up units will be started. Then either the unit dies, or (with RemainAfterExit) it stays "active".
    The man page describes how "end of startup" is determined for each Type.
    Targets
    Targets are meant to group units together, to provide synchronization points (and replace runlevels). When you start a target, all its units will be started (in parallel if possible). The man page says:
    Unless DefaultDependencies= is set to false, target units will
           implicitly complement all configured dependencies of type Wants=,
           Requires=, RequiresOverridable= with dependencies of type After= if the
           units in question also have DefaultDependencies=true.
    This means that (by default) when a target is requested, all it units are started first. Only after all units have finished starting, the target itself will be started (and since the target doesn't do anything by itself, this startup is basically instantaneous). Without this dependency, the order between the target and its units is unspecified, so in theory the target could finish starting immediately while its units are still being started.
    Back to olive
    graphical.target has these DefaultDependencies, so it is not started until all its units (like display-manager.service) and other After= dependencies (like multi-user.target) have finished starting. Your sleep service has to be started before multi-user.target starts (again due to default target dependencies). So first display-manager and the sleep service are started and after 1000 seconds, the sleep service finishes starting and then (assuming all other dependencies were quicker) multi-user.target is started and graphical.target as well (assuming display-manager didn't need 1000 seconds).
    If you want display-manager.service after the sleep service, add a Before/After line to specify that (this was your original goal and my suggestion).
    olive wrote wrote:However, units that are parts of the graphical target are still launched before the graphical target become active. I am still unable to completely delay the starts of the graphical target before a specific unit completes.
    It should be clear now how this works. "units that are part of the graphical target" can only mean "units that are wanted/required by the graphical target" but that is basically all the units that are started when you boot your system, because multi-user.target is a part of graphical.target. And your sleep service is a part of multi-user.target, so in fact you're saying you want to delay starting the sleep service until the sleep service completes
    What you probably intended was to delay all units that are a part of graphical.target but not of multi-user.target until after the sleep service. I can't think of an easy (or even good) way to do this and this post is already too long, so I'll table that for now.

  • Whether two session with for update at the same time will wait for another?

    Will this scenario happen?
    One session executes: select ... for update/select ... for update nowait
    The other session also executes: select ... for update/select ... for update nowait
    Two sessions happens at the same time unluckily. Whether they will all stand by because of "for update" or quit immediately because of "nowait"?
    Thx a lot.

    HiddenName wrote:
    This situation is called 'a deadlock'. Oracle will automaticaly detect a deadlock. One of the statements will fail with ORA-00060 deadlock detected;
    No, it's not.
    A deadlock is when sesson-A has a lock on something that session-B needs in order to continue, and at the same time, session-B has a lock on something that Session-A needs in order to continue. They BOTH have something the other needs.
    In the OP's case, at least as he described it, it is simple serialization. The one with the lower scn will go, then the next.
    PS.
    Why don't you try? You can setup a small table with some records, open 2 sessions to the same database and for example issue UPDATE statements:
    session 1: update where id=1
    session 2: update where id=2
    session 1: update where id=2 - this will hang waiting for session 2 to commit and free lock
    session 2: update where id=1 - ORA-00060
    You may also read about deadlocks in chapter on "Data Concurency and Consistency" of "Oracle Concepts'.

  • VI waiting for another VI finishing before completing

    Howdy
    i have a goniometer.vi which should move the detectorarm 1°, then starts a spectrometer.vi and measures the spectrum. after completing measurements the goniospectrometer.vi should move another 1° and again...
    i have made the spectrometer.vi a sub.vi and wanted to include it into goniometer.vi, but i have no idea how to tell the goniometer.vi that spectrometer.vi is ready for moving on.
    thanks
    Robert

    Use a while loop. Make sure that both subvi's (goniometer and spectrometer) have error in and error out. Call the goniometer vi first and spectrometer second, wire error out from the first to error in of the second. Put some kind of exit condition to stop the loop. The first vi will execute, then when it is done the second will execute. The process will repeat until the stop condition is met.
    - tbob
    Inventor of the WORM Global

  • Waiting for a thread to finish

    I've been researching this issue for a couple of days, but I dont think I know enough about threading to ask the right question in a search engine. Sorry if this is a basic blunder....I dont write swing often and it shows.
    I have a swing app that includes a long task so I have implemented a progress bar. I need to wait until the progress bar task completes before continuing to the rest of the method. I've tried:
    1. Putting the progress bar within a while loop (while task not complete...) but the progress bar dialog does not render fully. I've even added repaint, but still the dialog looks blank.
    2. SwingUtilities.invokeLater, but it doesnt wait until the progress bar is finished
    3. SwingUtilities.invokeAndWait, though after all the reading I did about deadlock conditions I didnt like the idea. However I was desperate so I tried it and got an error:"Cannot call invokeAndWait from the event dispatcher thread".
    4. Putting the code that needs to occur after the progress bar in an "invokeLater" thread
    5. I've also used the ProgressBarDemo from the java.sun example with the swingworker hoping the worker thread would handle the issue.
    A much smaller version of the code is below:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.Border;
    public class ProblemCode extends JFrame
         private JFrame jFrame = null;
         private JPanel jMain = null;
         private JButton startButton = null;
         public ProblemCode()
              initialize();
         public void initialize()
              //Setup the main application window size
              jFrame = new JFrame();
              jFrame.setContentPane(getJMainPanel());
              jFrame.pack();
              jFrame.addWindowListener(new java.awt.event.WindowAdapter()
                   public void windowClosing(java.awt.event.WindowEvent e)
                        dispose();
              SwingUtilities.invokeLater(new Runnable()
                public void run()
                    jFrame.setVisible(true);
         private JPanel getJMainPanel()
              if(jMain == null)
                   jMain = new JPanel();
                   jMain.add(getJStartButton());
              return jMain;
         private JButton getJStartButton()
              if (startButton == null)
                   startButton = new JButton();
                   startButton.setText("Start");
                   startButton.setVisible(true);
                   startButton.addActionListener(new ActionListener()
                       public void actionPerformed(ActionEvent e)
                           SwingUtilities.invokeLater(new Runnable()
                                 public void run()
                                          progBar();
                            System.out.println("Do this after the progress bar completes");
                            SwingUtilities.invokeLater(new Runnable()
                                 public void run()
                                      System.out.println("invokeLater doesnt work either....");
              return startButton;
         private void progBar()
            JFrame jProgFrame = new JFrame("JProgressBar Sample");
            jProgFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            Container content = jProgFrame.getContentPane();
            final JProgressBar progressBar = new JProgressBar();
            new Thread()
                private int counter = 0;
                private final int val = (int)(Math.random()*10)+1;
                public void run()
                    for(int i = 0;i <= 100;i++)
                        counter += val;
                        javax.swing.SwingUtilities.invokeLater( new Runnable()
                            public void run()
                                progressBar.setValue(counter);
                        try
                            Thread.sleep(500);
                        catch (InterruptedException e)
            }.start();
            progressBar.setStringPainted(true);
            Border border = BorderFactory.createTitledBorder("Reading...");
            progressBar.setBorder(border);
            content.add(progressBar, BorderLayout.NORTH);
            jProgFrame.setSize(300, 100);
            jProgFrame.setVisible(true);
         public static void main(String[] args)
              SwingUtilities.invokeLater(new Runnable()
                   public void run()
                        new ProblemCode();
    }Thank you for taking the time to review this.

    Hi,
    I made some tiny changes in yoyr code, marked with
    // PBHere the changed code
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.Border;
    public class ProblemCode extends JFrame {
        private JFrame jFrame = null;
        private JPanel jMain = null;
        private JButton startButton = null;
        public ProblemCode() {
         initialize();
        public void initialize() {
         // Setup the main application window size
         jFrame = new JFrame();
         jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // PB
         jFrame.setContentPane(getJMainPanel());
         jFrame.pack();
         jFrame.addWindowListener(new java.awt.event.WindowAdapter() {
             public void windowClosing(java.awt.event.WindowEvent e) {
              dispose();
         SwingUtilities.invokeLater(new Runnable() {
             public void run() {
              jFrame.setVisible(true);
        private JPanel getJMainPanel() {
         if (jMain == null) {
             jMain = new JPanel();
             jMain.add(getJStartButton());
         return jMain;
        private JButton getJStartButton() {
         if (startButton == null) {
             startButton = new JButton();
             startButton.setText("Start");
             startButton.setVisible(true);
             startButton.addActionListener(new ActionListener() {
              public void actionPerformed(ActionEvent e) {
                  SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                       progBar();
                  System.out
                       .println("Do this after the progress bar completes");
                  SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                       System.out
                            .println("invokeLater doesnt work either....");
         return startButton;
        private void progBar() {
         JFrame jProgFrame = new JFrame("JProgressBar Sample");
         jProgFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         Container content = jProgFrame.getContentPane();
         final int val = (int) (Math.random() * 10) + 1; // PB
         final JProgressBar progressBar = new JProgressBar(0, 100 * val); // PB
         progressBar.setStringPainted(true);
         Border border = BorderFactory.createTitledBorder("Reading...");
         progressBar.setBorder(border);
         content.add(progressBar, BorderLayout.NORTH);
         jProgFrame.setSize(300, 100);
         jProgFrame.setVisible(true);
         // PB
         final Thread longTask = new Thread() {
             private int counter = 0;
             public void run() {
              for (int i = 0; i <= 100; i++) {
                  counter += val;
                  javax.swing.SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                       progressBar.setValue(counter);
                  try {
                   Thread.sleep(100); // PB
                  } catch (InterruptedException e) {
         longTask.start();
         // PB
         Thread followUpTask = new Thread(new Runnable() {
             @Override
             public void run() {
              try {
                  System.out.println("Follow up task is waiting");
                  longTask.join();
                  System.out.println("Follow up task  continues");
              } catch (InterruptedException e) {
                  e.printStackTrace();
         followUpTask.start();
        public static void main(String[] args) {
         SwingUtilities.invokeLater(new Runnable() {
             public void run() {
              new ProblemCode();
    }Piet

  • Asynchrono​us Call - collect values without waiting for sub VI to finish executing

    Hi All, I'm relatively new to LabVIEW and for the first time I'm attempting to make use of Asynchronous calls in a program.
    What I would like to accomplish, generally, is this: At the beginning of the main vi, begin running a sub-vi in the background. This sub-vi is collecting streaming data from an instrument with a refresh rate of 50Hz. At various points in the main vi I would like to call the instantaneous value of that streaming data from the sub vi, passing it back into the main vi, while allowing the sub-vi (the streaming data collection) to continue running. The reason for this, is that I need to collect the data from this instrument many times wihtin a loop, and the connection initialization to the streamin data instrument is both slow and faulty, and takes too long if I have to initialize the connection, collect the data, close the connection, each time I wish to collect the data. I would prefer to initialize the connection once at the beginning, have a stream of continuous data being collected in the background, and then at certain points within the main vi loop, query that streaming data for its instantaneous value, but allow the streaming data sub vi to continue running.
    I recognize that a method to allow the streaming data collection sub vi to run in the background is to use the Asynchronous call method - however, to collect the data I need to use an asynchronous wait, which will only collect the data if the streaming data sub vi finishes executing. How can I collect the data at a particular instant while still allowing the subvi to keep running (thereby minimizing the number of times the connection to the instrument needs to initialized)?
    Any suggestions or alternative methods would be great!
    Thanks
    Jason

    This is typically solved in a different way than what you envision. Have your parallel deamon post its current values to a buffer. This could be a global variable (gasp!!) or an intelligent global variable (a VI with loop that executes always once and has an unitialized shift register that can either be initized or read based on a control input). You can add extra code to the read and write selection such as scaling etc to turn the intelligent global into an action engine that does extra things on its different methods.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions
    Attachments:
    Intelligent Global.vi ‏19 KB

Maybe you are looking for

  • Imac G5 - unable to get past grey screen

    Help Please. I have an Imac G5 (non I-sight) model which was going well until about 3 weeks ago. First indications were the freezing of the screen with various patterns across it - no choice but to continually power off. Then every time i've tried to

  • SAP BW 7.0  BOOK for begginers

    Hi IS there any book with detail pictorial description for SAP bw 7.0 for bw 7.3. Like there is one Fu Fu , but is based on 3.0. Regards Nitin

  • Users added to a Task AFTER the BPM process has started

    Does anyone know of a way to assign users to a task AFTER the BPM process has started?

  • Screen BADI

    Hi All, How to Find the Screen BADI  How to Develop screnn BADI How to Implement screnn BADI Give me Example and Brief Explanation I Look forward to your reply Reward points compulsory Thanks & Regards SEK

  • Audio out of sync in premiere pro cs6 after capturing

    Hi, some of my footages are out of audio sync after capturing. I have an imac with 3.4 Ghz intel i7 processor, 16gig ram, ssd card  ( august 2012) I have a sony hvr-z1 with tape. Does anyone know how to solve this problem? Thanks in advance for your