You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Bengt Rodehav (JIRA)" <ji...@apache.org> on 2011/05/16 16:02:48 UTC

[jira] [Commented] (CAMEL-3934) Camel XSLT does not work when used with camel-blueprint

    [ https://issues.apache.org/jira/browse/CAMEL-3934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034023#comment-13034023 ] 

Bengt Rodehav commented on CAMEL-3934:
--------------------------------------

I seem to have a very similar problem. The xsl file cannot be found although it's included in the bundle itself. It resides in the subfolder "resources/xslt". I don't use Spring DSL or blueprint. I use normal java DSL, like this:

{code}
from("file:...").to("xslt:resources/xslt/claes-basis2esb-basis.xsl");
{code}

Can someone verify if it's the same problem? Is there any progress? Also, is there a workaround I can use to get this to work in Karaf?

I'm using Camel 2.7.1 under Karaf 2.2.0 and I get the following exception:

{code}
2011-05-16 15:40:52,706 | ERROR | 76-dc962f8a57fe) | daq                              | ?                                   ? | [ERROR] null : [trs.route.daq.b07e8bfd-cff2-49b0-a376-dc962f8a57fe] The callback method start has thrown an exception : Camel context failed to start (TRS data acquisition route)
java.lang.RuntimeException: Camel context failed to start (TRS data acquisition route)
	at se.digia.connect.core.service.RouteServiceBase.doStart(RouteServiceBase.java:70)
	at se.digia.connect.core.service.ServiceBase.start(ServiceBase.java:46)
	at se.digia.trs.route.daq.DaqService.__start(DaqService.java:77)
	at se.digia.trs.route.daq.DaqService.start(DaqService.java)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_21]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_21]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_21]
	at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_21]
	at org.apache.felix.ipojo.util.Callback.call(Callback.java:237)[68:org.apache.felix.ipojo:1.6.8]
	at org.apache.felix.ipojo.util.Callback.call(Callback.java:193)[68:org.apache.felix.ipojo:1.6.8]
	at org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallback.call(LifecycleCallback.java:86)[68:org.apache.felix.ipojo:1.6.8]
	at org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler.__stateChanged(LifecycleCallbackHandler.java:162)[68:org.apache.felix.ipojo:1.6.8]
	at org.apache.felix.ipojo.handlers.lifecycle.callback.LifecycleCallbackHandler.stateChanged(LifecycleCallbackHandler.java)[68:org.apache.felix.ipojo:1.6.8]
	at org.apache.felix.ipojo.InstanceManager.setState(InstanceManager.java:455)[68:org.apache.felix.ipojo:1.6.8]
	at org.apache.felix.ipojo.InstanceManager.start(InstanceManager.java:336)[68:org.apache.felix.ipojo:1.6.8]
	at org.apache.felix.ipojo.InstanceManager.reconfigure(InstanceManager.java:1184)[68:org.apache.felix.ipojo:1.6.8]
	at org.apache.felix.ipojo.IPojoFactory.reconfigure(IPojoFactory.java:481)[68:org.apache.felix.ipojo:1.6.8]
	at org.apache.felix.ipojo.IPojoFactory.updated(IPojoFactory.java:648)[68:org.apache.felix.ipojo:1.6.8]
	at org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1567)[5:org.apache.felix.configadmin:1.2.8]
	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:104)[5:org.apache.felix.configadmin:1.2.8]
	at java.lang.Thread.run(Thread.java:619)[:1.6.0_21]
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route route15 at: >>> To[xslt:resources/xslt/claes-basis2esb-basis.xsl] <<< in route: Route[[From[file:C:\dev\connect\common/data/interfaces/daq?m... because of Failed to resolve endpoint: xslt://resources/xslt/claes-basis2esb-basis.xsl due to: class path resource [resources/xslt/claes-basis2esb-basis.xsl] cannot be opened because it does not exist class path resource [resources/xslt/claes-basis2esb-basis.xsl]
	at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:815)
	at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:165)
	at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:706)
	at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1643)
	at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1432)
	at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1336)
	at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
	at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
	at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1314)
	at se.digia.connect.core.service.RouteServiceBase.doStart(RouteServiceBase.java:54)
	... 20 more
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: xslt://resources/xslt/claes-basis2esb-basis.xsl due to: class path resource [resources/xslt/claes-basis2esb-basis.xsl] cannot be opened because it does not exist class path resource [resources/xslt/claes-basis2esb-basis.xsl]
	at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:450)
	at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:47)
	at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:180)
	at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:110)
	at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:116)
	at org.apache.camel.model.SendDefinition.resolveEndpoint(SendDefinition.java:61)
	at org.apache.camel.model.SendDefinition.createProcessor(SendDefinition.java:55)
	at org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:410)
	at org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:181)
	at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:812)
	... 29 more
Caused by: javax.xml.transform.TransformerConfigurationException: class path resource [resources/xslt/claes-basis2esb-basis.xsl] cannot be opened because it does not exist class path resource [resources/xslt/claes-basis2esb-basis.xsl]
	at org.apache.camel.component.xslt.XsltComponent.loadResource(XsltComponent.java:160)
	at org.apache.camel.component.xslt.XsltComponent.createEndpoint(XsltComponent.java:132)
	at org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:75)
	at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:432)
	... 38 more
Caused by: java.io.FileNotFoundException: class path resource [resources/xslt/claes-basis2esb-basis.xsl] cannot be opened because it does not exist
	at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:158)
	at org.apache.camel.component.xslt.XsltComponent.loadResource(XsltComponent.java:156)
	... 41 more

{code}

> Camel XSLT does not work when used with camel-blueprint
> -------------------------------------------------------
>
>                 Key: CAMEL-3934
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3934
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-xslt
>    Affects Versions: 2.3.0, 2.4.0, 2.5.0, 2.6.0, 2.7.0, 2.7.1
>            Reporter: Ioannis Canellos
>
> camel-xslt cannot found the xslt document when used with camel-blueprint, do to FileNotFoundException.
> Apparently, the component uses spring resource abstraction, which is not applicable when used with camel-blueprint.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira