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 134064

Summary: NPE when model checks if reference is broken
Product: soa Reporter: Vladimir Yaroslavskiy <yaroslavskiy>
Component: XSLTAssignee: Vitaly Bychkov <lativ>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P1    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 113924, 117043    
Attachments: Test project

Description Vladimir Yaroslavskiy 2008-04-28 14:31:17 UTC
build >= 1766

1. Open attached project
2. Open is Source view xslt.xslt file
3. Press validate button, see exception:

java.lang.NullPointerException
    at org.netbeans.modules.xslt.model.impl.GlobalReferenceImpl.getQName(GlobalReferenceImpl.java:106)
    at org.netbeans.modules.xslt.model.impl.GlobalReferenceImpl.find(GlobalReferenceImpl.java:295)
    at org.netbeans.modules.xslt.model.impl.GlobalReferenceImpl.find(GlobalReferenceImpl.java:278)
    at org.netbeans.modules.xslt.model.impl.GlobalReferenceImpl.get(GlobalReferenceImpl.java:66)
    at org.netbeans.modules.xslt.model.impl.GlobalReferenceImpl.get(GlobalReferenceImpl.java:41)
    at org.netbeans.modules.xml.xam.AbstractReference.isBroken(AbstractReference.java:118)
    at org.netbeans.modules.xslt.validation.reference.Validator$1.checkReference(Validator.java:138)
    at org.netbeans.modules.xslt.validation.reference.Validator$1.visit(Validator.java:78)
    at org.netbeans.modules.xslt.model.impl.CallTemplateImpl.accept(CallTemplateImpl.java:52)
    at org.netbeans.modules.xslt.model.impl.StylesheetImpl.acceptChildren(StylesheetImpl.java:65)
    at org.netbeans.modules.xslt.model.impl.StylesheetImpl.acceptChildren(StylesheetImpl.java:66)
    at org.netbeans.modules.xslt.model.impl.StylesheetImpl.acceptChildren(StylesheetImpl.java:66)
    at org.netbeans.modules.xslt.model.impl.StylesheetImpl.acceptChildren(StylesheetImpl.java:66)
    at org.netbeans.modules.xslt.model.impl.StylesheetImpl.accept(StylesheetImpl.java:57)
    at org.netbeans.modules.xslt.validation.core.XsltValidator.validate(XsltValidator.java:83)
    at org.netbeans.modules.xml.xam.spi.Validation.validate(Validation.java:100)
    at
org.netbeans.modules.xml.validation.ValidationOutputWindowController.validate(ValidationOutputWindowController.java:85)
    at org.netbeans.modules.soa.validation.core.Controller.doValidation(Controller.java:156)
    at org.netbeans.modules.soa.validation.core.Controller.runValidation(Controller.java:113)
    at org.netbeans.modules.xslt.core.XSLTDataEditorSupport.validateXML(XSLTDataEditorSupport.java:334)
    at org.netbeans.modules.xml.tools.actions.ValidateAction$RunAction.run(ValidateAction.java:123)
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
Comment 1 Vladimir Yaroslavskiy 2008-04-28 14:34:08 UTC
Created attachment 60749 [details]
Test project
Comment 2 Vladimir Yaroslavskiy 2008-06-06 15:43:28 UTC
P2 -> P1: blocks umbrella issue
Comment 3 Vitaly Bychkov 2008-06-10 06:13:31 UTC
Fixed.

Changeset: 6763462bb651.
Comment 4 rpoon 2008-10-15 00:05:18 UTC
Verified with NetBeans 6.5 RC1 build (200810141115) under:
  http://smetiste.czech.sun.com/builds/netbeans/6.5/daily/latest/ (on 10/14/2008)
or:
  http://smetiste.czech.sun.com/builds/netbeans/6.5/daily/2008-10-14_11-15-16/
  
With this build, when validating the 'xslt.xslt' in the provided project, the NPE was no longer encountered.  Instead 
of the NPE, it is now able to detect that Referenced element is missing.  It now throws the following error:

   ERROR: Element "with-param" has reference to another element and this element can not be found .. ..