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.
Summary: | NPE after attempt to undo file moving from one project to another. | ||
---|---|---|---|
Product: | xml | Reporter: | Michael Nazarov <michaelnazarov> |
Component: | Schema Tools | Assignee: | Sonali Kochar <sonali> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | hong_lin, tonybeckham |
Priority: | P1 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | Windows XP | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 113370 |
Description
Michael Nazarov
2007-08-27 14:36:58 UTC
Tony, I am trying to reproduce this bug and it seems to be working for me. Can you try and reproduce? Since its a p1, I would like to give it a thorough testing. I can reproduce this as described with this configuration: Product Version: NetBeans IDE Dev (Build 200708270201) Java: 1.6.0; Java HotSpot(TM) Client VM 1.6.0-b105 System: Linux version 2.6.20-16-generic running on i386; UTF-8; en_US (nb) I was actually seeing this while testing move refactoring but have not nailed down the exact steps so I have not filed the bug yet. java.lang.NullPointerException: Passed null to FileOwnerQuery.getOwner(FileObject) at org.netbeans.api.project.FileOwnerQuery.getOwner(FileOwnerQuery.java:72) at org.netbeans.modules.xml.refactoring.spi.SharedUtils.inSameProject(SharedUtils.java:830) at org.netbeans.modules.xml.refactoring.XMLRefactoringTransaction.updateTargetModelReferences(XMLRefactoringTransaction.java:749) at org.netbeans.modules.xml.refactoring.XMLRefactoringTransaction.undoRenameFile(XMLRefactoringTransaction.java:539) at org.netbeans.modules.xml.refactoring.XMLRefactoringTransaction.access$100(XMLRefactoringTransaction.java:72) at org.netbeans.modules.xml.refactoring.XMLRefactoringTransaction$GeneralChangeExecutor$FileRenameUndoable.undo(XMLRefactoringTransaction.java:834) at javax.swing.undo.UndoManager.undoTo(UndoManager.java:320) at javax.swing.undo.UndoManager.undo(UndoManager.java:398) at org.netbeans.modules.xml.refactoring.XMLRefactoringTransaction.rollback(XMLRefactoringTransaction.java:138) at org.netbeans.modules.refactoring.api.RefactoringSession.undoRefactoring(RefactoringSession.java:132) at org.netbeans.modules.refactoring.spi.impl.UndoManager$SessionUndoItem.undo(UndoManager.java:556) at org.netbeans.modules.refactoring.spi.impl.UndoManager.undo(UndoManager.java:192) at org.netbeans.modules.refactoring.spi.impl.UndoAction.performAction(UndoAction.java:74) at org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:96) at org.netbeans.modules.openide.util.ActionsBridge$ActionRunnable.actionPerformed(ActionsBridge.java:89) at org.netbeans.core.ModuleActions.invokeAction(ModuleActions.java:82) at org.netbeans.modules.openide.actions.ActionsBridgeImpl.invokeAction(ActionsBridgeImpl.java:30) at org.netbeans.modules.openide.util.ActionsBridge$ActionRunnable.doRun(ActionsBridge.java:80) at org.netbeans.modules.openide.util.ActionsBridge$1.run(ActionsBridge.java:49) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:539) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:964) I am using JDK1.5.0.12 on windows XP and dont see the bug.. Michael, whats ur configuration? I can reproduce this with both 1.5.0_12 ans 1.6.0_02 on Win XP. There are a lot of refactoring bugs happening now, maybe they all have a common cause. Michael, 1) Does BluePrint1 have project dependency on BPEL module? 2) In which project is purchaseOrder.xsd? newLoanApplication.xsd is in BPEL module, right? 3) Can you try and reproduce this bug with Refactor -> Move? or Does it happen only with DnD? thanks, Sonali I used JDK 1.6. I'm not sure we can call it "dependencies". It's "referencies". Yes, reference presents. purhaseOrder is part pf BluePrint1 sample and newLoanApplication added to BPEL Module. If Move feature used and correct target specified then move successfull but Undo produces exception. Not NPE BTW: javax.swing.undo.CannotUndoException at org.netbeans.editor.BaseDocumentEvent.undo(BaseDocumentEvent.java:265) at org.netbeans.editor.GuardedDocumentEvent.undo(GuardedDocumentEvent.java:47) at javax.swing.undo.CompoundEdit.undo(CompoundEdit.java:46) at javax.swing.undo.CompoundEdit.undo(CompoundEdit.java:46) at org.netbeans.modules.xml.xam.AbstractModel$ModelUndoableEdit.undo(AbstractModel.java:555) at javax.swing.undo.UndoManager.undoTo(UndoManager.java:320) at javax.swing.undo.UndoManager.undo(UndoManager.java:398) at org.netbeans.modules.xml.refactoring.XMLRefactoringTransaction.rollback(XMLRefactoringTransaction.java:144) at org.netbeans.modules.refactoring.api.RefactoringSession.undoRefactoring(RefactoringSession.java:132) at org.netbeans.modules.refactoring.spi.impl.UndoManager$SessionUndoItem.undo(UndoManager.java:556) at org.netbeans.modules.refactoring.spi.impl.UndoManager.undo(UndoManager.java:192) at org.netbeans.modules.refactoring.spi.impl.UndoAction.performAction(UndoAction.java:74) at org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:96) at org.netbeans.modules.openide.util.ActionsBridge$ActionRunnable.actionPerformed(ActionsBridge.java:89) at org.netbeans.core.ModuleActions.invokeAction(ModuleActions.java:82) at org.netbeans.modules.openide.actions.ActionsBridgeImpl.invokeAction(ActionsBridgeImpl.java:30) at org.netbeans.modules.openide.util.ActionsBridge$ActionRunnable.doRun(ActionsBridge.java:80) at org.netbeans.modules.openide.util.ActionsBridge$1.run(ActionsBridge.java:49) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:539) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:964) I updated my code and have been able to reproduce it. Working on it. Fixed the NPE. There is a separate bug filed for CannotUndoException (undo results in the same stack trace) http://www.netbeans.org/issues/show_bug.cgi?id=113714 Will fix the CannotUndoException as part of bug 113714 Product Version: NetBeans IDE Dev (Build 200709030000) NPE fixed. |