You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Andreas Hartmann (JIRA)" <ji...@apache.org> on 2009/07/20 18:43:16 UTC
[jira] Created: (COCOON-2262) container.refresh() is called before
embeddedServlet.init()
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
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.
[jira] Updated: (COCOON-2262) container.refresh() is called before
embeddedServlet.init()
Posted by "Andreas Hartmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COCOON-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Hartmann updated COCOON-2262:
-------------------------------------
Other Info: [Patch available]
> 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.
[jira] Commented: (COCOON-2262) container.refresh() is called
before embeddedServlet.init()
Posted by "Andreas Hartmann (JIRA)" <ji...@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.
[jira] Updated: (COCOON-2262) container.refresh() is called before
embeddedServlet.init()
Posted by "Andreas Hartmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COCOON-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Hartmann updated COCOON-2262:
-------------------------------------
Attachment: COCOON-2262.txt
Patch:
* ServletFactoryBean: Initialize embedded servlet before refreshing the container
* SitemapServlet: Lazy-load the RequestProcessor to avoid IllegalStateException when the servlet is initialized before the web application context is set
> 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.