From dev-return-96630-apmail-cocoon-dev-archive=cocoon.apache.org@cocoon.apache.org Sun Sep 02 20:01:52 2007 Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 33639 invoked from network); 2 Sep 2007 20:01:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Sep 2007 20:01:47 -0000 Received: (qmail 38423 invoked by uid 500); 2 Sep 2007 20:01:36 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 38321 invoked by uid 500); 2 Sep 2007 20:01:36 -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 37836 invoked by uid 99); 2 Sep 2007 20:01:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Sep 2007 13:01:35 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Sep 2007 20:01:39 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5D62E71420A for ; Sun, 2 Sep 2007 13:01:19 -0700 (PDT) Message-ID: <10724448.1188763279379.JavaMail.jira@brutus> Date: Sun, 2 Sep 2007 13:01:19 -0700 (PDT) From: "Grzegorz Kossakowski (JIRA)" To: dev@cocoon.apache.org Subject: [jira] Updated: (COCOON-2036) Handle circular dependencies in servlet connections In-Reply-To: <2027965.1175629292315.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COCOON-2036?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Grzegorz Kossakowski updated COCOON-2036: ----------------------------------------- Component/s: (was: - Servlet service framework) - OSGi integration > Handle circular dependencies in servlet connections > --------------------------------------------------- > > Key: COCOON-2036 > URL: https://issues.apache.org/jira/browse/COCOON-2036 > Project: Cocoon > Issue Type: Bug > Components: - OSGi integration > Affects Versions: 2.2-dev (Current SVN) > Reporter: Alexander Klimetschek > Attachments: circular-servlet-connections-warning.patch > > > Circular dependencies in servlet connections lead to a Spring exception [1] in [2] that does not provide any help. The previous implementation (block:) did allow circular dependencies because they were not handled by spring but by custom code. > Solution would be either to allow them (probably difficult to implement with spring) or, if not, to provide a helpful warning message, that skips this problem. The latter could be a check for embeddedServlet==null and, if not, throw an exception saying "you might have a circular dependency in ". > --- > [1]: > The exception is thrown after ServletFactoryBean.getObject() tries to create a proxy for the embeddedServlet, which is null in the case of a circular dependency (one of the circle endpoints is created, but the other will be null). > Caused by: org.springframework.aop.framework.AopConfigException: Can't proxy null object > at org.springframework.aop.framework.ProxyFactory.(ProxyFactory.java:49) > at org.apache.cocoon.servletservice.spring.ServletFactoryBean.getObject(ServletFactoryBean.java:194) > at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectFromFactoryBean(AbstractBeanFactory.java:1211) > [2]: > public Object getObject() throws Exception { > ProxyFactory proxyFactory = new ProxyFactory(this.embeddedServlet); > proxyFactory.addAdvice(new ServiceInterceptor()); > if (this.mountPath != null) { > proxyFactory.addAdvisor(new MountableMixinAdvisor()); > } > proxyFactory.addAdvisor(new ServletServiceContextMixinAdvisor()); > return proxyFactory.getProxy(); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.