This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 147164 - opening new NB 6.1 diagrams throws SyncFailedException
Summary: opening new NB 6.1 diagrams throws SyncFailedException
Status: VERIFIED FIXED
Alias: None
Product: uml
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Sergey Petrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-13 01:54 UTC by Peter Lam
Modified: 2008-09-18 19:09 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
ide log file (56.92 KB, text/plain)
2008-09-13 01:55 UTC, Peter Lam
Details
ide log file (41.33 KB, text/plain)
2008-09-18 08:21 UTC, Peter Lam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Lam 2008-09-13 01:54:35 UTC
build 20080912. see attached ide log file for complete exception.

- create uml project in 6.1 with all 7 types diagram, each diagram with some number of elements and relationships
- open project in 6.5 and convert all supported diagrams
- close project in 6.5
- copy all diagrams from backup directoy to one level up
- open project in 6.1
- open all 6.5 supported diagram and add a new element in each diagram, save all and close project in 6.1
- open project in 6.5 and open the 6.1 modified diagram and got SyncFailedException popped up 

java.io.SyncFailedException:
C:\Users\peter\Documents\NetBeansProjects\Reporting-Projects\UMLProject-NB61-JavaPlatform\DiagramBackup\Class Diagram
1_1211923392990.etld
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj.createData(FolderObj.java:275)
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj.createDataImpl(FolderObj.java:233)
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj$1.call(FolderObj.java:203)
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj$1.call(FolderObj.java:202)
	at org.netbeans.modules.masterfs.filebasedfs.FileBasedFileSystem.runAsInconsistent(FileBasedFileSystem.java:112)
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj.createData(FolderObj.java:206)
	at org.openide.filesystems.FileUtil.copyFileImpl(FileUtil.java:366)
...
Comment 1 Peter Lam 2008-09-13 01:55:03 UTC
Created attachment 69793 [details]
ide log file
Comment 2 Peter Lam 2008-09-13 02:00:26 UTC
the diagrams that are modified in 6.1 are not displayed in the Diagrams node in 6.5, but they are in the Models node
with the 6.1 badge. After reconverting to 6.5 on the 6.1 modified diagram, the original 6.1 diagram nodes are still
displayed along with the newly converted 6.5 diagram nodes, plus the previously converted 6.5 diagram nodes. So, there
are 3 diagram nodes being displayed. Diagrams seem to convert fine though since I could see the new element added from 6.1.
Comment 3 Sergey Petrov 2008-09-13 09:53:15 UTC

*** This issue has been marked as a duplicate of 131857 ***
Comment 4 George Vasick 2008-09-15 19:52:46 UTC
Sergey,

Is this really a dup of issue 131857?

We still need to implement a dialog that allows the user to choose whether to re import a diagram from 6.1 or retain the
existing 6.5 version.


Thanks,
George
Comment 5 Sergey Petrov 2008-09-15 20:04:43 UTC
as it was filed it's a duplicate.
but it can be updated accordingly if fix provided in #131857 is not enough and we need some special handling.
//
may be this issue contain several issues which need to be separated, and first one is synch failed was fixed.
please update what need to be fixed more.
Comment 6 Sergey Petrov 2008-09-15 20:45:42 UTC
seems got it, it's not a duplicate or wasn't fixed by http://hg.netbeans.org/uml-main/rev/88786e2e48d0 integration.

as for reimporting it looks only as enhancement to provide additional dialog. creation of second 6.5 version may be only
a usability issue because it's not hard to delete extra one without any additional dialogs.

will fix synchfailedexception with overriding of previous backup, fix similar to integration above.
Comment 7 Sergey Petrov 2008-09-15 21:00:55 UTC
http://hg.netbeans.org/uml-main/rev/d6df207d7f04
SyncFailedException is fixed
Comment 8 George Vasick 2008-09-15 22:28:49 UTC
Your fix works great.

Thanks,
George
Comment 9 Trey Spiva 2008-09-16 18:27:44 UTC
Reviewed
Comment 10 Peter Lam 2008-09-18 08:21:04 UTC
verified in build 20080917. opening and converting the new Activity Diagram and new State Diagram popped up the
following NPE. See attached ide log file. Opening a new sequence diagram works but isn't it violating the single
sequence diagram per sequence diagram interaction rule?

java.lang.NullPointerException
	at
org.netbeans.modules.uml.drawingarea.persistence.LoadSubPartitionsProvider.perfomeAction(LoadSubPartitionsProvider.java:93)
	at org.netbeans.modules.uml.drawingarea.actions.AfterValidationExecutor.sceneValidated(AfterValidationExecutor.java:94)
	at org.netbeans.api.visual.widget.Scene.validate(Scene.java:420)
	at org.netbeans.api.visual.widget.SceneComponent.setBounds(SceneComponent.java:110)
	at javax.swing.OverlayLayout.layoutContainer(OverlayLayout.java:227)
	at java.awt.Container.layout(Container.java:1432)
	at java.awt.Container.doLayout(Container.java:1421)
	at java.awt.Container.validateTree(Container.java:1519)
	at java.awt.Container.validateTree(Container.java:1526)
	at java.awt.Container.validateTree(Container.java:1526)
	...
Comment 11 Peter Lam 2008-09-18 08:21:58 UTC
Created attachment 70076 [details]
ide log file
Comment 12 Sergey Petrov 2008-09-18 08:31:34 UTC
let this one be only about synch exception, I filed new p2 issue http://www.netbeans.org/issues/show_bug.cgi?id=147566
Comment 13 Peter Lam 2008-09-18 19:09:04 UTC
verified in build 20080917. Reopening nb 6.1 project doesn't show new 6.1 diagrams automatically. A manual refresh
(using the filter action) is necessary to get the new 6.1 diagrams to show up in the project tree.