Invoking "this.notify()" before thread exit?

a Runnable class that i am writing must account for 2 cases:
(1) the user wants to do other work while the Runnable does its business.
(2) the user wants to wait for the Runnable to exit before continuing on with other work.
this is my best solution:
MyRunnable mr = new MyRunnable();
new Thread(mr).start();
synchronized(mr) {
  mr.wait();
public class MyRunnable implements Runnable {
  public void run() {
    synchronized(this) {
      this.notifyAll(); // just before exit, i notify everyone that i am exiting. but if no one is waiting, what harm does this do?
} further, why not do this.notifyAll() for all Threads / Runnables just before they exit?
if no one is waiting, is there harm in invoking notifyAll() ? seems that this just adds a new feature to my class at no cost??
my understanding of OOP is that a class writer should not assume how a user will use his class, so this seems like a good option. yet, this does seem non-standard.
Edited by: kogose on Oct 19, 2008 11:53 AM

But why start a thread at all only to wait for it? In the case where the caller wants to wait, he should just call your run() method directly. No other code required. In the case where he wants to proceed independently, he can call new Thread(xxx).start().

Similar Messages

  • Why do we need to take a lock before invoking wait()/notify() on an Objec

    Hi,
    Why do we need to take a lock before invoking wait()/notify() on an Object? i know that we shud take otherwise illegalstateexception is thrown.
    what is the reason to take a lock bfefore invoking the above methods. why does jvm expects from the programmer?
    Cheers,
    duggana.

    Well, very often a wait or notify is conditional on the state of some flag (semaphore) which is protected by the monitor. By putting the wait in a synchronized section you guarantee that the sempaphore won't change between the final test of it and the actual wait or notify, otherwise a notify might be lost and the program hang.
    // wait on semaphor
    if (!canProcede)
       synchronized(this)
           if(!canProcede)
              wait();
    //   release semaphor
    synchronized(this)
         if(!canProceed) {
              canProede = true;
              notify();
        }If the wait above wasn't guarded by the sychrozined it's possible the second code fragment might be executed between the test and the wait, in which case the wait would be called after the notify and, hence, wait for ever.

  • Thread sends notify() before waiting thread says wait()

    In the code below the ref book I'm using "Sun certified Programmer for Java 2" had the calculator thread starting before the Reader thread was even created and hence the calculator thread was finished it's task and sending a notify() before the Reader even had it's socks on and saying wait()
    ( And this cost me a lot of time tryin to figure this problem out as the code must have being written for a Z80 processor and not a 2.4GHz P4)
    To fix this I put the calculator starting after the reader thread, but .......
    I would have thought that java would have some protection against this happening, ie, like a notify flag which a thread can set if it has done it's job BEFORE the waiting thread even starts waiting, ie a preemptive mechanism to help speed things up ?
    package MyPackage;
    public class Reader extends Thread {
    Calculator MyCalculator;
    public Reader(Calculator calc){
    MyCalculator = calc;
    public void run(){
    synchronized(MyCalculator){
    try{
    System.out.println("Waiting for calculation ... ");
    MyCalculator.wait();
    }catch (InterruptedException e){}
    System.out.println("Total is: " + MyCalculator.total);
    public static void main(String args []){
    Calculator calculator = new Calculator();
    //calculator.start();
    new Reader( calculator ).start();
    calculator.start();
    package MyPackage;
    public class Calculator extends Thread{
    int total;
    public void run(){
    synchronized(this) {
    for(int i=0; i<100; i++){
    total += i;
    System.out.println("Calculation complete, notifying waiting thread..");
    notify();

    It's up to the 'umble programmer to code it right. The code you quoted was crap.
    The most common way to wait is on a condition:
    while (hotAndBotherd())
        obj.wait();And then the notifying thread will take steps to change that:
    //code that cools off the hot and bothered
    obj.notify[all]();If the initial state of things is hot and bothered then there is no race condition: the first thread will wait.

  • Why do we need to take a lock before invoking wait()/notify() on an Object?

    Hi,
    Why do we need to take a lock before invoking wait()/notify() on an Object? i know that we shud take otherwise illegalstateexception is thrown.
    what is the reason to take a lock bfefore invoking the above methods. why does jvm expects from the programmer?

    Please do not crosspost..

  • A Thread Notifying Another Thread

    Here is what I would like to accomplish. Before thread A terminates, I would like thread A to notify thread B that it is about to terminate. I would like to do this notification through a function, which need to be called regardless if the thread terminates gracefully.
    Is there a way to define this function and have the JVM call it. I was told by someone that JVM calls a function when a thread exits and I can override the function so that thread A notifies thread B. If this function exists, please let me know how to accomplish this. If this function does not exist, what are my options, if any, to come up with a solution to this problem?
    thanks,
    Paul0al

    If you want to handle abnormal termination due to an uncaught exception, (OutOfMemoryError, NullPointerException, etc.) you can put thread A into a subclass of ThreadGroup, which you subclass like this:
    // Untested code! Coding on the fly...
    class MyThreadGroup extends ThreadGroup {
      public void uncaughtException(Thread t, Throwable e) {
        // Notify your other thread here of the death of our thread
    }So our thread group's uncaughtException() method is called when a thread in it dies. I believe this is the only useful feature of ThreadGroup, although I think inheriting ClassLoaders might be a feature only provided by ThreadGroup as well.

  • Photoshop Elements 12 (fresh install, on fresh installed Windowss 7 Ulitmate 64 OS) was printing incorrect colors, now is not printing at all. All other applications will print.  I was having this problem before I restored my PC back to factory defaults.

    Photoshop Elements 12 (fresh install, on fresh installed Windowss 7 Ulitmate 64 OS) was printing incorrect colors, now is not printing at all. All other applications will print.  I was having this problem before I restored my PC back to factory defaults. Now it is happening again.
    Any suggestions?

    Hi @prdstudio3 ,
    Thank you for visiting the HP Support Forums. The Serial Number needed to be removed from your Post. This is From our Rules of Participation:
    Protect privacy - yours and others'. Don't share anything about yourself that you would not want to see on a road-side billboard. Don't post contact or other personal information-your own or anyone else's-or any content that you receive in one-to-one communications without the author's consent. For example, don’t post your computer’s serial # or contact information publicly, and do not allow someone you don’t know to remotely take control of your computer.
    If you need people to contact you directly, either ask them to send you a private message or subscribe to the thread so you will be notified when there are replies. You may also click on your name anywhere in the forum and you will be taken to your profile page, where you can find a list of threads you have participated in.
    Sharing personal email addresses, telephone numbers, and last names is not allowed for your safety. If you have any questions feel free to send me a private message in reply.
    Thank you
    George
    I work for HP

  • Pretty sure that i am blowing past the notify() before the wait()

    i am working on a project, and here is my basecase.
    public class Worker extends Thread {
      public boolean taskFinished = false;
      private Object flag = new Object();
      private FutureTask task;
      public void run() {
        while(true) {
          synchronized(flag) {
            flag.wait();
            taskFinished = false;
            task.run();
            taskFinished = true;
      public void execute(FutureTask task) {
        synchronized(flag) {
          this.task = task;
          flag.notify();
    }here is an example of how i'd use this class:
    FutureTask ft = new FutureTask(task);
    Worker worker = new Worker();
    worker.start();
    // Thread.sleep(10);  <-- this "fixes" the problem (well, makes the problem much less probable)
    worker.execute(ft);
    ......without the wait(10) , the program works about 80% of the time.
    with the wait(10) , my testing has always completed successfully. but that does not really solve the problem.
    i am almost certain that i am calling flag.notify() before the flag.wait() ..... i have no idea of what to do.
    note: this is probably a "non-standard" way to use FutureTask , and its more appropriate to use an ExecutorService to take care of this
    business, but my problem is larger than this base case. i want to use this general structure. otherwise, i need to re-design.

    When I visit at http://ezinearticles.com/?Acai-Berry---How-I-Lost-30-Pounds-in-Under-30-Days-Using-The-Acai-Berry&id=1998407 I found a product of acai berry to reduce weight. That one I try and find myself in good shape and I am happy to share this with all about acai berry.Acai Berry Weight Loss Program free!

  • The I/O operation has been aborted because of either a thread exit or an application request

    Using the latest version of mvmc which supports conversion to 2012 R2, we get an error as above during the conversion process (just before it gets to Analyse disks).
    FYI, the log snippets are:-
    08/22/2014 06:57:23 +01:00  [5]  VERBOSE: End of initializing (D:\mvmc\tempconverted\MVMC\0\disk-0.vhdx).
    08/22/2014 06:57:33 +01:00  [5]  VERBOSE: System.ComponentModel.Win32Exception (0x80004005): The I/O operation has been aborted because of either a thread exit or an application request
       at Microsoft.Accelerators.Mvmc.Engine.ForVMware.ExportLease.GetFiles(IDownloadAdapter adapter, String host, DirectoryInfo dirInfo, TaskContext taskContext)
       at Microsoft.Accelerators.Mvmc.Engine.ForVMware.VirtualMachine.DownloadFiles(IDownloadAdapter downloadAdapter, String toPath, TaskContext context)
       at Microsoft.Accelerators.Mvmc.Engine.ServiceLayer.Internal.MachineConversionService.ConvertToDrives(IMachineConversionRequest machineConversionRequest, IPostProgress& provisionHyperVPhase, IVirtualMachine& sourceVM, TaskContext taskContext)
    08/22/2014 06:57:34 +01:00  [5]  EXCEPTION: System.ComponentModel.Win32Exception (0x80004005): The I/O operation has been aborted because of either a thread exit or an application request
       at Microsoft.Accelerators.Mvmc.Engine.ForVMware.ExportLease.GetFiles(IDownloadAdapter adapter, String host, DirectoryInfo dirInfo, TaskContext taskContext)
       at Microsoft.Accelerators.Mvmc.Engine.ForVMware.VirtualMachine.DownloadFiles(IDownloadAdapter downloadAdapter, String toPath, TaskContext context)
       at Microsoft.Accelerators.Mvmc.Engine.ServiceLayer.Internal.MachineConversionService.ConvertToDrives(IMachineConversionRequest machineConversionRequest, IPostProgress& provisionHyperVPhase, IVirtualMachine& sourceVM, TaskContext taskContext)
       at Microsoft.Accelerators.Mvmc.Engine.ServiceLayer.Internal.MachineConversionService.ConvertToMachine(IMachineConversionRequest machineConversionRequest, TaskContext taskContext)
       at Microsoft.Accelerators.Mvmc.Engine.ServiceLayer.Internal.MachineConversionService.<>c__DisplayClass6.<ConvertToMachineAsync>b__5()
       at System.Threading.Tasks.Task`1.InnerInvoke()
       at System.Threading.Tasks.Task.Execute()
    08/22/2014 06:57:34 +01:00  [5]  Exception caught : System.ComponentModel.Win32Exception (0x80004005): The I/O operation has been aborted because of either a thread exit or an application request
       at Microsoft.Accelerators.Mvmc.Gui.Model.ConversionModel.ConvertGuestMachine()
       at Microsoft.Accelerators.Mvmc.Gui.ViewModels.Machine.MachineCompletionViewModel.OnWorkerDoWork()
    08/22/2014 06:57:34 +01:00  [1]  Background task is complete.
    08/22/2014 06:57:34 +01:00  [1]  Conversion error message is displayed.
    08/22/2014 06:57:34 +01:00  [1]  Value of 'ErrorMessage' = 'The I/O operation has been aborted because of either a thread exit or an application request'
    Any ideas what could be causing this and a fix?
    Regards
    Ian

    Same Issue converting SBS 2011 with Exchange Decommissioned. Was hoping the error would go away after decom of Exchange but no luck.
    Hoping Microsoft gets us an answer on this because the idea behind the tool is fantastic.
    Move was to 2012 R2 from VMware 5.
    Will have to use disk2vhd /fingerscrossed
    http://vniklas.djungeln.se/2014/10/13/mvmc-3-0-released-with-p2v-support/
    SBS may not be supported, but have received this err otherwise as well.
    Failure Log:
    11/20/2014 19:41:26 -06:00  [1]  Navigating to the 'Before You Begin' page.
    11/20/2014 19:41:31 -06:00  [1]  Moving Forward from the 'Before You Begin' page.
    11/20/2014 19:41:31 -06:00  [1]  Navigating to the 'Machine Type' page.
    11/20/2014 19:41:33 -06:00  [1]  Moving Forward from the 'Machine Type' page.
    11/20/2014 19:41:33 -06:00  [1]  Navigating to the 'Migration Destination' page.
    11/20/2014 19:41:44 -06:00  [1]  Moving Forward from the 'Migration Destination' page.
    11/20/2014 19:41:44 -06:00  [1]  Navigating to the 'Hyper-V Host' page.
    11/20/2014 19:41:54 -06:00  [1]  Value of 'MachineName' = '192.168.168.5'
    11/20/2014 19:41:54 -06:00  [1]  Value of 'UseSessionCredentials' = 'True'
    11/20/2014 19:41:54 -06:00  [1]  Pressing Next on the 'Hyper-V Host' page.
    11/20/2014 19:41:54 -06:00  [1]  Displaying busy cursor.
    11/20/2014 19:41:54 -06:00  [1]  Progress bar visibility changed to 'Visible'.
    11/20/2014 19:41:54 -06:00  [1]  Progress message: 'Validating the credentials'.
    11/20/2014 19:41:54 -06:00  [4]  Background worker thread started.
    11/20/2014 19:41:56 -06:00  [1]  Background task is complete.
    11/20/2014 19:41:56 -06:00  [1]  Displaying normal cursor.
    11/20/2014 19:41:56 -06:00  [1]  Progress message: ''.
    11/20/2014 19:41:56 -06:00  [1]  Progress bar visibility changed to 'Hidden'.
    11/20/2014 19:41:56 -06:00  [1]  Moving Forward from the 'Hyper-V Host' page.
    11/20/2014 19:41:56 -06:00  [1]  Navigating to the 'Disk' page.
    11/20/2014 19:42:11 -06:00  [1]  Value of 'DestinationMachineSharePath' = '\\192.168.168.5\SBS01'
    11/20/2014 19:42:11 -06:00  [1]  Value of 'IsFixedDisk' = 'True'
    11/20/2014 19:42:11 -06:00  [1]  Moving Forward from the 'Disk' page.
    11/20/2014 19:42:11 -06:00  [1]  Navigating to the 'Source' page.
    11/20/2014 19:42:55 -06:00  [1]  Value of 'MachineName' = '192.168.168.48'
    11/20/2014 19:42:55 -06:00  [1]  Value of 'UseSessionCredentials' = 'False'
    11/20/2014 19:42:55 -06:00  [1]  Pressing Next on the 'Source' page.
    11/20/2014 19:42:55 -06:00  [1]  Displaying busy cursor.
    11/20/2014 19:42:55 -06:00  [1]  Progress bar visibility changed to 'Visible'.
    11/20/2014 19:42:55 -06:00  [1]  Progress message: 'Validating the credentials'.
    11/20/2014 19:42:55 -06:00  [6]  Background worker thread started.
    11/20/2014 19:42:56 -06:00  [1]  Background task is complete.
    11/20/2014 19:42:56 -06:00  [1]  Displaying normal cursor.
    11/20/2014 19:42:56 -06:00  [1]  Progress message: ''.
    11/20/2014 19:42:56 -06:00  [1]  Progress bar visibility changed to 'Hidden'.
    11/20/2014 19:42:56 -06:00  [1]  Moving Forward from the 'Source' page.
    11/20/2014 19:42:56 -06:00  [1]  Navigating to the 'Virtual Machines' page.
    11/20/2014 19:42:56 -06:00  [1]  Displaying busy cursor.
    11/20/2014 19:42:56 -06:00  [1]  Progress bar visibility changed to 'Visible'.
    11/20/2014 19:42:56 -06:00  [1]  Progress message: 'Getting list of virtual machines'.
    11/20/2014 19:42:56 -06:00  [8]  Background worker thread started.
    11/20/2014 19:42:56 -06:00  [1]  Background task is complete.
    11/20/2014 19:42:56 -06:00  [1]  Displaying normal cursor.
    11/20/2014 19:42:56 -06:00  [1]  Progress message: ''.
    11/20/2014 19:42:56 -06:00  [1]  Progress bar visibility changed to 'Hidden'.
    11/20/2014 19:43:01 -06:00  [1]  Value of 'VirtualMachine.DNSName' = 'SBS01.domain.local'
    11/20/2014 19:43:01 -06:00  [1]  Moving Forward from the 'Virtual Machines' page.
    11/20/2014 19:43:01 -06:00  [1]  Navigating to the 'Connection' page.
    11/20/2014 19:43:32 -06:00  [1]  Value of 'MachineName' = 'SBS01.domain.local'
    11/20/2014 19:43:32 -06:00  [1]  Value of 'UseSessionCredentials' = 'False'
    11/20/2014 19:43:32 -06:00  [1]  Pressing Next on the 'Connection' page.
    11/20/2014 19:43:32 -06:00  [1]  Displaying busy cursor.
    11/20/2014 19:43:32 -06:00  [1]  Progress bar visibility changed to 'Visible'.
    11/20/2014 19:43:32 -06:00  [1]  Progress message: 'Validating the credentials'.
    11/20/2014 19:43:32 -06:00  [6]  Background worker thread started.
    11/20/2014 19:43:32 -06:00  [6]  VERBOSE:
    Hyper-V server (192.168.168.5) supports VHDX: True.
    11/20/2014 19:43:32 -06:00  [1]  Background task is complete.
    11/20/2014 19:43:32 -06:00  [1]  Displaying normal cursor.
    11/20/2014 19:43:32 -06:00  [1]  Progress message: ''.
    11/20/2014 19:43:32 -06:00  [1]  Progress bar visibility changed to 'Hidden'.
    11/20/2014 19:43:32 -06:00  [1]  Moving Forward from the 'Connection' page.
    11/20/2014 19:43:32 -06:00  [1]  Navigating to the 'Workspace' page.
    11/20/2014 19:43:56 -06:00  [1]  Value of 'WorkspacePath' = 'E:\Hyper-V\Virtual Hard Disks'
    11/20/2014 19:43:56 -06:00  [1]  Moving Forward from the 'Workspace' page.
    11/20/2014 19:43:56 -06:00  [1]  Navigating to the 'Summary' page.
    11/20/2014 19:43:56 -06:00  [1]  Progress message: 'Verifying if conversion can proceed based on inputs'.
    11/20/2014 19:43:56 -06:00  [1]  Progress bar visibility changed to 'Visible'.
    11/20/2014 19:43:56 -06:00  [7]  Background worker thread started.
    11/20/2014 19:43:57 -06:00  [1]  Background task is complete.
    11/20/2014 19:43:57 -06:00  [1]  Value of 'SummaryPageConversionWarnings' = 'Warning(s):
    1: The number of USB devices configured on the VMware guest machine is 1. The USB devices will be ignored on the converted machine.
    2: The video memory configured on the VMware guest machine is greater than 4 MB. The video memory will be limited to 4 MB on the converted machine.
    11/20/2014 19:43:57 -06:00  [1]  Progress message: ''.
    11/20/2014 19:43:57 -06:00  [1]  Progress bar visibility changed to 'Hidden'.
    11/20/2014 19:44:07 -06:00  [1]  Moving Forward from the 'Summary' page.
    11/20/2014 19:44:07 -06:00  [1]  Navigating to the 'Completion' page.
    11/20/2014 19:44:07 -06:00  [3]  Background worker thread started.
    11/20/2014 19:44:08 -06:00  [3]  VERBOSE:
    Evaluating Machine conversion request:
     Machine Conversion Request Received:
      Source Host:                        https://192.168.168.48/sdk
      Guest Virtual Machine:              SBS01.domain.local   Use Windows user account = False
      Destination Host:                   192.168.168.5   Use Windows user account = True
      Destination VHD path:               \\192.168.168.5\SBS01   Use Windows User account = True
      Destination VHD Type:               FixedHardDisk
      Destination VHD Format:             Vhdx
      Final Source VM Power state:        On
      Final Destination VM Power state:   Off
      Copy OVF File:                      False
      Guest VM ID:                        3
      Leave Tools Installed:              False
      Requested Provisioning:             HyperV
    11/20/2014 19:44:08 -06:00  [3]  VERBOSE:
    VM SBS01 has Scsi device 0:0 - disk-0.vmdk
    11/20/2014 19:44:08 -06:00  [3]  VERBOSE:
    Destination operating system information:
      Operating System Name: Microsoft Windows Server 2012 R2 Standard
      Version:               6.3.9600
      Service Pack:          Service Pack 0,0
      CIMOS Type:            18
    11/20/2014 19:44:08 -06:00  [3]  VERBOSE:
    Mvmc.Gui, Version=3.1.0.0, Culture=neutral, PublicKeyToken=null
    11/20/2014 19:44:08 -06:00  [3]  VERBOSE:
    Machine Conversion Request Received:
      Source Host:                        https://192.168.168.48/sdk
      Guest Virtual Machine:              SBS01.domain.local   Use Windows user account = False
      Destination Host:                   192.168.168.5   Use Windows user account = True
      Destination VHD path:               \\192.168.168.5\SBS01   Use Windows User account = True
      Destination VHD Type:               FixedHardDisk
      Destination VHD Format:             Vhdx
      Final Source VM Power state:        On
      Final Destination VM Power state:   Off
      Copy OVF File:                      False
      Guest VM ID:                        3
      Leave Tools Installed:              False
      Requested Provisioning:             HyperV
    11/20/2014 19:44:08 -06:00  [3]  VERBOSE:
    Connecting to source host.
    11/20/2014 19:44:08 -06:00  [3]  VERBOSE:
    Querying destination Hyper-V Host OS.
    11/20/2014 19:44:08 -06:00  [3]  VERBOSE:
    Destination operating system information:
      Operating System Name: Microsoft Windows Server 2012 R2 Standard
      Version:               6.3.9600
      Service Pack:          Service Pack 0,0
      CIMOS Type:            18
    11/20/2014 19:44:09 -06:00  [3]  VERBOSE:
    Querying source virtual machine
    11/20/2014 19:44:09 -06:00  [3]  VERBOSE:
    VM SBS01 has Scsi device 0:0 - disk-0.vmdk
    11/20/2014 19:44:09 -06:00  [3]  VERBOSE:
    Guest VMware information:
      VM Name:         SBS01
      Host:            SBS01.domain.local
      Tools Installed: True
      Guest OS:        Microsoft Windows Server 2008 R2 (64-bit)
      GuestId:         windows7Server64Guest
      Memory (bytes):  8589934592
      Processors:      4
      Network Cards:   1
      Disks:           1
    11/20/2014 19:44:19 -06:00  [3]  VERBOSE:
    This conversion will proceed on-line.
    11/20/2014 19:44:19 -06:00  [3]  VERBOSE:
    Creating snapshot of the source virtual machine
    11/20/2014 19:48:58 -06:00  [3]  VERBOSE:
    Preparing source virtual machine
    11/20/2014 19:48:58 -06:00  [3]  VERBOSE:
    Preparing source virtual machine
    11/20/2014 19:48:58 -06:00  [3]  VERBOSE:
    Finished creating snapshot of the source virtual machine
    11/20/2014 19:49:08 -06:00  [3]  VERBOSE:
    Querying source virtual machine OS.
    11/20/2014 19:49:09 -06:00  [3]  VERBOSE:
    Guest operating system information:
      Operating System Name: Microsoft Windows® Small Business Server 2011 Standard 
      Version:               6.1.7601
      Service Pack:          Service Pack 1,0
      CIMOS Type:            18
    11/20/2014 19:49:09 -06:00  [3]  VERBOSE:
    Uninstall VMware Tools and shutdown Request Received:
      Guest Virtual Machine:        SBS01.DAKMONDMN.local   Use Windows user account = False
      System32 directory:          C:\Windows\system32
    11/20/2014 19:50:01 -06:00  [3]  VERBOSE:
    Downloading VMware virtual disks from source virtual machine
    11/20/2014 19:50:01 -06:00  [3]  VERBOSE:
    Downloading device (/3/VirtualLsiLogicSASController0:0) disk-0.vmdk
    11/20/2014 19:50:01 -06:00  [3]  VERBOSE:
    Initializing (E:\Hyper-V\Virtual Hard Disks\MVMC\0\disk-0.vhdx) with a size of 644245094400 with preallocate true.
    11/20/2014 20:28:10 -06:00  [3]  VERBOSE:
    End of initializing (E:\Hyper-V\Virtual Hard Disks\MVMC\0\disk-0.vhdx).
    11/20/2014 20:28:35 -06:00  [3]  VERBOSE:
    System.Net.WebException: The request was aborted: The connection was closed unexpectedly.
       at stsc
       at Microsoft.Accelerators.Mvmc.Engine.ForVMware.VirtualMachine.DownloadFiles(IDownloadAdapter downloadAdapter, String toPath, TaskContext context)
       at Microsoft.Accelerators.Mvmc.Engine.ServiceLayer.Internal.MachineConversionService.ConvertToDrives(IMachineConversionRequest machineConversionRequest, IPostProgress& provisionHyperVPhase, IVirtualMachine& sourceVM, TaskContext taskContext)
    11/20/2014 20:28:35 -06:00  [3]  VERBOSE:
    Restoration of the source virtual machine has been successfully completed. The source VMware VM is powered on.
    11/20/2014 20:28:35 -06:00  [3]  EXCEPTION:
    System.Net.WebException: The request was aborted: The connection was closed unexpectedly.
       at Microsoft.Accelerators.Mvmc.Engine.ForVMware.ExportLease.GetFiles(IDownloadAdapter adapter, String host, DirectoryInfo dirInfo, TaskContext taskContext)
       at Microsoft.Accelerators.Mvmc.Engine.ForVMware.VirtualMachine.DownloadFiles(IDownloadAdapter downloadAdapter, String toPath, TaskContext context)
       at Microsoft.Accelerators.Mvmc.Engine.ServiceLayer.Internal.MachineConversionService.ConvertToDrives(IMachineConversionRequest machineConversionRequest, IPostProgress& provisionHyperVPhase, IVirtualMachine& sourceVM, TaskContext taskContext)
       at Microsoft.Accelerators.Mvmc.Engine.ServiceLayer.Internal.MachineConversionService.ConvertToMachine(IMachineConversionRequest machineConversionRequest, TaskContext taskContext)
       at Microsoft.Accelerators.Mvmc.Engine.ServiceLayer.Internal.MachineConversionService.<>c__DisplayClass6.<ConvertToMachineAsync>b__5()
       at System.Threading.Tasks.Task`1.InnerInvoke()
       at System.Threading.Tasks.Task.Execute()
    11/20/2014 20:28:35 -06:00  [3]  Exception caught : System.Net.WebException: The request was aborted: The connection was closed unexpectedly.
       at Microsoft.Accelerators.Mvmc.Gui.Model.ConversionModel.ConvertGuestMachine()
       at Microsoft.Accelerators.Mvmc.Gui.ViewModels.Machine.MachineCompletionViewModel.OnWorkerDoWork()
    11/20/2014 20:28:35 -06:00  [1]  Background task is complete.
    11/20/2014 20:28:35 -06:00  [1]  Conversion error message is displayed.
    11/20/2014 20:28:35 -06:00  [1]  Value of 'ErrorMessage' = 'The request was aborted: The connection was closed unexpectedly.'

  • Unable to use Datasource.cfc in Admin API - The current user is not authorized to invoke this method

    Hi Everyone,
    I am having some issues accessing the methods in the datasource.cfc in the adminAPI.
    I can successfully load the administrator CFC and am told that I have successsfuly logged in;
    But when I try to subsequently load the datasource.cfc I get an error that the current user is unable to access the method.
    /* Create an Admin API object and call the login method */
                                                      var local = {};
                                                      local.adminObj = createObject("component", "cfide.adminapi.administrator");
                                                      /* Enter your password for the CF Admin */
      /* if you dump this - TRUE is returned */
                                                      local.adminObj.login(adminPassword="my_admin_user_password");
                                                      /* Create an object of datasource component */
                                                      local.dsnObj = createObject("component", "cfide.adminapi.datasource");
      writeDump(local.dsnObj.getDataSources());
    I tried creating separate admin users and passwords - yhinking that perhaps a revent hotfix had stopped the "admin" user from being allowed to use the adminAPI - but changing to a new adminuser yielded the same results.
    I could login to the admin API with the new username and passsword - but could not access the datasource.cfc after that.
    Here is the debug output from the error...
    The current user is not authorized to invoke this method.
    The error occurred in accessmanager.cfc: line 48
    Called from datasource.cfc: line 52
    Called from C:/inetpub/wwwroot/projectDir/trunk/Application.cfc: line 155
    Called from C:/inetpub/wwwroot/projectDir/trunk/Application.cfc: line 52
    Called from C:/inetpub/wwwroot/projectDir/trunk/Application.cfc: line 45
    Called from C:/inetpub/wwwroot/projectDir/trunk/Application.cfc: line 1
    -1 : Unable to display error's location in a CFML template.
    Resources:
    Check the ColdFusion documentation to verify that you are using the correct syntax.
    Search the Knowledge Base to find a solution to your problem.
    Browser 
    Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31
    Remote Address 
    127.0.0.1
    Referrer 
    Date/Time 
    22-Apr-13 01:09 PM
    Stack Trace
    at cfaccessmanager2ecfc974154242$funcCHECKADMINROLES.runFunction(E:/cf10_final/cfusion/wwwro ot/CFIDE/adminapi/accessmanager.cfc:48) at cfdatasource2ecfc1679861966$funcGETDATASOURCES.runFunction(E:/cf10_final/cfusion/wwwroot/ CFIDE/adminapi/datasource.cfc:52) at cfApplication2ecfc498167235$funcPREREQUISITESTART.runFunction(C:/inetpub/wwwroot/projectD ir/trunk/Application.cfc:155) at cfApplication2ecfc498167235$funcINIT.runFunction(C:/inetpub/wwwroot/projectDir/trunk/Appl ication.cfc:52) at cfApplication2ecfc498167235._factor5(C:/inetpub/wwwroot/projectDir/trunk/Application.cfc: 45) at cfApplication2ecfc498167235.runPage(C:/inetpub/wwwroot/projectDir/trunk/Application.cfc:1 )
    coldfusion.runtime.CustomException: The current user is not authorized to invoke this method. at coldfusion.tagext.lang.ThrowTag.doStartTag(ThrowTag.java:142) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2799) at cfaccessmanager2ecfc974154242$funcCHECKADMINROLES.runFunction(E:\cf10_final\cfusion\wwwroot\CFIDE\adminapi\accessmanager.cfc:48) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:655) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:444) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:414) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2432) at cfdatasource2ecfc1679861966$funcGETDATASOURCES.runFunction(E:\cf10_final\cfusion\wwwroot\CFIDE\adminapi\datasource.cfc:52) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:655) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:444) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:414) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2432) at cfApplication2ecfc498167235$funcPREREQUISITESTART.runFunction(C:\inetpub\wwwroot\projectDir\trunk\Application.cfc:155) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2659) at cfApplication2ecfc498167235$funcINIT.runFunction(C:\inetpub\wwwroot\projectDir\trunk\Application.cfc:52) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2659) at cfApplication2ecfc498167235._factor5(C:\inetpub\wwwroot\projectDir\trunk\Application.cfc:45) at cfApplication2ecfc498167235.runPage(C:\inetpub\wwwroot\projectDir\trunk\Application.cfc:1) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:244) at coldfusion.runtime.TemplateProxyFactory.resolveComponentHelper(TemplateProxyFactory.java:538) at coldfusion.runtime.TemplateProxyFactory.resolveName(TemplateProxyFactory.java:234) at coldfusion.runtime.TemplateProxyFactory.resolveName(TemplateProxyFactory.java:159) at coldfusion.runtime.TemplateProxyFactory.resolveFile(TemplateProxyFactory.java:120) at coldfusion.cfc.CFCProxy.<init>(CFCProxy.java:138) at coldfusion.cfc.CFCProxy.<init>(CFCProxy.java:84) at coldfusion.runtime.AppEventInvoker.<init>(AppEventInvoker.java:64) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:232) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:112) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94) at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:79) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62) at coldfusion.CfmServlet.service(CfmServlet.java:219) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:414) at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:204) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)
    And here is the listed exceptions, beneath the stack trace;
    13:09:56.056 - cfadminapiSecurityError Exception - in E:/cf10_final/cfusion/wwwroot/CFIDE/adminapi/accessmanager.cfc : line 48
             The current user is not authorized to invoke this method.
    13:09:56.056 - cfadminapiSecurityError Exception - in E:/cf10_final/cfusion/wwwroot/CFIDE/adminapi/accessmanager.cfc : line 48
             The current user is not authorized to invoke this method.
    13:09:56.056 - java.io.FileNotFoundException - in C:/ColdFusion10/cfusion/wwwroot/WEB-INF/exception/errorcontext.cfm : line 44
             E:/cf10_final/cfusion/wwwroot/CFIDE/adminapi/accessmanager.cfc (The system cannot find the path specified)
    This perspn seems to be having the same issue;
    http://forums.adobe.com/message/5051892
    and I agree I don't have "E" drive either!

    I've found a solution to my plight - I don't know if it'll work for you or help you try something that MAY fix it.
    I use a common code set which includes the Application.cfc from a CF Mapping - So, in the application.cfc in the actual website I do this:-
    <cfinclude template="/UberDirectory/Application.cfc">
    Then, in the /UberDirectory/Application.cfc, I was initialising a CFC which checks if the datasource was created for the website. The datasource checking code attempts to log into the Admin API and check & create if necessary the datasource.
    This has previously worked without fail for me - But in this instance it failed!! I was doing two things wrong - Firstly, the CFC should only be called in the Application.cfc in the onRequestStart section as the Application had to be initialised first - This is maybe because I've invoked the application.cfc in a "non-standard" manner.
    Secondly, once I'd moved the CFC invocation into oNRequestStart I saw the following error:-
    The string COOKIE.CFAUTHORIZATION_uber-directory is not a valid ColdFusion variable name.
    I had this as the app name .... <cfset this.name = 'uber-directory'>
    Changedthe dash to an underscore and I was away and could once again check the datasources
    Hope it helps
    Martin

  • I am trying to have some LabVIEW code called in a New thread exit when the testStand sequence terminates

    I have a Sequence that launches a sequence in a New Thread that happens to launch some LabVIEW code.  The problem is when the LabVIEW code finishes, it will not close even when the TestStand sequence terminates. Is there a way to tell this LabVIEW code to Exit, I've tried the Quit LabVIEW function, but that causes a C++ RunTime Error.  The LabVIEW code does end though, and it is set in the VI properties to:
    Checked - Show Front Panel When Called
    Checked - Close Afterwardds if originally closed
    The sequence call that the LabVIEW code is launched from has the following options:
    - New Thread
    Unchecked - Automatically wait for the thread to complete at the end of the current sequence
    Unchecked - Initially Suspended
    Unchecked - Use single threaded apartment
    Any clues on this would be appreciated.

    Hi ADL,
    Everything should close correctly if you check the checkbox "Automatically wait for the thread to complete at the end of the current sequence" in the thread settings.
    With it unchecked, I am seeing the behavior you are. 
    Gavin Fox
    Systems Software
    National Instruments

  • I am trying to pay my bill online.  However, when I click the "submit" key, it tells me my "nickname" is incorrect.  What the heck is a nickname?  I have never had this trouble before.

    I am trying to pay my bill online.  However, when I click the "submit" key, it tells me my "nickname" is incorrect.  What the heck is a nickname?  I have never had this trouble before.

    Had the same problem. Here's how I sorted it out, not including yelling at my PC or ranting in my own thread (that's optional): First you want to delete your saved payment option. If you try this and it does not delete, log out and back in. It should be gone. Now re-enter your payment option (credit card number or whatever you are using) and if it asks if you want to save the data for future use, make sure you give it a nickname that doesn't include any special characters. Hope this works for you!

  • BackupVirtualDeviceFile::RequestDurableMedia: Flush failure on backup device 'CA_BAB_MSSQL_e85860_10001_2085d987_ERP_DATABASE_ST_1'. Operating system error 995(The I/O operation has been aborted because of either a thread exit or an application reque

    hello,
    i getting the following error message in event id while backing up my SQL db by third party backing tool
    BackupVirtualDeviceFile::RequestDurableMedia: Flush failure on backup device 'CA_BAB_MSSQL_e85860_10001_2085d987_ERP_DATABASE_ST_1'. Operating system error 995(The I/O operation has been aborted because of either a thread exit or an application request.).
      <Data>995(The I/O operation has been aborted because of either a thread exit or an application request.)
    please suggest the solution.

    Hi pulkit,
    According to your description, the actual error could be caused by but not limited to the following issues: Memory issues, Third Party issues, or SQL Server issues and so on. However, as shanky post, if you use an external or third party backup tool like
    NetBackup, BackupExec, or one of the many other tools available for backing up SQL Server databases without having to write your own backup scripts, and the error occurs. You need to check if there are some issues about your VDI or SQLVDI.DLL. Meanwhile,
    you also need to troubleshooting Memory Issue or the third tool issue. For more information about troubleshooting the error 995 when backing up database via the third party tool. You can review the following blog.
    https://support.software.dell.com/kb/SOL14674
    In addition, the error may include additional text from the operating system indicating that the disk is full. When performing a backup or restore operation with third-party backup software an additional message may occur indicating that the backup failed.
    Perform the following tasks as appropriate:
     1. Review the underlying system error messages and SQL Server error messages preceding this one to identify the cause of the failure.
     2. Ensure that the backup and restore medium has sufficient space.
     3. Correct any errors raised by third-party backup and restore software.
    There is also detail about backing up database via T-SQL statement /GUI, you can review the following article.
    http://technet.microsoft.com/en-us/library/ms187510.aspx
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • ITunes fails to load.  Message is Service Apple Mobile Device failed to start. Verify you have sufficient privileges to start system services. Never had this problem before trying to install this upgrade

    iTunes fails to load.  Message is "Service Apple Mobile Device failed to start. Verify you have sufficient privileges to start system services." Never had this problem before trying to install this upgrade. How do I fix this?

    Dave, same problem here.  And I did go in as admin to Administrative Tools, Services, Apple Mobile Devices and tried restarting the service.  It seems there is a bug with the newest update, period.  All of the normal "easy" steps don't work.  Before I remove all of Apple's programs, including Bonjour....I'm running a full system scan.
    But the answer will be to remove all of the Apple stuff, then reboot, then use whatever utility you have to remove all temp files...then go download and install it again.  This has worked for several people (I read the thread before posting).  Win 7 64bit.  It just seems that Apple did not thoroughly test this new version.   Period.
    If Apple reads this...I have many computers...and whenever Apple wants to update something...it just about stops everything else that is going on.  Total memory hog, even with 16G RAM and dual quad core processors.  It has to learn to play nice with others.
    After the scan and I'm sure an hour or two of work...I'll re-post. 
    Of course if you do image back-ups, as I do, you can simply restore your drive to its previous state and run the previous version of iTunes, declining the update, until Apple gets it right.  Depending on the size of your drive, this could take hours.  It is a matter of choice, of course.

  • I asked this question before but I can't find it now. Anyway, I'm trying to import a DVD video that was made on a MAC and use it on a new iMovie project.

    I asked this question before but I can't find it now. Anyway, I'm trying to import a DVD video that was made on a MAC and use it on a new iMovie project.
    How do I do the importing.

    If the video is already on a DVD:
    You need to convert the VOB files in the TS-Folder of the DVD back to DV which iMovie is designed to handle. For that you need mpegStreamclip:
    http://www.squared5.com/svideo/mpeg-streamclip-mac.html
    which is free, but you must also have the  Apple mpeg2 plugin :
    http://store.apple.com/us/product/D2187Z/A/quicktime-mpeg-2-playback-component-f or-mac-os-x
    (unless you are running Lion in which case see below))
    which is a mere $20.
    Another possibility is to use DVDxDV:
    http://www.dvdxdv.com/NewFolderLookSite/Products/DVDxDV.overview.htm
    which costs $25.
    For the benefit of others who may read this thread:
    Obviously the foregoing only applies to DVDs you have made yourself, or other home-made DVDs that have been given to you. It will NOT work on copy-protected commercial DVDs, which in any case would be illegal.
    And from the TOU of these forums:
    Keep within the Law
    No material may be submitted that is intended to promote or commit an illegal act.
    Do not submit software or descriptions of processes that break or otherwise ‘work around’ digital rights management software or hardware. This includes conversations about ‘ripping’ DVDs or working around FairPlay software used on the iTunes Store.
    If you are running Lion:
    From the MPEG Streamclip homepage
    The installer of the MPEG-2 Playback Component may refuse to install the component in Lion. Apple states the component is unnecessary in Lion, however MPEG Streamclip still needs it. See this:
    http://support.apple.com/kb/HT3381
    To install the component in Lion, please download MPEG Streamclip 1.9.3b7 beta above; inside the disk image you will find the Utility MPEG2 Component Lion: use it to install the MPEG-2 Playback Component in Lion. The original installer's disk image (QuickTimeMPEG2.dmg) is required.
    The current versions of MPEG Streamclip cannot take advantage of the built-in MPEG-2 functionality of Lion. For MPEG-2 files you still need to install the QuickTime MPEG-2 Playback Component, which is not preinstalled in Lion. You don't have to install QuickTime 7.

  • Hi i have asked for this help before and it was fixed but cant remember how to do it My ipad has lost sound in certain apps and general typing i remember fixing it through the settings can any one please help it not the mute

    Hi I have had this problem before butr cant remember how to fix it . What has happened is certain apps have no sound where as others do I also have no sound when typing.I remember when i last asked for help with this problem it was done through settings. It not on mute Please help me.

    You can enable keyboard sounds via Settings > General > Sounds . If they are enabled but you can't hear them then have you checked that you haven't got notifications muted (which will also affect most apps) ?
    Depending on what you've got Settings > General > Use Side Switch To set to (mute or rotation lock), then you can mute notifications by the switch on the right hand side of the iPad, or via the taskbar : double-click the home button; slide from the left; and it's the icon far left; press home again to exit the taskbar. The function that isn't on the side switch is set via the taskbar instead : http://support.apple.com/kb/HT4085

Maybe you are looking for