Hi Gert,
Following is my camel-context.xml file.
<route>
<from
uri="jbi:service:http://servicemix.in2m.com/operations/changepassword/routingService"/>
<when>
<header>userPrincipals.contains('smx')</header>
<to
uri="jbi:service:http://servicemix.in2m.com/operations/changepassword/PortalService?mep=in-out"/>
</when>
<otherwise>
<to
uri="jbi:service:http://servicemix.in2m.com/operations/changepassword/DirectorService?mep=in-out"/>
</otherwise>
</route>
I was not aware of adding dependencies for using a components in camel-su. I
will try out your suggestions for JXPath.
Do we need to add any other dependencies for using header tag?
Thanks,
Sandeep.
Gert Vanthienen wrote:
>
> Sandeep Reddy,
>
> For the prblems with the <header/> element, could you post us the
> camelContext.xml file you're using? For the problem with jxpath: did
> you add the camel-jxpath component to the SU you're building? In order
> to use a language or another component in a Camel SU, you need to add
> the additional JARs to the SU first.
>
> Regards,
>
> Gert
>
> sandeep reddy wrote:
>> I am getting NoSuchLanguageException if I use <header> tag in
>> camel-context.xml file. The <header> tag is part of xsd but it gives
>> error
>> during deployment in ServiceMix. This same problem is for <jxpath> also.
>>
>> Is this a bug in Camel or ServiceMix ?
>> I have tried this in my current version of Camel 3.2.2-SNAPSHOT with
>> ServiceMix 3.2.1 and also in ServiceMix 3.2.2-SNAPSHOT.
>>
>> Following is the error log:
>>
>> <component-task-result
>> xmlns="http://java.sun.com/xml/ns/jbi/management-message">
>> <component-name>servicemix-camel</component-name>
>> <component-task-result-details>
>> <task-result-details>
>> <task-id>deploy</task-id>
>> <task-result>FAILED</task-result>
>> <message-type>ERROR</message-type>
>> <task-status-msg>
>> <msg-loc-info>
>> <loc-token/>
>> <loc-message>Could not deploy xbean service unit</loc-message>
>> </msg-loc-info>
>> </task-status-msg>
>> <exception-info>
>> <nesting-level>1</nesting-level>
>> <msg-loc-info>
>> <loc-token/>
>>
>> <loc-message>org.apache.camel.NoSuchLanguageException: No language could
>> be
>> found for: header</loc-message>
>>
>> <stack-trace><![CDATA[org.apache.xbean.kernel.ServiceRegistrationException:
>> org.apache.camel.NoSuchLanguageException: No language could be found for:
>> header
>> at
>> org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerRegistry.java:424)
>> at
>> org.apache.xbean.kernel.standard.StandardKernel.registerService(StandardKernel.java:220)
>> at
>> org.apache.xbean.server.spring.loader.SpringLoader.load(SpringLoader.java:152)
>> at
>> org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(AbstractXBeanDeployer.java:83)
>> at
>> org.apache.servicemix.camel.CamelSpringDeployer.deploy(CamelSpringDeployer.java:83)
>> at
>> org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServiceUnitManager.java:88)
>> at
>> org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServiceUnitManager.java:69)
>> at
>> org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAssembly(DeploymentService.java:508)
>> at
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:353)
>> at
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:256)
>> at
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:664)
>> at
>> org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:62)
>> at
>> org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:628)
>> at java.util.TimerThread.mainLoop(Timer.java:512)
>> at java.util.TimerThread.run(Timer.java:462)
>> Caused by: org.apache.camel.NoSuchLanguageException: No language could be
>> found for: header
>> at
>> org.apache.camel.impl.DefaultLanguageResolver.noSpecificLanguageFound(DefaultLanguageResolver.java:72)
>> at
>> org.apache.camel.impl.DefaultLanguageResolver.resolveLanguage(DefaultLanguageResolver.java:52)
>> at
>> org.apache.camel.impl.DefaultCamelContext.resolveLanguage(DefaultCamelContext.java:335)
>> at
>> org.apache.camel.model.language.ExpressionType.createPredicate(ExpressionType.java:126)
>> at
>> org.apache.camel.model.ExpressionNode.createFilterProcessor(ExpressionNode.java:90)
>> at
>> org.apache.camel.model.WhenType.createProcessor(WhenType.java:52)
>> at
>> org.apache.camel.model.WhenType.createProcessor(WhenType.java:31)
>> at
>> org.apache.camel.model.ProcessorType.makeProcessor(ProcessorType.java:1476)
>> at
>> org.apache.camel.model.ProcessorType.addRoutes(ProcessorType.java:99)
>> at org.apache.camel.model.RouteType.addRoutes(RouteType.java:210)
>> at org.apache.camel.model.RouteType.addRoutes(RouteType.java:80)
>> at
>> org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:453)
>> at
>> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:445)
>> at
>> org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:149)
>> at
>> org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
>> at
>> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:103)
>> at
>> org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
>> at
>> org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
>> at
>> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
>> at
>> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:246)
>> at
>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:355)
>> at
>> org.apache.xbean.server.spring.configuration.SpringConfiguration.<init>(SpringConfiguration.java:63)
>> at
>> org.apache.xbean.server.spring.configuration.SpringConfigurationServiceFactory.createService(SpringConfigurationServiceFactory.java:106)
>> at
>> org.apache.xbean.kernel.standard.ServiceManager.start(ServiceManager.java:420)
>> at
>> org.apache.xbean.kernel.standard.ServiceManager.initialize(ServiceManager.java:200)
>> at
>> org.apache.xbean.kernel.standard.RegistryFutureTask$RegisterCallable.call(RegistryFutureTask.java:110)
>> at
>> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
>> at java.util.concurrent.FutureTask.run(FutureTask.java:123)
>> at
>> org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerRegistry.java:409)
>> ... 14 more
>> ]]></stack-trace>
>> </msg-loc-info>
>> </exception-info>
>> </task-result-details>
>> </component-task-result-details>
>> </component-task-result>
>>
>>
>
>
>
> -----
> ---
> Gert Vanthienen
> http://www.anova.be
>
--
View this message in context:
http://www.nabble.com/Probable-bug-for-%3Cheader%3E-tag-tp18062963p18084218.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.