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 209D5913A for ; Wed, 17 Dec 2014 08:02:20 +0000 (UTC) Received: (qmail 89577 invoked by uid 500); 17 Dec 2014 08:02:20 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 89550 invoked by uid 500); 17 Dec 2014 08:02:19 -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 89537 invoked by uid 99); 17 Dec 2014 08:02:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Dec 2014 08:02:18 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of gr.grzybek@gmail.com designates 209.85.216.46 as permitted sender) Received: from [209.85.216.46] (HELO mail-qa0-f46.google.com) (209.85.216.46) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Dec 2014 08:01:53 +0000 Received: by mail-qa0-f46.google.com with SMTP id n8so10673457qaq.19 for ; Tue, 16 Dec 2014 23:59:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=04uG1/O/jP70bezr3/0yXwjDuEqwvTnip2x7dN5iRk4=; b=y2F9T3EmSFKfWWQIOir62z8V+gqQ8FhDYXofkazcyMQ51Hhtd16t0GFg2Hj7z/R07w 8ThtFXD/qS5d3XQGmomRa6wN7qIZYqUEiq6eqdJAxhItHH2iYXLBd+DNLvntmFIA2q3w 9RfcuEiUbJpyjAlTa6WCSmRYu03nTvAH+Kst4LGkxYJiFqJH1ilnfy+CDBwYf02v/CGw twwrfjXmfKvEt62huSWyA4+nBe14qxS+XWm+ruVLqo/UnfV3llxGbT5AME+qz4KvDAHA BU3YKHbD98doUqCzshtszhVsf9zurid5XuWAIqH3GRkXu/RB0Qozzp6r1J9sdqRd5fzT uNEg== MIME-Version: 1.0 X-Received: by 10.224.93.6 with SMTP id t6mr73062725qam.93.1418803177079; Tue, 16 Dec 2014 23:59:37 -0800 (PST) Received: by 10.96.5.8 with HTTP; Tue, 16 Dec 2014 23:59:37 -0800 (PST) In-Reply-To: <1418802316483-5760809.post@n5.nabble.com> References: <1418802316483-5760809.post@n5.nabble.com> Date: Wed, 17 Dec 2014 08:59:37 +0100 Message-ID: Subject: Re: SAXParseException -Cannot find the declaration of element 'beans' From: Grzegorz Grzybek To: dev@camel.apache.org Content-Type: multipart/alternative; boundary=089e014950286047f4050a64db82 X-Virus-Checked: Checked by ClamAV on apache.org --089e014950286047f4050a64db82 Content-Type: text/plain; charset=UTF-8 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 : > > 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. > --089e014950286047f4050a64db82--