L.S.,
If you added the camel-spring jar to the classpath, this should work.
Could you verify that the required jar file is in fact added to your SU
(by opening it with file-roller/winzip)? Also, could you make sure that
you are using the exact same version of camel as the one that is used in
servicemix-camel (for ServiceMix 3.2.1, this would be Camel 1.2; any
-SNAPSHOT version would use Camel 1.4-SNAPSHOT instead). If nothing
helps, you could try to enable DEBUG logging for Camel in conf/log4j.xml.
Regards,
Gert
aknapp wrote:
Hello,
I've followed the same pattern to adding a dependency to my camel su as in
the tutorial for using MINA.
The tutorial states:
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-mina</artifactId>
<version>${camel-version}</version>
</dependency>
Then the camel code is:
from("mina:tcp://localhost:10021")
//1
.to("jbi:endpoint:urn:org:apache:servicemix:tutorial:camel:jms:provider");
//2
Pretty straight forward, I've also confirmed that removing the dependency
from the su pom.xml file does in deed cause the deployment to crash.
This makes sense. However, the camel-spring (specificly for xslt) does not
follow the same behavior.
I'm adding the following to my pom.xml file (found on
http://activemq.apache.org/camel/components.html for xslt):
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring</artifactId>
<version>${camel-version}</version>
</dependency>
The camel code looks like:
...
.to("xslt:com/acme/mytransform.xsl")
...
Here is the error:
org.apache.camel.RuntimeCamelException:
org.apache.camel.NoSuchEndpointException: No endpoint could be found for:
xslt:com/acme/mytransform.xsl
Here is the stack trace:
org.apache.xbean.kernel.ServiceRegistrationException:
org.apache.camel.RuntimeCamelException:
org.apache.camel.NoSuchEndpointException: No endpoint could be found for:
xslt:com/acme/mytransform.xsl
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:79)
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:350)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:253)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:647)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:60)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:611)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Caused by: org.apache.camel.RuntimeCamelException:
org.apache.camel.NoSuchEndpointException: No endpoint could be found for:
xslt:com/acme/mytransform.xsl
at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:98)
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:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
org.apache.xbean.kernel.standard.ServiceManagerRegistry.registerService(ServiceManagerRegistry.java:409)
... 14 more
Caused by: org.apache.camel.NoSuchEndpointException: No endpoint could be
found for: xslt:com/acme/mytransform.xsl
at
org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:50)
at
org.apache.camel.model.RouteType.resolveEndpoint(RouteType.java:89)
at
org.apache.camel.impl.RouteContext.resolveEndpoint(RouteContext.java:81)
at
org.apache.camel.impl.RouteContext.resolveEndpoint(RouteContext.java:90)
at org.apache.camel.model.ToType.resolveEndpoint(ToType.java:82)
at org.apache.camel.model.ToType.createProcessor(ToType.java:76)
at
org.apache.camel.model.ProcessorType.makeProcessor(ProcessorType.java:882)
at
org.apache.camel.model.ProcessorType.addRoutes(ProcessorType.java:87)
at org.apache.camel.model.RouteType.addRoutes(RouteType.java:182)
at org.apache.camel.model.RouteType.addRoutes(RouteType.java:80)
at org.apache.camel.model.RouteType.addRoutes(RouteType.java:71)
at
org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:449)
at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:441)
at
org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:140)
at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:51)
at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:96)
Any help is greatly appreciated!!!