You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by BugRat Mail System <to...@cortexity.com> on 2001/01/03 22:05:02 UTC
BugRat Report #692 has been filed.
Bug report #692 has just been filed.
You can view the report at the following URL:
<http://znutar.cortexity.com/BugRatViewer/ShowReport/692>
REPORT #692 Details.
Project: Struts
Category: Bug Report
SubCategory: New Bug Report
Class: swbug
State: received
Priority: medium
Severity: serious
Confidence: public
Environment:
Release: 20010103
JVM Release: 1.2.2
Operating System: NT
OS Release: 4.0
Platform: wintel
Synopsis:
NullPointerException using CallMethodRule in Digester if the parameters to the method call are specified as being primitive types
Description:
NullPointerException using CallMethodRule in Digester. This occurs if the
parameters to the method call are specified as being primitive types. For
example, the following excerpt from the Digester init:
digester.addCallMethod(
"quickmenu-config/entry/visibility",
// "setAppIDSense", 1, new String[] {"java.lang.Boolean"});
"setAppIDSense", 1, new String[] {"boolean"});
digester.addCallParam(
"quickmenu-config/entry/visibility", 0, "sense");
In this case, configuring the CallMethodRule to invoke a method with a primitive data type as
a parameter fails. The commented out version using the Boolean wrapper object succeeds.
(NOTE: The object the method is called on has both versions of the method.)
Stack trace from my code:
=========================
End event threw exception
java.lang.NullPointerException:
at org.apache.struts.util.BeanUtils.convert(BeanUtils.java:131)
at org.apache.struts.digester.CallMethodRule.end(CallMethodRule.java:226)
at org.apache.struts.digester.Digester.endElement(Digester.java:373)
at com.sun.xml.parser.Parser.maybeElement(Parser.java:1413)
at com.sun.xml.parser.Parser.content(Parser.java:1499)
at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
at com.sun.xml.parser.Parser.content(Parser.java:1499)
at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
at com.sun.xml.parser.Parser.parseInternal(Parser.java:492)
at com.sun.xml.parser.Parser.parse(Parser.java:284)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:77)
at org.apache.struts.digester.Digester.parse(Digester.java:708)
at loadQuickmenu.readConfig(loadQuickmenu.java:32)
at loadQuickmenu.main(loadQuickmenu.java:41) org.xml.sax.SAXException:
at org.apache.struts.digester.Digester.endElement(Digester.java:376)
at com.sun.xml.parser.Parser.maybeElement(Parser.java:1413)
at com.sun.xml.parser.Parser.content(Parser.java:1499)
at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
at com.sun.xml.parser.Parser.content(Parser.java:1499)
at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
at com.sun.xml.parser.Parser.parseInternal(Parser.java:492)
at com.sun.xml.parser.Parser.parse(Parser.java:284)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:77)
at org.apache.struts.digester.Digester.parse(Digester.java:708)
at loadQuickmenu.readConfig(loadQuickmenu.java:32)
at loadQuickmenu.main(loadQuickmenu.java:41)