Return-Path: Delivered-To: apmail-activemq-camel-dev-archive@locus.apache.org Received: (qmail 18376 invoked from network); 10 Jun 2008 15:01:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Jun 2008 15:01:55 -0000 Received: (qmail 88734 invoked by uid 500); 10 Jun 2008 15:01:54 -0000 Delivered-To: apmail-activemq-camel-dev-archive@activemq.apache.org Received: (qmail 88710 invoked by uid 500); 10 Jun 2008 15:01:54 -0000 Mailing-List: contact camel-dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-dev@activemq.apache.org Delivered-To: mailing list camel-dev@activemq.apache.org Received: (qmail 88660 invoked by uid 99); 10 Jun 2008 15:01:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Jun 2008 08:01:53 -0700 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, 10 Jun 2008 15:01:12 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 43751234C135 for ; Tue, 10 Jun 2008 08:01:00 -0700 (PDT) Message-ID: <1649116742.1213110060271.JavaMail.jira@brutus> Date: Tue, 10 Jun 2008 08:01:00 -0700 (PDT) From: "Claus Ibsen (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Commented: (CAMEL-494) CamelBeanPostProcessor.camelContext cannot be injected if SpringCamelContext is proxied (e.g. AOP) In-Reply-To: <1089311900.1209996463501.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/activemq/browse/CAMEL-494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43384#action_43384 ] Claus Ibsen commented on CAMEL-494: ----------------------------------- Dean. If you follow the instructions from: http://activemq.apache.org/camel/building.html you should be able to build the source from SVN checkout. If you are still having problems then you could build only what you need: cd camel-core mvn clean install -Dtest=false cd .. cd components mvn clean install -Dtest=false cd .. cd examples mvn clean install -Dtest=false > CamelBeanPostProcessor.camelContext cannot be injected if SpringCamelContext is proxied (e.g. AOP) > -------------------------------------------------------------------------------------------------- > > Key: CAMEL-494 > URL: https://issues.apache.org/activemq/browse/CAMEL-494 > Project: Apache Camel > Issue Type: Bug > Components: camel-spring > Affects Versions: 1.3.0 > Reporter: Dean Thompson > Assignee: Claus Ibsen > Fix For: 1.4.0 > > Attachments: iris-framework.xml, spring-magic.xml > > > Because CamelBeanPostProcessor.setCamelContext(SpringCamelContext) takes the class SpringCamelContext as its parameter, bean initialization fails if SpringCamelContext is proxied. The error is as follows: > {code} > org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'camelContext:beanPostProcessor': Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [$Proxy61] to required type [org.apache.camel.spring.SpringCamelContext] for property 'camelContext'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy61] to required type [org.apache.camel.spring.SpringCamelContext] for property 'camelContext': no matching editors or conversion strategy found > {code} > In my project's Spring conf, we declare , which causes all Spring beans to be proxied. This triggers the problem shown above. The problem should be reproducible by adding to any Spring config that uses . > The fix will be to separate the interface and class for SpringCamelContext, and use the interface where appropriate. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.