Microsoft KB Archive/194769

= BUG: Saving Form Designer Code Throws a ComFailException =

Article ID: 194769

Article Last Modified on 8/25/2005

-

APPLIES TO


 * Microsoft Visual J++ 6.0 Standard Edition

-



This article was previously published under Q194769



SYMPTOMS
Attempting to save a .java file that derives from com.ms.wfc.ui.Form sometimes throws a ComFailException.

The dialog box titled "Microsoft Development Environment" appears. The dialog box contains the following text:

"com.ms.wfc.core.WFCException: Unable to write to the form file. Check that you have sufficient disk space and that the file is not read-only. --> com.ms.com.ComFailException: (0x80004005) Unspecified error"



CAUSE
A code block is not terminated before the Visual J++ Form Designer code block starts.



RESOLUTION
Click OK on the dialog box and terminate the code block before attempting to save the .java file again.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.



Steps to Reproduce Behavior

 * 1) In Visual J++ version 6.0, go to the File menu, click New Project, select Visual J++ Projects, Applications, Windows Application, and click Open.
 * 2) In the Project Explorer window, click the plus sign beside the project name and double-click on Form1.java. This opens the Designer View of Form1.
 * 3) Double-click the gray area of Form1, which creates a Form1_click method in the code and switches to the code view of Form1.java.
 * 4) Delete the '}' at the end of the Form1_click method, creating an open block that doesn't terminate before the designer code begins.
 * 5) Press Ctl+S or go to the File menu and select Save to save Form1.java.

Outcome: ComFailException as stated above.

Expected: The Save should work fine.

