-
Bug
-
Resolution: Fixed
-
P4
-
5.0
-
rc
-
x86
-
windows_xp
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2144912 | 5.0u14 | Abhijit Saha | P3 | Resolved | Fixed | b01 |
FULL PRODUCT VERSION :
both jdk 1.5.0 and jdk 1.5.0 update 1
ADDITIONAL OS VERSION INFORMATION :
XP sp 1
A DESCRIPTION OF THE PROBLEM :
public class SAXParserImpl extends javax.xml.parsers.SAXParser
...
/**
* Sets the particular property in the underlying implementation of
* org.xml.sax.XMLReader.
*/
public void setProperty(String name, Object value)
throws SAXNotRecognizedException, SAXNotSupportedException
{
...
}else{
xmlReader.setProperty(name, value);
parserFeatures.put(name, value); <-- bug line 395 jdk 1.5.0.01
}
}
parserFeatures is a Hashtable and throws NullPointerException when a null value is set in last line of setProperty(). parserFeatures should be a HashMap
so features can be removed.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
This crops up in AXIS 1.1 during return msg processing when ("http://xml.org/sax/properties/lexical-handler" is set to null to "reuse" the parser in org.apache.axis.encoding.DeserializationContextImpl
public void parse() throws SAXException
{
if (inputSource != null) {
SAXParser parser = XMLUtils.getSAXParser();
try {
parser.setProperty("http://xml.org/sax/properties/lexical-handler", this);
parser.parse(inputSource, this);
try {
// cleanup - so that the parser can be reused.
parser.setProperty("http://xml.org/sax/properties/lexical-handler", null);
} catch (SAXException se){
// Ignore.
}
// only release the parser for reuse if there wasn't an
// error. While parsers should be reusable, don't trust
// parsers that died to clean up appropriately.
XMLUtils.releaseSAXParser(parser);
} catch (IOException e) {
throw new SAXException(e);
}
inputSource = null;
}
}
see
http://www.trackstudio.com/forum/bug-tracking-integrating-soap-api-issue-527.html
http://forum.java.sun.com/thread.jspa?forumID=34&threadID=560999
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
placing xerces-2.6.1.jar in \jdk1.5.0_01\jre\lib\ext\ fixes the problem
as does JDK 1.4.x
###@###.### 2005-1-20 04:13:05 GMT
both jdk 1.5.0 and jdk 1.5.0 update 1
ADDITIONAL OS VERSION INFORMATION :
XP sp 1
A DESCRIPTION OF THE PROBLEM :
public class SAXParserImpl extends javax.xml.parsers.SAXParser
...
/**
* Sets the particular property in the underlying implementation of
* org.xml.sax.XMLReader.
*/
public void setProperty(String name, Object value)
throws SAXNotRecognizedException, SAXNotSupportedException
{
...
}else{
xmlReader.setProperty(name, value);
parserFeatures.put(name, value); <-- bug line 395 jdk 1.5.0.01
}
}
parserFeatures is a Hashtable and throws NullPointerException when a null value is set in last line of setProperty(). parserFeatures should be a HashMap
so features can be removed.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
This crops up in AXIS 1.1 during return msg processing when ("http://xml.org/sax/properties/lexical-handler" is set to null to "reuse" the parser in org.apache.axis.encoding.DeserializationContextImpl
public void parse() throws SAXException
{
if (inputSource != null) {
SAXParser parser = XMLUtils.getSAXParser();
try {
parser.setProperty("http://xml.org/sax/properties/lexical-handler", this);
parser.parse(inputSource, this);
try {
// cleanup - so that the parser can be reused.
parser.setProperty("http://xml.org/sax/properties/lexical-handler", null);
} catch (SAXException se){
// Ignore.
}
// only release the parser for reuse if there wasn't an
// error. While parsers should be reusable, don't trust
// parsers that died to clean up appropriately.
XMLUtils.releaseSAXParser(parser);
} catch (IOException e) {
throw new SAXException(e);
}
inputSource = null;
}
}
see
http://www.trackstudio.com/forum/bug-tracking-integrating-soap-api-issue-527.html
http://forum.java.sun.com/thread.jspa?forumID=34&threadID=560999
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
placing xerces-2.6.1.jar in \jdk1.5.0_01\jre\lib\ext\ fixes the problem
as does JDK 1.4.x
###@###.### 2005-1-20 04:13:05 GMT
- backported by
-
JDK-2144912 com.SAXParserImpl.setProperty("feature",null) throws NullPointerException
-
- Resolved
-