Return-Path: X-Original-To: apmail-camel-dev-archive@www.apache.org Delivered-To: apmail-camel-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B0EBC913F for ; Sat, 20 Dec 2014 08:02:44 +0000 (UTC) Received: (qmail 22661 invoked by uid 500); 20 Dec 2014 08:02:44 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 22620 invoked by uid 500); 20 Dec 2014 08:02:44 -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 22609 invoked by uid 99); 20 Dec 2014 08:02:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Dec 2014 08:02:43 +0000 X-ASF-Spam-Status: No, hits=4.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,SPF_SOFTFAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: softfail (nike.apache.org: transitioning domain of niteshjain132@gmail.com does not designate 162.253.133.43 as permitted sender) Received: from [162.253.133.43] (HELO mwork.nabble.com) (162.253.133.43) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Dec 2014 08:02:17 +0000 Received: from msam.nabble.com (unknown [162.253.133.85]) by mwork.nabble.com (Postfix) with ESMTP id 613D2E44CAF for ; Sat, 20 Dec 2014 00:01:16 -0800 (PST) Date: Sat, 20 Dec 2014 01:01:15 -0700 (MST) From: niteshjain To: dev@camel.apache.org Message-ID: In-Reply-To: References: <1418802316483-5760809.post@n5.nabble.com> Subject: Re: SAXParseException -Cannot find the declaration of element 'beans' MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_215907_1027750161.1419062475931" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_215907_1027750161.1419062475931 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit When I deploy it in OSGI Container I get Org.xml.sax.SAXParseException: cvc-elt.1.a: Cannot find the declaration of element 'beans'. Whereas it worked in Jboss IDE On 1:32PM, Wed, 17 Dec 2014 Grzegorz Grzybek [via Camel] < ml-node+s465427n5760810h26@n5.nabble.com> wrote: > Hi > > Are you sure you're not running inside OSGi environment? (hint: > org.apache.servicemix.bundles.spring-beans:3.2.8.RELEASE_1) > See this thread then: > https://developer.jboss.org/thread/245670?start=0&tstart=0 > > regards > Grzegorz Grzybek > > 2014-12-17 8:45 GMT+01:00 niteshjain <[hidden email] > >: > > > > > Camel+cxf - Unable to parse the *camel_context.xml *when called from a > java > > code as below. i don't get any such error when i run in eclipse. > > > > > > ApplicationContext ac = new ClassPathXmlApplicationContext("nite.xml"); > > > > CamelContext context = SpringCamelContext.springCamelContext(ac); > > > > *camel_context.xml:* > > > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > xmlns:tool="http://www.springframework.org/schema/tool" > > xsi:schemaLocation="http://www.springframework.org/schema/beans > > http://www.springframework.org/schema/beans/spring-beans-2.5.xsd > > http://www.springframework.org/schema/tool > > http://www.springframework.org/schema/tool/spring-tool-2.5.xsd"> > > > class="com.hp.som.devicecapabilities.actions.TestRouter" /> > > > > > > > > log: > > > > 2014-12-16 10:35:57,969 | INFO | ClassPathXmlApplicationContext | 128 > - > > org.apache.servicemix.bundles.spring-context - 3.2.8.RELEASE_1 | > Refreshing > > > org.springframework.context.support.ClassPathXmlApplicationContext@302d6c6e > > : > > startup date [Tue Dec 16 10:35:57 IST 2014]; root of context hierarchy > > > > 2014-12-16 10:35:57,969 | INFO | XmlBeanDefinitionReader | 131 > - > > org.apache.servicemix.bundles.spring-beans - 3.2.8.RELEASE_1 | Loading > XML > > bean definitions from class path resource [camel_context.xml] > > > > 2014-12-16 10:36:24,310 | WARN | XmlBeanDefinitionReader | 131 > - > > org.apache.servicemix.bundles.spring-beans - 3.2.8.RELEASE_1 | Ignored > XML > > validation warning > > > > Caused by: org.xml.sax.SAXParseException: cvc-elt.1.a: Cannot find the > > declaration of element 'beans'. > > at > > > org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown > > Source)[:] > > at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown > > Source)[:] > > at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown > > Source)[:] > > at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown > > Source)[:] > > at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown > > Source)[:] > > at > > org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown > > Source)[:] > > at > > org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown > > Source)[:] > > at > > org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown > > Source)[:] > > at > > > > > org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown > > > Source)[:] > > at > > > > > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown > > > Source)[:] > > at > > > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown > > Source)[:] > > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > > Source)[:] > > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > > Source)[:] > > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)[:] > > at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)[:] > > at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown > > Source)[:] > > at > > > > > org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)[131:org.apache.servicemix.bundles.spring-beans:3.2.8.RELEASE_1] > > > at > > > > > org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)[131:org.apache.servicemix.bundles.spring-beans:3.2.8.RELEASE_1] > > > > > > > > > -- > > View this message in context: > > > http://camel.465427.n5.nabble.com/SAXParseException-Cannot-find-the-declaration-of-element-beans-tp5760809.html > > Sent from the Camel Development mailing list archive at Nabble.com. > > > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://camel.465427.n5.nabble.com/SAXParseException-Cannot-find-the-declaration-of-element-beans-tp5760809p5760810.html > To unsubscribe from SAXParseException -Cannot find the declaration of > element 'beans', click here > > . > NAML > > -- View this message in context: http://camel.465427.n5.nabble.com/SAXParseException-Cannot-find-the-declaration-of-element-beans-tp5760809p5760942.html Sent from the Camel Development mailing list archive at Nabble.com. ------=_Part_215907_1027750161.1419062475931--