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 128340 - xdm faile to parse encoded character entities correctly
Summary: xdm faile to parse encoded character entities correctly
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: XDM (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Samaresh Panda
URL:
Keywords:
Depends on:
Blocks: 128638
  Show dependency tree
 
Reported: 2008-02-25 17:45 UTC by Tientien Li
Modified: 2008-08-01 18:08 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
XdmErrorCA project (10.10 KB, text/plain)
2008-02-25 17:48 UTC, Tientien Li
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tientien Li 2008-02-25 17:45:17 UTC
The xdm internally use insert/remove EntityReference reoutines to handle encoding of character entities in XML. For 
example, in CASA, the following element:

<link xlink:href="../jbiasa/SynchronousSample.wsdl#xpointer(/definitions/service[@name'service1']/port[@name'port1'])" 
xlink:type="simple"/>

is trnaslated and encoded as:

<link xlink:href="../jbiasa/SynchronousSample.wsdl#xpointer(/definitions/service[@name=&apos;service1&apos;]/port
[@name=&apos;port1&apos;])" xlink:type="simple"/>

However, there is a parsing error in XDM's xml parser which when reloading the encoded element produces incomplete 
value for the above attribute:

xlink:href="../jbiasa/SynchronousSample.wsdl#xpointer(/definitions/service[@name="

This problem is causing many SOA projects to fail. Please use the following step with the enclosed test project to 
reproduce this error:

- Load XdmErrorCA project
- Expand the project node
- Double click on Service Composition to open CASA
- In CASA, right click on "SOAP" of casaPort1 and select "properties" action
- In the properties window, change the Endpoint Name to "casaPort123" and hit CR
- An NPE is generated caused by the incorrect XDM attribute value returned
  (PS, Jun, we also need to improve the handling of NPE within CASA)

java.lang.NullPointerException
	at org.netbeans.modules.compapp.casaeditor.model.casa.CasaWrapperModel.setEndpointName
(CasaWrapperModel.java:2887)
	at org.netbeans.modules.compapp.casaeditor.model.casa.CasaWrapperModel.setEndpointName
(CasaWrapperModel.java:317)
	at org.netbeans.modules.compapp.casaeditor.properties.PropertyEndpointName.setValue
(PropertyEndpointName.java:88)
	at org.netbeans.modules.compapp.casaeditor.properties.PropertyEndpointName.setValue
(PropertyEndpointName.java:56)
	at org.openide.explorer.propertysheet.NodePropertyModel.setValue(NodePropertyModel.java:110)
	at org.openide.explorer.propertysheet.PropUtils.noDlgUpdateProp(PropUtils.java:561)
	at org.openide.explorer.propertysheet.PropUtils.updateProp(PropUtils.java:522)
	at org.openide.explorer.propertysheet.PropUtils.updateProp(PropUtils.java:634)
	at org.openide.explorer.propertysheet.SheetCellEditor.stopCellEditing(SheetCellEditor.java:374)
	at org.openide.explorer.propertysheet.SheetCellEditor.actionPerformed(SheetCellEditor.java:241)
	at javax.swing.JTextField.fireActionPerformed(JTextField.java:487)
	at javax.swing.JTextField.postActionEvent(JTextField.java:668)
	at javax.swing.JTextField$NotifyAction.actionPerformed(JTextField.java:783)
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1571)
	at javax.swing.JComponent.processKeyBinding(JComponent.java:2772)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2807)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2735)
	at java.awt.Component.processEvent(Component.java:5294)
	at java.awt.Container.processEvent(Container.java:1966)
	at java.awt.Component.dispatchEventImpl(Component.java:3984)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3819)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1826)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:681)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:938)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:810)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:645)
	at java.awt.Component.dispatchEventImpl(Component.java:3857)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Window.dispatchEventImpl(Window.java:1791)
	at java.awt.Component.dispatchEvent(Component.java:3819)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at org.netbeans.core.TimeableEventQueue.dispatchEvent(TimeableEventQueue.java:104)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 1 Tientien Li 2008-02-25 17:48:04 UTC
Created attachment 57213 [details]
XdmErrorCA project
Comment 2 Tientien Li 2008-02-25 18:18:28 UTC
When using earlier NB 6.1 builds (before #687), a different error is reported caused by the same attribute value 
problem:

java.lang.NullPointerException
	at org.netbeans.modules.compapp.casaeditor.model.casa.CasaWrapperModel.isWsitEnable(CasaWrapperModel.java:3473)
	at org.netbeans.modules.compapp.casaeditor.design.CasaModelGraphScene.attachNodeWidget
(CasaModelGraphScene.java:474)
	at org.netbeans.modules.compapp.casaeditor.design.CasaModelGraphScene.attachNodeWidget
(CasaModelGraphScene.java:123)
	at org.netbeans.modules.compapp.casaeditor.graph.CasaGraphAbstractScene.addNode
(CasaGraphAbstractScene.java:127)
	at org.netbeans.modules.compapp.casaeditor.design.CasaModelGraphUtilities.createNode
(CasaModelGraphUtilities.java:256)
	at org.netbeans.modules.compapp.casaeditor.design.CasaModelGraphUtilities.safeRenderModel
(CasaModelGraphUtilities.java:139)
	at org.netbeans.modules.compapp.casaeditor.design.CasaModelGraphUtilities.renderModel
(CasaModelGraphUtilities.java:99)
	at org.netbeans.modules.compapp.casaeditor.design.CasaDesignView.render(CasaDesignView.java:120)
	at org.netbeans.modules.compapp.casaeditor.multiview.CasaGraphMultiViewElement.addNotify
(CasaGraphMultiViewElement.java:102)
	at java.awt.Container.addImpl(Container.java:1052)
	at java.awt.Container.add(Container.java:899)
        ...
Comment 3 Sonali Kochar 2008-02-28 05:40:56 UTC
Fixed by Ayub
Comment 4 tonybeckham 2008-08-01 18:08:19 UTC
Fix Verified

Product Version: NetBeans IDE Dev (Build 200808010201)
Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-119
System: Mac OS X version 10.5.4 running on i386; MacRoman; en_US (nb)