apache camel を使用して、Spring MVC ベースの Web アプリケーションからメールを送信しようとしています。しかし、設定が間違っていると思われるため、Tomcat が起動しません。
手伝ってくれませんか?
**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 i run tomcat i am 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 to import bean definitions from relative location [camel-config.xml]
Offending resource: ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 2 in XML document from ServletContext resource [/WEB-INF/camel-config.xml] is invalid; nested exception is 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', but the target namespace of the schema document is 'http://activemq.apache.org/camel/schema/spring'.
at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:76)
どこが間違っているのかわかりません。
誰でも私を助けてもらえますか?