If the xsl file is in the classpath of your own bundle, then you need
to export this package. Looks like you put it in a test package.

On Tue, Jul 16, 2013 at 9:27 AM, Cristiano Costantini
<cristiano.costant...@gmail.com> wrote:
> I must update my previous question:
> velocity in facts works fine, it is just xslt which causing issues!
>
> My test route is in fact:
> <route id="testRoute">
> <from uri="timer://myTimer?period=5000" />
> <setBody>
> <constant>Foo</constant>
> </setBody>
> <to uri="velocity://test/test.vm" />
> <to uri="xslt://test/test.xsl" />
> <to uri="log:foo" />
> </route>
>
> the velocity: endpoint works, it is the xslt: which fail...
> I'm able to run it if I use the full path for just the XSL file:
>
> <route id="testRoute">
> <from uri="timer://myTimer?period=5000" />
> <setBody>
> <constant>Foo</constant>
> </setBody>
> <to uri="velocity://test/test.vm" />
> <to
> uri="xslt://file:///C:/dev/Sandbox/osgi-deploy-test/src/main/resources/test/test.xsl"
> />
> <to uri="log:foo" />
> </route>
>
> Anyone has any suggestion on how to address this problem?
>
> My only suspect is that when I run from eclipse a simple java class with a
> main(String[] args) method where I start a  ConfigurableApplicationContext)
> where it works, and when I deploy on OSGi, I'm actually using two different
> XSLT processors, but I'm not sure how to debug it...
>
> thank you again,
>
> Cristiano
>
>
>
>
> 2013/7/16 Cristiano Costantini <cristiano.costant...@gmail.com>
>
>> Hello,
>>
>> I just tried to deploy my camel routes into an OSGi environment
>> (ServiceMix).
>>
>> I've made a simple maven project with just resources (the beans.xml, .xsl
>> and .vm files),
>> however the XSLT and Velocity endpoints cannot find the associated files (
>> with exception "Failed to resolve endpoint: xslt://testTransform.xsl due
>> to: java.io.FileNotFoundException: Cannot find resource in classpath for
>> URI: testTransform.xsl").
>>
>> If I run the route locally (in a simple java console application)
>> everything works fine.
>>
>> Anyone has experience on this type of deployment and can give me some hint?
>>
>> Thank you,
>> Cristiano
>>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cib...@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to