java - Spring Camel Email Configuration Issue -
i trying send email spring mvc based web application using apache camel. tomcat not getting because of wrong configuration guess.
can please me?
**camel-config.xml** <?xml version="1.0" encoding="utf-8"?> <beans xmlns="http://www.springframework.org/schema/beans" 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-3.1.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> <camelcontext xmlns="http://camel.apache.org/schema/spring"> <contextscan>com.aaa.bbb.ccc.service</contextscan> </camelcontext> </beans> @service public class notificationservice { @produce(uri = "smtp://mysmtp.company.com") private producertemplate template; public void send(string from,string to,string cc,string bcc,string subject,string body) { template.sendbodyandheaders(body,requirement_specific_code); } } spring jar: version 3.1.0 camel: camel-core-2.10.3.jar camel-mail-2.10.3.jar camel-mina-2.10.3.jar camel-spring-2.10.3.jar **:issue:** once run tomcat having below error. 2013-05-21 19:08:05,581 error org.springframework.web.context.contextloader - context initialization failed org.springframework.beans.factory.parsing.beandefinitionparsingexception: configuration problem: failed import bean definitions relative location [camel-config.xml] offending resource: servletcontext resource [/web-inf/applicationcontext.xml]; nested exception org.springframework.beans.factory.xml.xmlbeandefinitionstoreexception: line 2 in xml document servletcontext resource [/web-inf/camel-config.xml] invalid; nested exception org.xml.sax.saxparseexception; systemid: http://camel.apache.org/schema/spring/camel-spring.xsd; linenumber: 2; columnnumber: 225; targetnamespace.1: expecting namespace 'http://camel.apache.org/schema/spring', target namespace of schema document 'http://activemq.apache.org/camel/schema/spring'. @ org.springframework.beans.factory.parsing.failfastproblemreporter.error(failfastproblemreporter.java:68) @ org.springframework.beans.factory.parsing.readercontext.error(readercontext.java:85) @ org.springframework.beans.factory.parsing.readercontext.error(readercontext.java:76)
i not getting wrong.
can please me out?
are sure camel-contex.xml
looks posted it? error says:
expecting namespace 'http://camel.apache.org/schema/spring', target namespace of schema document 'http://activemq.apache.org/camel/schema/spring'
so somewhere using wrong xml namespace http://activemq.apache.org/camel/schema/spring
. where?
Comments
Post a Comment