Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 37405 invoked from network); 4 Apr 2008 09:38:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Apr 2008 09:38:23 -0000 Received: (qmail 88080 invoked by uid 500); 4 Apr 2008 09:38:22 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 88037 invoked by uid 500); 4 Apr 2008 09:38:22 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 88026 invoked by uid 99); 4 Apr 2008 09:38:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Apr 2008 02:38:22 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [195.179.127.178] (HELO mx1.minick.net) (195.179.127.178) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Apr 2008 09:37:40 +0000 Received: from gw-ch.minick.ch ([194.209.160.254]:10405 helo=[127.0.0.1]) by mx1.minick.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1JhiMe-0002z0-Ps for users@cocoon.apache.org; Fri, 04 Apr 2008 11:37:49 +0200 Message-ID: <47F5F71E.9040501@minick.ch> Date: Fri, 04 Apr 2008 11:38:38 +0200 From: Alec Bickerton User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en; rv:1.8.1.3) Gecko/20070326 Thunderbird/2.0.0.0 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: users@cocoon.apache.org Subject: Re: RequestWrapper and the case of the Nullpointer References: <47F5063C.1000006@minick.ch> <6837F357-FA37-422B-A2F3-F7A936DF1643@reverycodes.com> In-Reply-To: <6837F357-FA37-422B-A2F3-F7A936DF1643@reverycodes.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.6 X-Spam-Report: [ALL_TRUSTED=-1.8,AWL=0.165] X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Flag: NO Vadim Gritsenko wrote: > On Apr 3, 2008, at 12:30 PM, Alec Bickerton wrote: [snip] >> I can't be more specific because this ONLY occurs when tomcat is >> started without a debugger. If I attach the debugger, it seem that the >> RequestWrapper initialises correctly and the parameter is found. [snip] > > Did you check tomcat's source code for the version you are running? I'm > curious what is at this line > >java.lang.NullPointerException at org.apache.catalina.connector.Request.parseParameters(Request.java:2426) at org.apache.catalina.connector.Request.getParameter(Request.java:1040) at org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:355) at org.apache.cocoon.environment.http.HttpRequest.getParameter(HttpRequest.java:316) at org.apache.cocoon.environment.wrapper.RequestWrapper.getParameter(RequestWrapper.java:123) >at org.apache.cocoon.environment.wrapper.RequestWrapper.getParameter(RequestWrapper.java:123) >at org.apache.cocoon.environment.wrapper.RequestWrapper.getParameter(RequestWrapper.java:123) >at org.apache.cocoon.environment.wrapper.RequestWrapper.getParameter(RequestWrapper.java:123) >at org.apache.cocoon.environment.wrapper.RequestWrapper.getParameter(RequestWrapper.java:123) >at org.apache.cocoon.environment.wrapper.RequestWrapper.getParameter(RequestWrapper.java:123) >at org.apache.cocoon.environment.wrapper.RequestWrapper.getParameter(RequestWrapper.java:123) >at ch.minick.portal.cocoon.environment.HttpServletRequestAdapter.getParameter(HttpServletRequestAdapter.java:160) catalina.connector.Request.parseParameters(Request.java:2426) > Without knowing code at that line, I can only guess that there is > something wrong with incoming request and tomcat fails to parse it... I hadn't so I did a little bit of digging through the Tomcat 6.0.14 source over the evening. It gets more interesting as the code at org.apache.catalina.connector.Request.parseParameters(Request.java:2426) is shown below. if (!getMethod().equalsIgnoreCase("POST")) return; for completeness... /** * Return the HTTP request method used in this Request. */ public String getMethod() { return coyoteRequest.method().toString(); } ... Coyote.Request public MessageBytes method() { return methodMB; <-- This value is initialised in the class declaration. } public MessageBytes requestURI() { return uriMB;<-- This value is initialised in the class declaration. } public String toString() { return "R( " + requestURI().toString() + ")"; } Unless I'm being a bit thick, it doesn't explain why the getMethod() appears to sometimes return null. The Java version being used is java version "1.6.0_05" server One for the tomcat mailing list I think. Alec --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org