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 84376 - [55cat] Errors trying to save a new created diagram
Summary: [55cat] Errors trying to save a new created diagram
Status: VERIFIED FIXED
Alias: None
Product: uml
Classification: Unclassified
Component: General (show other bugs)
Version: 5.x
Hardware: PC All
: P2 blocker (vote)
Assignee: Thuy.d Nguyen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-06 21:47 UTC by brviking
Modified: 2007-02-01 11:35 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
exception occured on save (108.97 KB, text/plain)
2006-09-06 21:49 UTC, brviking
Details

Note You need to log in before you can comment on or make changes to this bug.
Description brviking 2006-09-06 21:47:50 UTC
[ BUILD # : 200609050000 ]
[ JDK VERSION : 1.6 ]

Error occured, exception thrown.
UseCase Diagram is named "Sales: salesmann view".
Relevant portion for session log is attached.
Comment 1 brviking 2006-09-06 21:49:13 UTC
Created attachment 33655 [details]
exception occured on save
Comment 2 brviking 2006-09-06 22:01:51 UTC
Worse, diagram is lost.
Comment 3 Kris Richards 2007-01-04 22:18:24 UTC
Please add a "how to reproduce" comment.
Comment 4 Yang Su 2007-01-05 01:19:53 UTC
This is caused by the illegal diagram name, it cannot contain certain characters
e.g colon, as used in this case.

Diagram creation wizard should implement name validation logic to prevent such
errors.
Comment 5 Peter Lam 2007-01-05 17:38:31 UTC
Repro steps:
- create a uml project
- create use case diagram and name it "Sales: salesmann view" 
Result: the diagram name is renamed by the tool to "Sales_salesmann view" on
both the project tree and the diagram window tab
- create a couple of use cases and links on the diagram
Result: the diagram is dirty as indicated with "*" on the diagram window tab but
the save option is not enabled for saving the diagram. Ctrl-S also does nothing
at all.
- close the diagram
Result: the save diagram dialog pops up
- select Yes from the dialog to save the diagram
Result: the diagram is closed and the the diagram on the project tree under the
Model node is now displayed without diagram name, only usecase diagram icon is
now being displayed but can't be opened. Looking at the ide log, exception
"java.lang.IllegalArgumentException: null [file:..." like the ones in the
attachement exist. Restarting ide shows no more trace of this usecase diagram on
the project tree.

This problem is not specific to jdk 1.6 since it also exists using jdk 1.5, I
removed the keyword JDK1.6.
Comment 6 pmillssc 2007-01-24 20:35:51 UTC
I encountered a related symptom by naming a diagram "Client/Server Overview". 
NetBeans did reasonable things to transform the name, but on reopening the
project, this diagram was not found.  I investigated and, since this was Linux,
discovered that there was a "Client" subdirectory under my project that
contained my "Server Overview" diagram.  Moving the two files into their parent
directory and renaming seems to have recovered things OK.
Comment 7 Thuy.d Nguyen 2007-01-28 00:39:50 UTC
Error message is now displayed at the bottom of the wizard to inform  users of
invalid characters that must not be included in a diagram name.  Until the users
correct the error, the Finish button remains disabled.
Comment 8 Andrew Korostelev 2007-01-31 16:16:17 UTC
verified in all-nbms-griffin-070130_5

uml uses several different approaches to prevent incorrect names.
sometimes the are different for the same element named from e.g. tree,
properties and diagram.

This issue suggest for ':', '|', '\' etc characters different way then used for
e.g. '@'.
But current problem is solved.
Related issues will be filed separately...
Comment 9 Andrew Korostelev 2007-02-01 11:35:14 UTC
issues filed as a result of this fix:
issue 93780 - diagram creation wizard uses different ways to handle incorrect
symbols
issue 93782 - incorrect symbols are handled differently during diagram creation
and later