Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 74319 invoked from network); 21 Jul 2009 11:20:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Jul 2009 11:20:32 -0000 Received: (qmail 19835 invoked by uid 500); 21 Jul 2009 11:21:37 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 19719 invoked by uid 500); 21 Jul 2009 11:21:37 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 19711 invoked by uid 99); 21 Jul 2009 11:21:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jul 2009 11:21:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jul 2009 11:21:35 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E2135234C051 for ; Tue, 21 Jul 2009 04:21:14 -0700 (PDT) Message-ID: <518463617.1248175274925.JavaMail.jira@brutus> Date: Tue, 21 Jul 2009 04:21:14 -0700 (PDT) From: "Andreas Hartmann (JIRA)" To: dev@cocoon.apache.org Subject: [jira] Commented: (COCOON-2262) container.refresh() is called before embeddedServlet.init() In-Reply-To: <801095474.1248108196663.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COCOON-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12733594#action_12733594 ] Andreas Hartmann commented on COCOON-2262: ------------------------------------------ Unfortunately the patch only works if the block containing the servlet is the only one that is running. It looks like the servlet is registered as a listener to the context and onApplicationEvent() is called when a different ServletFactoryBean is initialized, before the init() method of the servlet has been called. > container.refresh() is called before embeddedServlet.init() > ----------------------------------------------------------- > > Key: COCOON-2262 > URL: https://issues.apache.org/jira/browse/COCOON-2262 > Project: Cocoon > Issue Type: Bug > Components: - Servlet service framework > Affects Versions: 2.2-dev (Current SVN) > Reporter: Andreas Hartmann > Priority: Minor > Attachments: COCOON-2262.txt > > > I get an NPE in an embedded servlet (CXFServlet from Apache CXF) because it references the servletConfig when onApplicationEvent() is processed. Apparently this happens because the ServletFactoryBean calls > container.refresh() > before > this.embeddedServlet.init(blockServletConfig). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.