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 18033 - Add to project fires DataObjectNotFoundException
Summary: Add to project fires DataObjectNotFoundException
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Data Systems (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P1 blocker (vote)
Assignee: Vitezslav Stejskal
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-11-23 13:07 UTC by Jaromir Uhrik
Modified: 2008-12-22 15:59 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaromir Uhrik 2001-11-23 13:07:42 UTC
[#200111230645; last jdk14]
The fastest way to reproduce
1.Add the keyboard shortcut to the "Add to project" action
2.Select some data objects in the explorer and press repeatedly the shortcut 
for this "Add to project" action
3.The exception bellow will appear

Fri Nov 23 13:57:02 CET 2001: org.openide.loaders.DataObjectNotFoundException: 
Projects/Default/Files/ClockFrame_16.shadow
Annotation: Projects/Default/Files/ClockFrame_16.shadow
Annotation: class org.openide.loaders.BrokenDataShadow
org.openide.loaders.DataObjectNotFoundException: 
Projects/Default/Files/ClockFrame_16.shadow
        at org.openide.loaders.DataShadow$1.run(DataShadow.java:259)
        at org.openide.filesystems.EventControl.runAtomicAction
(EventControl.java:89)
        at org.openide.filesystems.FileSystem.runAtomicAction
(FileSystem.java:388)
        at org.openide.loaders.DataShadow.create(DataShadow.java:240)
        at org.openide.loaders.DataShadow.create(DataShadow.java:206)
        at org.openide.loaders.DataObject.handleCreateShadow
(DataObject.java:619)
        at org.openide.loaders.DataObject$5.run(DataObject.java:634)
        at org.openide.filesystems.EventControl.runAtomicAction
(EventControl.java:89)
        at org.openide.filesystems.FileSystem.runAtomicAction
(FileSystem.java:388)
        at org.openide.loaders.DataObject.createShadow(DataObject.java:632)
        at org.netbeans.modules.projects.ProjectDataObject.add
(ProjectDataObject.java:195)
        at org.netbeans.modules.projects.AddToProjectAction.performAction
(AddToProjectAction.java:101)
        at org.openide.util.actions.NodeAction.performAction
(NodeAction.java:180)
        at org.openide.util.actions.NodeAction.actionPerformed
(NodeAction.java:171)
        at org.netbeans.core.ModuleActions$1.run(ModuleActions.java:105)
        at org.openide.util.Task.run(Task.java:152)
[catch] at org.openide.util.RequestProcessor$ProcessorThread.run
(RequestProcessor.java:622)
Comment 1 Milan Kubec 2001-11-23 13:29:15 UTC
Increasing priority. Easy reproducible on linux, regardless JDK
version. Also it's not needed to add the same group multiple times.
Happens only if you try to add multiple selection (more selected
nodes) to project. Hesitating to mark as P1. The result of this are
broken links in Project tab.
Comment 2 Milan Kubec 2001-11-23 15:03:37 UTC
Increasing priority to P1. 
Comment 3 Vitezslav Stejskal 2001-11-23 19:38:46 UTC
It's caused by the fact that DataShadow doesn't sync access to .shadow file. Even if the creation and 
record of file run in FS.atomicAction it doesn't prevent FolderList running in Folder recognizer thread 
to scan parent folder of .shadow file. Events sequence would be:

1. create more than one DataShadow in one folder (creation of each of them runs in atomicAction)
2. when the first DS is created (atomicAction is left), FolderList starts folder scanning
3. next DS' are created in parallel with folder recognition process, which very likely causes 
uncompletely written .shadow file to be read and BrokenDataShadow produced
Comment 4 Vitezslav Stejskal 2001-11-26 11:18:17 UTC
working on
Comment 5 Vitezslav Stejskal 2001-11-26 14:09:52 UTC
I've synchronized access to .shadow files in DataShadow's read and writeOriginal methods. Conflict 
between Folder recognizer and DataShadow.create caller threads should not occure anymore.

Fixed in release33, release33_beta6 branches.
Comment 6 Vitezslav Stejskal 2001-11-26 14:12:03 UTC
Marking as 3.3.0_CANDIDATE.
Comment 7 Jan Zajicek 2001-11-28 11:07:25 UTC
Verified in dev #200111271845.
Comment 8 DavidPenney 2001-11-29 14:27:52 UTC
This is still a problem under VMS.

Please give us some time to investigate. Thanks.

David Penney
Compaq Computer Corporation
Comment 9 Vitezslav Stejskal 2001-11-29 15:39:05 UTC
David, OpenVMS problems could be related to issue #16401, please look at it as well. Actually the effort 
on #16401 is frozen due to lack of time on my side, but my suspition is that there is a problem with file 
names either in our filesystems API or in JDK for VMS. I could prepare another patch solving 16401 and 
this one, but it would be a workaround which wouldn't solve real cause of the problem. Thanks!
Comment 10 DavidPenney 2001-11-29 15:53:40 UTC
Upon investigation (for the issue still being a problem under VMS), 
we discovered that this was an error on our part - we were getting 
the wrong development stream. Apologies for any confusion this may 
have caused.

I have changed the issue back to fixed.

Vitezslav Stejskal: Thank you for your speedy reply and suggestion.

David Penney
Compaq Computer Corporation
Comment 11 Jan Zajicek 2001-11-30 09:21:26 UTC
Making as verified.
Comment 12 Quality Engineering 2003-07-01 16:22:32 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.