Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 98808 invoked from network); 17 Mar 2009 12:10:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Mar 2009 12:10:10 -0000 Received: (qmail 31243 invoked by uid 500); 17 Mar 2009 12:10:10 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 31151 invoked by uid 500); 17 Mar 2009 12:10:09 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 31140 invoked by uid 500); 17 Mar 2009 12:10:09 -0000 Delivered-To: apmail-activemq-camel-dev@activemq.apache.org Received: (qmail 31137 invoked by uid 99); 17 Mar 2009 12:10:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Mar 2009 05:10:09 -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, 17 Mar 2009 12:10:02 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A2C32234C044 for ; Tue, 17 Mar 2009 05:09:42 -0700 (PDT) Message-ID: <1170831173.1237291782665.JavaMail.jira@brutus> Date: Tue, 17 Mar 2009 05:09:42 -0700 (PDT) From: "Charles Moulliard (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Commented: (CAMEL-1427) java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext In-Reply-To: <105977561.1236265019902.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/CAMEL-1427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=50594#action_50594 ] Charles Moulliard commented on CAMEL-1427: ------------------------------------------ Yes, the warning disappears by adding in the Import-package of the bundle the package org.apache.camel.component.cxf.converter and the convertBodyTo of camel {code} {code} works now. Thks :-) It only remains to find why this part of the camel route return nothing : {code} {code} > java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext > ------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: CAMEL-1427 > URL: https://issues.apache.org/activemq/browse/CAMEL-1427 > Project: Apache Camel > Issue Type: Bug > Components: camel-osgi > Reporter: Charles Moulliard > Assignee: Willem Jiang > > Hi, > When I run the following spring DSL in SMX4 > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:camel="http://camel.apache.org/schema/spring" > xmlns:cxf="http://camel.apache.org/schema/cxf" > xsi:schemaLocation=" http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans-2.5.xsd > http://camel.apache.org/schema/osgi > http://camel.apache.org/schema/osgi/camel-osgi.xsd > http://camel.apache.org/schema/spring > http://camel.apache.org/schema/spring/camel-spring.xsd > http://camel.apache.org/schema/cxf > http://camel.apache.org/schema/cxf/camel-cxf.xsd"> > > class="org.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat"> > > > > > > > > > org.apache.camel.example.reportincident.routing > > > > > > > > > > > > > > > > > > > > > , I receive the following error : > 15:48:59,209 | ERROR | xtenderThread-15 | OsgiBundleXmlApplicationContext | gatedExecutionApplicationContext 366 | Post refresh error > java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext > at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:153) > at org.springframework.context.support.AbstractApplicationContext.containsBean(AbstractApplicationContext.java:892) > at org.apache.cxf.configuration.spring.ConfigurerImpl.configureBean(ConfigurerImpl.java:141) > at org.apache.cxf.configuration.spring.ConfigurerImpl.configureBean(ConfigurerImpl.java:111) > at org.apache.cxf.transport.http.AbstractHTTPTransportFactory.configure(AbstractHTTPTransportFactory.java:229) > at org.apache.cxf.transport.http.AbstractHTTPTransportFactory.configure(AbstractHTTPTransportFactory.java:224) > at org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.createDestination(JettyHTTPTransportFactory.java:121) > at org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory.getDestination(JettyHTTPTransportFactory.java:103) > at org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:90) > at org.apache.cxf.endpoint.ServerImpl.(ServerImpl.java:69) > at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:121) > at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:168) > at org.apache.camel.component.cxf.CxfConsumer.(CxfConsumer.java:102) > at org.apache.camel.component.cxf.CxfEndpoint.createConsumer(CxfEndpoint.java:95) > at org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:62) > at org.apache.camel.Route.getServicesForRoute(Route.java:74) > at org.apache.camel.impl.RouteService.doStart(RouteService.java:77) > at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:50) > at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:743) > at org.apache.camel.spring.SpringCamelContext.maybeDoStart(SpringCamelContext.java:165) > at org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:160) > at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:50) > at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:95) > at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:114) > at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78) > at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49) > at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76) > at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274) > at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736) > at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.finishRefresh(AbstractDelegatedExecutionApplicationContext.java:380) > at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:346) > at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85) > at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:308) > at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:138) > at java.lang.Thread.run(Thread.java:595) > but the error is not generated when running outside of an OSGI server (SMX4) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.