Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 33255 invoked from network); 15 Feb 2011 09:50:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Feb 2011 09:50:03 -0000 Received: (qmail 31238 invoked by uid 500); 15 Feb 2011 09:50:03 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 30943 invoked by uid 500); 15 Feb 2011 09:50:00 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 30932 invoked by uid 99); 15 Feb 2011 09:49:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Feb 2011 09:49:59 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of willem.jiang@gmail.com designates 209.85.161.173 as permitted sender) Received: from [209.85.161.173] (HELO mail-gx0-f173.google.com) (209.85.161.173) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Feb 2011 09:49:55 +0000 Received: by gxk28 with SMTP id 28so2792048gxk.32 for ; Tue, 15 Feb 2011 01:49:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=TPtQkljLhjxViutis5jhsGO9JXbToIQu+IYN6RxIUCw=; b=oeDpZFibrWpeWi/YPrLi9y9B8w8mwDzveEGHZ/HpduzusDQUXPLVXVvHbm/RUFGlHH NU+R9TkreCAe0AaDAt9dtphOaGsF0DOOJhF4KWgz1IkxYEuzxJBrI5W/0ssdM1CtyP+7 X3E1LvdMiazBGS/DeQrmlnK13Ov1r5T0OsyA8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=QDKASAd1OxYyPi70dvN78GNKNPrVnKUbGhn5hU/lFDVvfiHJPxJv6Cl/Vh7cG174yj IB8zifpQ7icZF2CVx9seUIfLmIT43A55CRSqKP0KSGMlUPy/CSVDuZaIJFNqzIpPlgfv Fbu5dKELL+gPq3BLstpy41ejyCNrjfmLVYz98= Received: by 10.151.109.15 with SMTP id l15mr222811ybm.24.1297763374273; Tue, 15 Feb 2011 01:49:34 -0800 (PST) Received: from [192.168.0.158] ([123.116.35.42]) by mx.google.com with ESMTPS id 5sm2227056yhl.14.2011.02.15.01.49.31 (version=SSLv3 cipher=OTHER); Tue, 15 Feb 2011 01:49:33 -0800 (PST) Message-ID: <4D5A4C28.1090306@gmail.com> Date: Tue, 15 Feb 2011 17:49:28 +0800 From: Willem Jiang User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: users@camel.apache.org Subject: Re: CamelServlet & spring issue References: <4D5A485B.8030803@omniscient.co.in> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Charles, If we want to create a spring context in the OSGi platform, we need to leverage the Spring DM to help you look up the schema across the bundles. Current CamelServlet just create the Spring application with use that. Maybe you can consider to use the OsgiServletRegisterer which is new added by Christian, you can find more information from the JIRA[1]. [1]https://issues.apache.org/jira/browse/CAMEL-3490 Willem On 2/15/11 5:44 PM, Charles Moulliard wrote: > camel-spring is deployed on Karaf and referenced as a Require-Bundle > in the MANIFEST.MF file of my WAR project > > The issue is that we cannot import here the camel spring schema as it > is part of the root of camel-spring jar and not exported by the bundle > like this is the case by example for camel-cxf > > ex : > > karaf@root> packages:exports 1883 = camel-cxf > ID Packages > 1883 org.apache.camel.component.cxf.util > 1883 org.apache.camel.component.cxf > 1883 org.apache.camel.component.cxf.spring > 1883 org.apache.camel.component.cxf.transport.spring > 1883 org.apache.camel.component.cxf.transport > 1883 org.apache.camel.component.cxf.converter > 1883 org.apache.camel.component.cxf.jaxrs > 1883 org.apache.camel.component.cxf.interceptors > 1883 org.apache.camel.component.cxf.soap.headers > 1883 org.apache.camel.component.cxf.cxfbean > 1883 org.apache.camel.component.cxf.feature > 1883 META-INF.cxf.camel<--- where the schemas are exported > > On Tue, Feb 15, 2011 at 10:33 AM, Sumit Teke > wrote: >> Check if camel-spring is on classpath. >> >> Thanks, >> Sumit Teke >> >> On Tuesday 15 February 2011 02:51 PM, Charles Moulliard wrote: >>> >>> Hi, >>> >>> When deploying a WAR project on Karaf, I get the following error : >>> >>> org.springframework.beans.factory.parsing.BeanDefinitionParsingException: >>> Configuration problem: Unable to locate Spring NamespaceHandler for >>> XML schema namespace [http://camel.apache.org/schema/spring] >>> Offending resource: class path resource >>> [META-INF/spring/camel-context.xml] >>> >>> at >>> org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)[48:org.springframework.beans:3.0.5.RELEASE] >>> at >>> org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)[48:org.springframework.beans:3.0.5.RELEASE] >>> at >>> org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:80)[48:org.springframework.beans:3.0.5.RELEASE] >>> at >>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.error(BeanDefinitionParserDelegate.java:284)[48:org.springframework.beans:3.0.5.RELEASE] >>> at >>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1332)[48:org.springframework.beans:3.0.5.RELEASE] >>> at >>> org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1325)[48:org.springframework.beans:3.0.5.RELEASE] >>> at >>> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)[48:org.springframework.beans:3.0.5.RELEASE] >>> at >>> org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)[48:org.springframework.beans:3.0.5.RELEASE] >>> at >>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)[48:org.springframework.beans:3.0.5.RELEASE] >>> at >>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)[48:org.springframework.beans:3.0.5.RELEASE] >>> at >>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)[48:org.springframework.beans:3.0.5.RELEASE] >>> at >>> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)[48:org.springframework.beans:3.0.5.RELEASE] >>> at >>> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)[48:org.springframework.beans:3.0.5.RELEASE] >>> at >>> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)[48:org.springframework.beans:3.0.5.RELEASE] >>> at >>> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)[48:org.springframework.beans:3.0.5.RELEASE] >>> at >>> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)[48:org.springframework.beans:3.0.5.RELEASE] >>> at >>> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:126)[49:org.springframework.context:3.0.5.RELEASE] >>> at >>> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:92)[49:org.springframework.context:3.0.5.RELEASE] >>> at >>> org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)[49:org.springframework.context:3.0.5.RELEASE] >>> at >>> org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)[49:org.springframework.context:3.0.5.RELEASE] >>> at >>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)[49:org.springframework.context:3.0.5.RELEASE] >>> at >>> org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)[49:org.springframework.context:3.0.5.RELEASE] >>> at >>> org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:93)[49:org.springframework.context:3.0.5.RELEASE] >>> at >>> org.apache.camel.component.servlet.CamelHttpTransportServlet.init(CamelHttpTransportServlet.java:46)[1985:org.apache.camel.camel-servlet:2.6.0] >>> at >>> org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:432)[1842:org.eclipse.jetty.servlet:7.2.2.v20101205] >>> >>> Spring is not able to find the NameSpaceHandler for XML schema >>> namespace [http://camel.apache.org/schema/spring] even if canel-core >>> and camel-spring 2,6,0 are deployed on Karaf and added in the >>> classpath. >>> >>> >>> CamelServlet >>> Camel Http Transport Servlet >>> >>> org.apache.camel.component.servlet.CamelHttpTransportServlet >>> >>> contextConfigLocation >>> META-INF/spring/camel-context.xml >>> >>> >>> >>> >>> CamelServlet >>> /test/* >>> >>> >>> ************************************* >>> >>> >>> >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>> xmlns:camel="http://camel.apache.org/schema/spring" >>> xsi:schemaLocation=" >>> http://www.springframework.org/schema/beans >>> http://www.springframework.org/schema/beans/spring-beans.xsd >>> http://camel.apache.org/schema/spring >>> http://camel.apache.org/schema/spring/camel-spring.xsd"> >>> >>> >> class="org.apache.camel.example.osgi.ResponseBean"/> >>> >>> >>> >>> >>> >>> >> loggingLevel="INFO"/> >>> >>> >>> >>> >>> >>> >>> Any idea is welcome ? >>> >>> Regards, >>> >>> Charles Moulliard >>> >>> Sr. Principal Solution Architect - FuseSource >>> Apache Committer >>> >>> Blog : http://cmoulliard.blogspot.com >>> Twitter : http://twitter.com/cmoulliard >>> Linkedin : http://www.linkedin.com/in/charlesmoulliard >>> Skype: cmoulliard >> > -- Willem ---------------------------------- FuseSource Web: http://www.fusesource.com Blog: http://willemjiang.blogspot.com (English) http://jnn.javaeye.com (Chinese) Twitter: willemjiang