DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21088>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21088

NullPointerException in RequestUtils.populate

           Summary: NullPointerException in RequestUtils.populate
           Product: Struts
           Version: 1.1RC2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Utilities
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Using the Orion application server 1.5.4 I get a null pointer exception in 
RequestUtils.populate if the session is new and I have gone directly to an 
action mapping in the URL. i.e. http://server:8080/home.do
I'm using form based security, so I am correctly re-directed to my login page, 
but upon being re-directed back to the action home.do I receive the null 
pointer exception.

I've debugged the code and the problem seems to be caused by a bug in Orion in 
that request.getParameterNames() on line 1161 in RequestUtils returns null 
rather than an empty enumeration.
After a first page has been loaded getParameterNames() does correctly return 
an empty enumeration if no parameters are present.

It would be very easy to put in a check for the variable names being null 
before attempting to iterate the collection. (line 1164)

The stack trace of the error is:
java.lang.NullPointerException
        at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1164)
        at org.apache.struts.action.RequestProcessor.processPopulate
(RequestProcessor.java:821)
        at org.apache.struts.action.RequestProcessor.process
(RequestProcessor.java:254)
        at org.apache.struts.action.ActionServlet.process
(ActionServlet.java:1480)
        at org.apache.struts.action.ActionServlet.doPost
(ActionServlet.java:524)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:211)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
        at com.evermind[Orion/1.5.4 (build 10585)]._ie.doFilter(.:59)
        at filters.SetCharacterEncodingFilter.doFilter
(SetCharacterEncodingFilter.java:150)
        at com.evermind[Orion/1.5.4 (build 10585)]._deb._lnc(.:380)
        at com.evermind[Orion/1.5.4 (build 10585)]._deb._wmb(.:170)
        at com.evermind[Orion/1.5.4 (build 10585)]._co._wbb(.:581)
        at com.evermind[Orion/1.5.4 (build 10585)]._co._fs(.:189)
        at com.evermind[Orion/1.5.4 (build 10585)]._bt.run(.:62)

==============================

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to