Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2EF21D56C for ; Mon, 27 Aug 2012 16:53:45 +0000 (UTC) Received: (qmail 35443 invoked by uid 500); 27 Aug 2012 16:53:44 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 35409 invoked by uid 500); 27 Aug 2012 16:53:44 -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 35401 invoked by uid 99); 27 Aug 2012 16:53:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Aug 2012 16:53:44 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=MIME_QP_LONG_LINE,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [62.179.121.31] (HELO fep11.mx.upcmail.net) (62.179.121.31) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Aug 2012 16:53:37 +0000 Received: from edge02.upcmail.net ([192.168.13.237]) by viefep11-int.chello.at (InterMail vM.8.01.05.05 201-2260-151-110-20120111) with ESMTP id <20120827165316.WHGZ2060.viefep11-int.chello.at@edge02.upcmail.net> for ; Mon, 27 Aug 2012 18:53:16 +0200 Received: from [10.0.0.5] ([46.126.159.149]) by edge02.upcmail.net with edge id rssl1j00q3DhZoW02st8s2; Mon, 27 Aug 2012 18:53:16 +0200 X-SourceIP: 46.126.159.149 X-Authenticated-Sender: babak.vahdat@swissonline.ch User-Agent: Microsoft-MacOutlook/14.14.0.111121 Date: Mon, 27 Aug 2012 18:52:44 +0200 Subject: Re: Error loading spring camel context (type mismatch) From: Babak Vahdat To: Message-ID: Thread-Topic: Error loading spring camel context (type mismatch) In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="ISO-8859-1" Content-transfer-encoding: quoted-printable Am 27.08.12 17:49 schrieb "nico" unter : >Babak, >Since it's a Maven based project, I looked at the dependencies, and I've >found this suspicious one: > > org.springframework > spring > 2.5.4 > > >In the rest of the pom file, I have references to spring 3.0.7.RELEASE >for: >spring-context, spring-beans, spring-aop, spring-jms, spring-tx, >spring-core, spring-jdbc, spring-test, and of course camel-test >v2.9.0.fuse-7-061 > >On the other hand, "spring" dependency only reaches 2.5.6.SEC03 >http://mvnrepository.com/artifact/org.springframework > >But if I remove it the suspicious one, I get this: Also this exception seems to be weird as the XML you've posted is valid. I propose you to first make use of "mvn dependency:tree -Dverbose=3Dtrue" to verify your dependencies so that the classpath becomes "clean". Babak > >org.springframework.beans.factory.BeanDefinitionStoreException: Line 25 in >XML document from class path resource >[com/test/fuse/sommi/test-camel-context.xml] is invalid; nested exception >is org.xml.sax.SAXParseException: Document root element "beans", must >match >DOCTYPE root "null". >org.xml.sax.SAXParseException; lineNumber: 25; columnNumber: 103; Document >root element "beans", must match DOCTYPE root "null". > 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.dtd.XMLDTDValidator.rootElementSpecified(Unknown >Source) > at >org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown >Source) > at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown >Source) > at >org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unk >nown >Source) > at >org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootEl >ementHook(Unknown >Source) > at >org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispa >tcher.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 javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121) > at >org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefi >nitions(XmlBeanDefinitionReader.java:153) > at >org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loa >dBeanDefinitions(AbstractBeanDefinitionReader.java:99) > at >org.springframework.context.support.AbstractXmlApplicationContext.loadBean >Definitions(AbstractXmlApplicationContext.java:103) > at >org.springframework.context.support.AbstractXmlApplicationContext.loadBean >Definitions(AbstractXmlApplicationContext.java:71) > at >org.springframework.context.support.AbstractRefreshableApplicationContext. >refreshBeanFactory(AbstractRefreshableApplicationContext.java:87) > at >org.springframework.context.support.AbstractApplicationContext.refresh(Abs >tractApplicationContext.java:262) > at >org.springframework.context.support.ClassPathXmlApplicationContext.( >ClassPathXmlApplicationContext.java:80) > at >org.springframework.context.support.ClassPathXmlApplicationContext.( >ClassPathXmlApplicationContext.java:65) > at >org.springframework.context.support.ClassPathXmlApplicationContext.( >ClassPathXmlApplicationContext.java:56) > at >com.gobhub.test.fuse.sommi.TestDBRoute.createApplicationContext(TestDBRout >e.java:38) > at >org.apache.camel.test.junit4.CamelSpringTestSupport.doPreSetup(CamelSpring >TestSupport.java:85) > at >org.apache.camel.test.junit4.CamelTestSupport.setUp(CamelTestSupport.java: >203) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at >sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: >57) > at >sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm >pl.java:43) > at java.lang.reflect.Method.invoke(Method.java:616) > at >org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMetho >d.java:44) > at >org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable >.java:15) > at >org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod. >java:41) > at >org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java: >27) > at >org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31 >) > at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:46) > at org.junit.rules.RunRules.evaluate(RunRules.java:18) > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) > at >org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.j >ava:69) > at >org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.j >ava:48) > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) > at >org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31 >) > at org.junit.runners.ParentRunner.run(ParentRunner.java:292) > at >org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestR >eference.java:50) > at >org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java >:38) > at >org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTest >Runner.java:467) > at >org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTest >Runner.java:683) > at >org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunne >r.java:390) > at >org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunn >er.java:197) > > > >Mat=EDas Nicol=E1s Sommi > > >2012/8/27 Babak Vahdat [via Camel] >> > >> Hi >> >> as Claus has already suspected you've got more than one version of >>Spring >> on your classpath inside Fuse IDE. For example you've got a version >>other >> than spring-beans-3.0.7.RELEASE.jar on your classpath as well, because >> given your stacktrace, the following line corresponds to a Javadoc line >>by >> the 3.0.7.RELEASE. >> >> at >>=20 >>org.springframework.beans.factory.support.AbstractAutowireCapableBeanFact >>ory.populateBean(AbstractAutowireCapableBeanFactory.java:1008) >> >> >> I'm not familiar with Fuse IDE, however inside pure Eclipse you should >>be >> able to check your classpath entries through: >> >> Select your project -> Right mouse click -> Properties -> Java Build >>Path >> -> Libraries >> >> Babak >> >> >> ------------------------------ >> If you reply to this email, your message will be added to the >>discussion >> below: >> >>=20 >>http://camel.465427.n5.nabble.com/Error-loading-spring-camel-context-type >>-mismatch-tp5718099p5718137.html >> To unsubscribe from Error loading spring camel context (type >>mismatch), click >>=20 >>here>ubscribe_by_code&node=3D5718099&code=3Dbmljb3NvbW1pQGdtYWlsLmNvbXw1NzE4MDk5fD >>E4NDQwNzYxMDE=3D> >> . >>=20 >>NAML>ro_viewer&id=3Dinstant_html%21nabble%3Aemail.naml&base=3Dnabble.naml.namespac >>es.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.we >>b.template.NodeNamespace&breadcrumbs=3Dnotify_subscribers%21nabble%3Aemail. >>naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Ae >>mail.naml> >> > > > > >-- >View this message in context: >http://camel.465427.n5.nabble.com/Error-loading-spring-camel-context-type- >mismatch-tp5718099p5718142.html >Sent from the Camel - Users mailing list archive at Nabble.com.