Bug 101004 - NPE when logging in as a new user and unchecking 'Remember login'
NPE when logging in as a new user and unchecking 'Remember login'
Status: CLOSED RAWHIDE
Product: Red Hat Web Application Framework
Classification: Retired
Component: other (Show other bugs)
nightly
All Linux
medium Severity high
: ---
: ---
Assigned To: Vadim Nasardinov
Jon Orris
:
Depends On:
Blocks: 98546
  Show dependency treegraph
 
Reported: 2003-07-28 10:28 EDT by Jon Orris
Modified: 2007-04-18 12:56 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-07-31 16:21:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jon Orris 2003-07-28 10:28:16 EDT
Go to yoursite/ccm/register
Enter a new e-mail address & password, and uncheck the 'Remember this login?' 
box. Get an NPE. If the box is checked, navigation proceeds normally to the 
user registration form.

@34022/Postgres

Description of problem:

CCM issue report code: 172.16.64.111:3c7a536e:f6a9480981


-*-*-*-*-*- Begin Error Report -*-*-*-*-*-
-*-*-*- ACS Error Report Code: 172.16.64.111:3c7a536e:f6a9480981 -*-*-*-
-*-*-*- Message: null -*-*-*-

-*-*-*- Section: HTTP headers -*-*-*-
accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-
powerpoint, application/vnd.ms-excel, application/msword, */*
accept-encoding: gzip, deflate
accept-language: en-us
cache-control: no-cache
connection: Keep-Alive
content-length: 195
content-type: application/x-www-form-urlencoded
cookie: JSESSIONID=5FDAC5B47EFFE17366C59813E8590246
host: goodeats.boston.redhat.com:8080
referer: http://goodeats.boston.redhat.com:8080/ccm/register/?g11n.enc=UTF-8
user-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

-*-*-*- Section: Cookies -*-*-*-
JSESSIONID: 5FDAC5B47EFFE17366C59813E8590246 (expires: -1)

-*-*-*- Section: CCM User -*-*-*-
Party not logged in

-*-*-*- Section: Stack trace -*-*-*-
java.lang.NullPointerException
	at com.arsdigita.web.ParameterMap.setParameter(ParameterMap.java:199)
	at com.arsdigita.ui.login.UserRegistrationForm.redirectToNewUserPage
(UserRegistrationForm.java:369)
	at com.arsdigita.ui.login.UserRegistrationForm.onAccountNotFound
(UserRegistrationForm.java:322)
	at com.arsdigita.ui.login.UserRegistrationForm.loginUser
(UserRegistrationForm.java:267)
	at com.arsdigita.ui.login.UserRegistrationForm.validate
(UserRegistrationForm.java:213)
	at com.arsdigita.bebop.FormSection.fireValidate(FormSection.java:378)
	at com.arsdigita.bebop.FormSection$3.validate(FormSection.java:404)
	at com.arsdigita.bebop.FormModel.fireFormValidation(FormModel.java:457)
	at com.arsdigita.bebop.FormModel.process(FormModel.java:338)
	at com.arsdigita.bebop.Form.process(Form.java:440)
	at com.arsdigita.bebop.Form.respond(Form.java:281)
	at com.arsdigita.bebop.PageState.respond(PageState.java:368)
	at com.arsdigita.bebop.Page.process(Page.java:696)
	at com.arsdigita.bebop.Page.process(Page.java:678)
	at com.arsdigita.bebop.Page.buildDocument(Page.java:732)
	at com.arsdigita.bebop.page.PageDispatcher.dispatch
(PageDispatcher.java:77)
	at com.arsdigita.dispatcher.MapDispatcher.dispatch
(MapDispatcher.java:157)
	at com.arsdigita.sitenode.SiteNodeDispatcher.doDispatch
(SiteNodeDispatcher.java:416)
	at com.arsdigita.sitenode.SiteNodeDispatcher.access$100
(SiteNodeDispatcher.java:71)
	at com.arsdigita.sitenode.SiteNodeDispatcher$1.excurse
(SiteNodeDispatcher.java:251)
	at com.arsdigita.kernel.KernelExcursion.run(KernelExcursion.java:57)
	at com.arsdigita.sitenode.SiteNodeDispatcher.dispatch
(SiteNodeDispatcher.java:237)
	at com.arsdigita.dispatcher.BaseDispatcherServlet.service
(BaseDispatcherServlet.java:318)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.catalina.core.ApplicationDispatcher.invoke
(ApplicationDispatcher.java:683)
	at org.apache.catalina.core.ApplicationDispatcher.doForward
(ApplicationDispatcher.java:403)
	at org.apache.catalina.core.ApplicationDispatcher.forward
(ApplicationDispatcher.java:355)
	at com.arsdigita.web.BaseDispatcher.forward(BaseDispatcher.java:212)
	at com.arsdigita.web.DispatcherServlet.service
(DispatcherServlet.java:150)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:247)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:243)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java(Compiled Code))
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java(Compiled Code))
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
(Compiled Code))
	at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:190)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java(Compiled Code))
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java(Compiled Code))
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
(Compiled Code))
	at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2347)
	at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java(Compiled Code))
	at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java(Compiled Code))
	at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:170)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java(Compiled Code))
	at org.apache.catalina.valves.AccessLogValve.invoke
(AccessLogValve.java:468)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java(Compiled Code))
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java(Compiled Code))
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
(Compiled Code))
	at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:174)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java(Compiled Code))
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java(Compiled Code))
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
(Compiled Code))
	at org.apache.catalina.connector.http.HttpProcessor.process
(HttpProcessor.java:1027)
	at org.apache.catalina.connector.http.HttpProcessor.run
(HttpProcessor.java:1125)
	at java.lang.Thread.run(Thread.java:513)


-*-*-*- Section: Servlet attributes -*-*-*-
com.arsdigita.bebop.PageState: com.arsdigita.bebop.PageState@19fdd351 = {
m_page = com.arsdigita.ui.SimplePage@1c981365,
m_request = org.apache.catalina.connector.HttpRequestFacade@2341936e,
m_response = org.apache.catalina.connector.HttpResponseFacade@22e4536e,
m_pageState = com.arsdigita.bebop.FormData@19f3d351 = {
m_parameterDataValues = {bbp.22.sel={null, []}, bbp.e={null, []}, g11n.enc={UTF-
8, []}, bbp.v={null, []}, bbp.i={{}, []}, bbp.s={2, []}},
m_formErrors = null,
m_model = com.arsdigita.bebop.FormModel@1ed21365,
m_locale = en_US,
m_isTransformed = true,
m_isValid = true,
m_isSubmission = true
},
m_attributes = null,
,
m_grabbingComponent = null,
m_invisible = {}
}
com.arsdigita.bebop.RequestLocal: {com.arsdigita.bebop.Form$2@4923d365=}
com.arsdigita.dispatcher.RequestContext: 
com.arsdigita.sitenode.SiteNodeRequestContext@2866d351
com.arsdigita.dispatcher.RequestValue: 
{com.arsdigita.dispatcher.RequestValue@210d936a=null}
com.arsdigita.web.BaseServlet.request_url: /ccm/register/?
login.submit=Submit&bbp.s=2&form.user-login=visited×tamp=timestamp%
211059402313342%21kaUe72DqxjtY8eMS5bvhEg%3D%3D&email=newuser%
40cms.com&bbp.i=d0.1&g11n.enc=UTF-8&return_url=&password=newuser
com.arsdigita.web.DispatcherServlet.falling_back: true
guruErrorReport: 
-*-*-*-*-*- Begin Error Report -*-*-*-*-*-
-*-*-*- ACS Error Report Code: 172.16.64.111:3c7a536e:f6a9480972 -*-*-*-
-*-*-*- Message: null -*-*-*-

-*-*-*- Section: HTTP headers -*-*-*-
accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-
powerpoint, application/vnd.ms-excel, application/msword, */*
accept-encoding: gzip, deflate
accept-language: en-us
cache-control: no-cache
connection: Keep-Alive
content-length: 195
content-type: application/x-www-form-urlencoded
cookie: JSESSIONID=5FDAC5B47EFFE17366C59813E8590246
host: goodeats.boston.redhat.com:8080
referer: http://goodeats.boston.redhat.com:8080/ccm/register/?g11n.enc=UTF-8
user-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

-*-*-*- Section: Cookies -*-*-*-
JSESSIONID: 5FDAC5B47EFFE17366C59813E8590246 (expires: -1)

-*-*-*- Section: CCM User -*-*-*-
Party not logged in

-*-*-*- Section: Stack trace -*-*-*-
java.lang.NullPointerException
	at com.arsdigita.web.ParameterMap.setParameter(ParameterMap.java:199)
	at com.arsdigita.ui.login.UserRegistrationForm.redirectToNewUserPage
(UserRegistrationForm.java:369)
	at com.arsdigita.ui.login.UserRegistrationForm.onAccountNotFound
(UserRegistrationForm.java:322)
	at com.arsdigita.ui.login.UserRegistrationForm.loginUser
(UserRegistrationForm.java:267)
	at com.arsdigita.ui.login.UserRegistrationForm.validate
(UserRegistrationForm.java:213)
	at com.arsdigita.bebop.FormSection.fireValidate(FormSection.java:378)
	at com.arsdigita.bebop.FormSection$3.validate(FormSection.java:404)
	at com.arsdigita.bebop.FormModel.fireFormValidation(FormModel.java:457)
	at com.arsdigita.bebop.FormModel.process(FormModel.java:338)
	at com.arsdigita.bebop.Form.process(Form.java:440)
	at com.arsdigita.bebop.Form.respond(Form.java:281)
	at com.arsdigita.bebop.PageState.respond(PageState.java:368)
	at com.arsdigita.bebop.Page.process(Page.java:696)
	at com.arsdigita.bebop.Page.process(Page.java:678)
	at com.arsdigita.bebop.Page.buildDocument(Page.java:732)
	at com.arsdigita.bebop.page.PageDispatcher.dispatch
(PageDispatcher.java:77)
	at com.arsdigita.dispatcher.MapDispatcher.dispatch
(MapDispatcher.java:157)
	at com.arsdigita.sitenode.SiteNodeDispatcher.doDispatch
(SiteNodeDispatcher.java:416)
	at com.arsdigita.sitenode.SiteNodeDispatcher.access$100
(SiteNodeDispatcher.java:71)
	at com.arsdigita.sitenode.SiteNodeDispatcher$1.excurse
(SiteNodeDispatcher.java:251)
	at com.arsdigita.kernel.KernelExcursion.run(KernelExcursion.java:57)
	at com.arsdigita.sitenode.SiteNodeDispatcher.dispatch
(SiteNodeDispatcher.java:237)
	at com.arsdigita.dispatcher.BaseDispatcherServlet.service
(BaseDispatcherServlet.java:318)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.catalina.core.ApplicationDispatcher.invoke
(ApplicationDispatcher.java:683)
	at org.apache.catalina.core.ApplicationDispatcher.doForward
(ApplicationDispatcher.java:403)
	at org.apache.catalina.core.ApplicationDispatcher.forward
(ApplicationDispatcher.java:355)
	at com.arsdigita.web.BaseDispatcher.forward(BaseDispatcher.java:212)
	at com.arsdigita.web.DispatcherServlet.service
(DispatcherServlet.java:150)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:247)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:243)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java(Compiled Code))
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java(Compiled Code))
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
(Compiled Code))
	at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:190)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java(Compiled Code))
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java(Compiled Code))
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
(Compiled Code))
	at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2347)
	at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java(Compiled Code))
	at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java(Compiled Code))
	at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:170)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java(Compiled Code))
	at org.apache.catalina.valves.AccessLogValve.invoke
(AccessLogValve.java:468)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java(Compiled Code))
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java(Compiled Code))
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
(Compiled Code))
	at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:174)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java(Compiled Code))
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java(Compiled Code))
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java
(Compiled Code))
	at org.apache.catalina.connector.http.HttpProcessor.process
(HttpProcessor.java:1027)
	at org.apache.catalina.connector.http.HttpProcessor.run
(HttpProcessor.java:1125)
	at java.lang.Thread.run(Thread.java:513)


-*-*-*- Section: Servlet attributes -*-*-*-
com.arsdigita.bebop.PageState: com.arsdigita.bebop.PageState@19fdd351 = {
m_page = com.arsdigita.ui.SimplePage@1c981365,
m_request = org.apache.catalina.connector.HttpRequestFacade@2341936e,
m_response = org.apache.catalina.connector.HttpResponseFacade@22e4536e,
m_pageState = com.arsdigita.bebop.FormData@19f3d351 = {
m_parameterDataValues = {bbp.22.sel={null, []}, bbp.e={null, []}, g11n.enc={UTF-
8, []}, bbp.v={null, []}, bbp.i={{}, []}, bbp.s={2, []}},
m_formErrors = null,
m_model = com.arsdigita.bebop.FormModel@1ed21365,
m_locale = en_US,
m_isTransformed = true,
m_isValid = true,
m_isSubmission = true
},
m_attributes = null,
,
m_grabbingComponent = null,
m_invisible = {}
}
com.arsdigita.bebop.RequestLocal: {com.arsdigita.bebop.Form$2@4923d365=}
com.arsdigita.dispatcher.inside_request: HttpProcessor[8080][1]|1059402025311
com.arsdigita.dispatcher.RequestContext: 
com.arsdigita.sitenode.SiteNodeRequestContext@2866d351
com.arsdigita.dispatcher.RequestValue: 
{com.arsdigita.dispatcher.RequestValue@210d936a=null}
com.arsdigita.web.BaseServlet.request_url: /ccm/register/?
login.submit=Submit&bbp.s=2&form.user-login=visited×tamp=timestamp%
211059402313342%21kaUe72DqxjtY8eMS5bvhEg%3D%3D&email=newuser%
40cms.com&bbp.i=d0.1&g11n.enc=UTF-8&return_url=&password=newuser
com.arsdigita.web.DispatcherServlet.falling_back: true

-*-*-*- Section: Request summary -*-*-*-
Context path: 
Request URI: /ccm/register/
Query string: null
Method: POST
Remote user: null

-*-*-*- Section: System properties -*-*-*-
catalina.base: /home/boston/jorris/webserver/jakarta-tomcat-4.0.6
catalina.home: /home/boston/jorris/webserver/jakarta-tomcat-4.0.6
catalina.useNaming: true
file.encoding: UTF-8
file.encoding.pkg: sun.io
file.separator: /
invokedviajava: 
java.assistive: ON
java.awt.fonts: 
java.awt.graphicsenv: sun.awt.X11GraphicsEnvironment
java.awt.printerjob: sun.awt.motif.PSPrinterJob
java.class.path: /opt/IBMJava2-
131/lib/tools.jar:/home/boston/jorris/webserver/jakarta-tomcat-4.0.6/ccm/WEB-
INF/lib/jaas.jar:/home/boston/jorris/webserver/jakarta-tomcat-4.0.6/ccm/WEB-
INF/lib/jce.jar:/home/boston/jorris/webserver/jakarta-tomcat-4.0.6/ccm/WEB-
INF/lib/sunjce_provider.jar:/home/boston/jorris/webserver/jakarta-tomcat-
4.0.6/ccm/WEB-INF/lib/xerces.jar:/home/boston/jorris/webserver/jakarta-tomcat-
4.0.6/ccm/WEB-
INF/lib/xalan.jar:/opt/apps/oracle/product/9.2.0/jdbc/lib/classes12.zip:/home/bo
ston/jorris/webserver/jakarta-tomcat-4.0.6/bin/bootstrap.jar
java.class.version: 46.0
java.compiler: jitc
java.endorsed.dirs: /home/boston/jorris/webserver/jakarta-tomcat-
4.0.6/bin:/home/boston/jorris/webserver/jakarta-tomcat-4.0.6/common/lib
java.ext.dirs: /opt/IBMJava2-131/jre/lib/ext
java.fullversion: J2RE 1.3.1 IBM build cxia32131-20030618 (JIT enabled: jitc)
java.home: /opt/IBMJava2-131/jre
java.io.tmpdir: /home/boston/jorris/webserver/jakarta-tomcat-4.0.6/temp
java.library.path: /opt/IBMJava2-131/jre/bin:/opt/IBMJava2-
131/jre/bin/classic:/opt/apps/oracle/product/9.2.0/lib:/lib:/usr/lib:/usr/local/
lib:/usr/lib
java.naming.factory.initial: org.apache.naming.java.javaURLContextFactory
java.naming.factory.url.pkgs: org.apache.naming
java.runtime.name: Java(TM) 2 Runtime Environment, Standard Edition
java.runtime.version: 1.3.1
java.specification.name: Java Platform API Specification
java.specification.vendor: Sun Microsystems Inc.
java.specification.version: 1.3
java.vendor: IBM Corporation
java.vendor.url: http://www.ibm.com/
java.vendor.url.bug: 
java.version: 1.3.1
java.vm.info: J2RE 1.3.1 IBM build cxia32131-20030618 (JIT enabled: jitc)
java.vm.name: Classic VM
java.vm.specification.name: Java Virtual Machine Specification
java.vm.specification.vendor: Sun Microsystems Inc.
java.vm.specification.version: 1.0
java.vm.vendor: IBM Corporation
java.vm.version: 1.3.1
javax.xml.parsers.DocumentBuilderFactory: 
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
javax.xml.parsers.SAXParserFactory: org.apache.xerces.jaxp.SAXParserFactoryImpl
javax.xml.transform.TransformerFactory: com.icl.saxon.TransformerFactoryImpl
line.separator: 

os.arch: x86
os.name: Linux
os.version: 2.4.20-19.8
path.separator: :
PreferredXSLTTransformer: SAXON
sun.boot.class.path: /opt/IBMJava2-131/jre/lib/rt.jar:/opt/IBMJava2-
131/jre/lib/i18n.jar:/opt/IBMJava2-131/jre/classes
sun.boot.library.path: /opt/IBMJava2-131/jre/bin
sun.io.unicode.encoding: UnicodeLittle
user.dir: /home/boston/jorris/webserver/jakarta-tomcat-4.0.6/bin
user.home: /home/boston/jorris
user.language: en
user.name: jorris
user.region: US
user.timezone: America/New_York
-*-*-*-*-*- End Error Report -*-*-*-*-*-

guruMeditationCode: 172.16.64.111:3c7a536e:f6a9480972

-*-*-*- Section: Request summary -*-*-*-
Context path: 
Request URI: /ccm/register/
Query string: null
Method: POST
Remote user: null

-*-*-*- Section: System properties -*-*-*-
catalina.base: /home/boston/jorris/webserver/jakarta-tomcat-4.0.6
catalina.home: /home/boston/jorris/webserver/jakarta-tomcat-4.0.6
catalina.useNaming: true
file.encoding: UTF-8
file.encoding.pkg: sun.io
file.separator: /
invokedviajava: 
java.assistive: ON
java.awt.fonts: 
java.awt.graphicsenv: sun.awt.X11GraphicsEnvironment
java.awt.printerjob: sun.awt.motif.PSPrinterJob
java.class.path: /opt/IBMJava2-
131/lib/tools.jar:/home/boston/jorris/webserver/jakarta-tomcat-4.0.6/ccm/WEB-
INF/lib/jaas.jar:/home/boston/jorris/webserver/jakarta-tomcat-4.0.6/ccm/WEB-
INF/lib/jce.jar:/home/boston/jorris/webserver/jakarta-tomcat-4.0.6/ccm/WEB-
INF/lib/sunjce_provider.jar:/home/boston/jorris/webserver/jakarta-tomcat-
4.0.6/ccm/WEB-INF/lib/xerces.jar:/home/boston/jorris/webserver/jakarta-tomcat-
4.0.6/ccm/WEB-
INF/lib/xalan.jar:/opt/apps/oracle/product/9.2.0/jdbc/lib/classes12.zip:/home/bo
ston/jorris/webserver/jakarta-tomcat-4.0.6/bin/bootstrap.jar
java.class.version: 46.0
java.compiler: jitc
java.endorsed.dirs: /home/boston/jorris/webserver/jakarta-tomcat-
4.0.6/bin:/home/boston/jorris/webserver/jakarta-tomcat-4.0.6/common/lib
java.ext.dirs: /opt/IBMJava2-131/jre/lib/ext
java.fullversion: J2RE 1.3.1 IBM build cxia32131-20030618 (JIT enabled: jitc)
java.home: /opt/IBMJava2-131/jre
java.io.tmpdir: /home/boston/jorris/webserver/jakarta-tomcat-4.0.6/temp
java.library.path: /opt/IBMJava2-131/jre/bin:/opt/IBMJava2-
131/jre/bin/classic:/opt/apps/oracle/product/9.2.0/lib:/lib:/usr/lib:/usr/local/
lib:/usr/lib
java.naming.factory.initial: org.apache.naming.java.javaURLContextFactory
java.naming.factory.url.pkgs: org.apache.naming
java.runtime.name: Java(TM) 2 Runtime Environment, Standard Edition
java.runtime.version: 1.3.1
java.specification.name: Java Platform API Specification
java.specification.vendor: Sun Microsystems Inc.
java.specification.version: 1.3
java.vendor: IBM Corporation
java.vendor.url: http://www.ibm.com/
java.vendor.url.bug: 
java.version: 1.3.1
java.vm.info: J2RE 1.3.1 IBM build cxia32131-20030618 (JIT enabled: jitc)
java.vm.name: Classic VM
java.vm.specification.name: Java Virtual Machine Specification
java.vm.specification.vendor: Sun Microsystems Inc.
java.vm.specification.version: 1.0
java.vm.vendor: IBM Corporation
java.vm.version: 1.3.1
javax.xml.parsers.DocumentBuilderFactory: 
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
javax.xml.parsers.SAXParserFactory: org.apache.xerces.jaxp.SAXParserFactoryImpl
javax.xml.transform.TransformerFactory: com.icl.saxon.TransformerFactoryImpl
line.separator: 

os.arch: x86
os.name: Linux
os.version: 2.4.20-19.8
path.separator: :
PreferredXSLTTransformer: SAXON
sun.boot.class.path: /opt/IBMJava2-131/jre/lib/rt.jar:/opt/IBMJava2-
131/jre/lib/i18n.jar:/opt/IBMJava2-131/jre/classes
sun.boot.library.path: /opt/IBMJava2-131/jre/bin
sun.io.unicode.encoding: UnicodeLittle
user.dir: /home/boston/jorris/webserver/jakarta-tomcat-4.0.6/bin
user.home: /home/boston/jorris
user.language: en
user.name: jorris
user.region: US
user.timezone: America/New_York
-*-*-*-*-*- End Error Report -*-*-*-*-*-
Comment 1 Vadim Nasardinov 2003-07-30 10:27:50 EDT
Fixed in 34106.  A related issue, flushed out by this bug, is kinda
fixed in 34107.  The issue in question is that the ParameterMap does
not allow nulls as values.  However, it fails to enforce this
requirement in a consistent manner. The pre-change-34107
ParameterMap.java looks like so:


public final void setParameter(final String name, final String value) {
    if (Assert.isAssertEnabled()) {
        validateName(name);
        Assert.assertNotNull(value, "String value");
    }

    m_params.put(name, new String[] {value});
}

public final void setParameter(final String name, final Object value) {
    setParameter(name, value.toString());
}


This setParameter(String, Object) method makes the reported NPE
possible:

-*-*-*- Section: Stack trace -*-*-*-
java.lang.NullPointerException
	at com.arsdigita.web.ParameterMap.setParameter(ParameterMap.java:199)


One possible fix is to change it like so

public final void setParameter(final String name, final Object value) {
    setParameter(name, value == null ? null : value.toString());
}

This seems kinda wrong, since we *know* that null values are not
allowed.

Anyhow, my question is, why does ParameterMap not allow null values?
Comment 2 Vadim Nasardinov 2003-07-30 10:28:22 EDT
forgot to mark this is QA_READY in my previous comment
Comment 3 Justin Ross 2003-07-30 12:40:51 EDT
I think I was unsure of how to a represent a null parameter value.  I just did
some testing on Resin, and as far as it is concerned, null is the same as empty
string.

  ?foo=          getParameter("foo") -> ""
  ?foo           getParameter("foo") -> ""
  ?bar           getParameter("foo") -> null

As far as I know, the Servlet spec does not speak directly of the second case,
so implementations could vary.  I would be satisfied to convert null values to
empty string, if that carries the day.
Comment 4 Justin Ross 2003-07-30 12:57:10 EDT
Oh, and the NPE was just a bug.  The intention before this discussion was to
disallow null values.
Comment 5 Vadim Nasardinov 2003-07-30 13:22:54 EDT
I think p4 34106 can be rolled back, if the ParameterMap's setParameter
method is changed to convert null values to empty strings.  Seems like
the right-ish thing to do anyway.
Comment 6 Justin Ross 2003-07-30 13:34:01 EDT
Okay, I'll make that change.
Comment 7 Justin Ross 2003-07-30 15:22:50 EDT
On looking at the code, it seemed better to allow ParameterMaps to hold params
with null values and then to convert null -> "" on generating a query string. 
That's what I did in perforce 34121.
Comment 8 Vadim Nasardinov 2003-07-31 12:44:42 EDT
I reverted my fix to UserRegistrationForm.java in 34148, because Justin's
changes addressed the root cause of this bug.

Note You need to log in before you can comment on or make changes to this bug.