Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.2
-
None
-
None
Description
when there's a carriage return either before or after the name then you get strange null pointer exceptions in the DeploymentWebservice code as it expects the Xml to be in a particular form and text-nodes in the DOM really make it un-happy.
This problem seems to be in the following code.
OMElement zipPart = (OMElement) namePart.getNextOMSibling();
This code is vulnerable if a carriage return is present after the <name> tag before <package> tag. AFAIK this happens because of the behaviour of Axiom. Axiom creates an OMText node for the carriage return. So when getNextOMSibling() is called instead of <package> element OMText is selected. But since the OMText cannot be cast to OMElement a ClassCastException occurs. This can be avoided by obtaining zipart OMElement with a call to getChild() or any related method which returns an OMElement reference. I can provide a patch for this if necessary.
reported by Buddhika Chamith and Ciaran.
Attachments
Issue Links
- is duplicated by
-
ODE-594 ODE DeploymentWebservice seems broken.
- Closed