Hi Dan Apologies for the late reply. Only yesterday I had a bit of time to look into this in more details. I am able to reproduce it on the latest serviceMix distribution. Looks like, when Camel schematron component is deployed into SMX. it uses Xalan by default as opposed to Saxon. There is a way of forcing saxon implementation but it should be done properly. A quick solution is to fork the camel-scheamtron 2.14.1 version and set the line numbering to false ( https://github.com/apache/camel/blob/master/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/processor/TemplatesFactory.java (line 68). That will solve your problem I believe.
In the mean time, I will raise a Jira ticket for this issue to do following: 1- Expose line numbering support through uri parameter (false by default). 2- Allow users to choose whether to use Saxon as the transformerFactoryClass. Hopefully, I should check in the changes by the end of this weekend. Regards, Ayache On 13 May 2015 at 19:25, Davis, Daniel <davi...@si.edu> wrote: > I tried with this Java DSL route. My code is showing a dependency on > Saxon in ServiceMIx but I gather the camel-schematron component is doing > its own binding to Xalan. So it results in the same exception when > trying to start the route. > > http://pastie.org/10187203 (Java and POM) > > -- > Dan Davis > > On 05/13/2015 11:28 AM, Davis, Daniel wrote: > > I have included the XML DSL version. I am working up a better Java DSL > > version. I can provoke the issue in a default ServiceMix 5.4.0 install > > with only the camel-schematron feature added. I have tried it with the > > Apache Saxon-He bundle installed too. In the ServiceMix log, the route > > fails to start with an exception that points to ServiceMix finding Xalan > > and never finding Saxon (snippet below). The Schematron rules run > > correctly in Oxygen. My running theory is that the camel-schematron > > component version needs Saxon for the linenumbering feature but does not > > have it set as a required import, but I am still learning about the > > camel-schematron component. I am trying to get it working in the Java > > DSL by resolving the Saxon dependencies in that code but that is not > > done yet. > > > > Thank you for looking at this. > > > > -- > > Dan Davis > > > > http://pastie.org/10186857 (Contains test XML DSL route, Schematron > > rules, and test xml file) > > > > Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to > > resolve endpoint: > > > schematron:///opt/sidora/servicemix/Input/schemas/DeploymentManifest2014.sch > > due to: Not supported: http://saxon.sf.net/feature/linenumbering > > at > > > org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:547)[116:org.apache.camel.camel-core:2.14.1] > > at > > > org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:72)[116:org.apache.camel.camel-core:2.14.1] > > at > > > org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:202)[116:org.apache.camel.camel-core:2.14.1] > > at > > > org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:107)[116:org.apache.camel.camel-core:2.14.1] > > at > > > org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:113)[116:org.apache.camel.camel-core:2.14.1] > > at > > > org.apache.camel.model.SendDefinition.resolveEndpoint(SendDefinition.java:61)[116:org.apache.camel.camel-core:2.14.1] > > at > > > org.apache.camel.model.SendDefinition.createProcessor(SendDefinition.java:55)[116:org.apache.camel.camel-core:2.14.1] > > at > > > org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:500)[116:org.apache.camel.camel-core:2.14.1] > > at > > > org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:213)[116:org.apache.camel.camel-core:2.14.1] > > at > > > org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:942)[116:org.apache.camel.camel-core:2.14.1] > > ... 38 more > > Caused by: java.lang.IllegalArgumentException: Not supported: > > http://saxon.sf.net/feature/linenumbering > > at > > > org.apache.xalan.processor.TransformerFactoryImpl.setAttribute(TransformerFactoryImpl.java:571)[:] > > at > > > org.apache.camel.component.schematron.processor.TemplatesFactory.newTemplates(TemplatesFactory.java:68)[260:org.apache.camel.camel-schematron:2.14.1] > > at > > > org.apache.camel.component.schematron.SchematronEndpoint.doStart(SchematronEndpoint.java:103)[260:org.apache.camel.camel-schematron:2.14.1] > > at > > > org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)[116:org.apache.camel.camel-core:2.14.1] > > at > > > org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:2148)[116:org.apache.camel.camel-core:2.14.1] > > at > > > org.apache.camel.impl.DefaultCamelContext.doAddService(DefaultCamelContext.java:1032)[116:org.apache.camel.camel-core:2.14.1] > > at > > > org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:993)[116:org.apache.camel.camel-core:2.14.1] > > at > > > org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:989)[116:org.apache.camel.camel-core:2.14.1] > > at > > > org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:543)[116:org.apache.camel.camel-core:2.14.1] > > ... 47 more > > > > -- > > Dan Davis > > > > On 05/13/2015 07:21 AM, Ayache Khettar wrote: > >> Hi Daniel > >> > >> I will try to get a working example deployed into SMX this evening and > see > >> if I can reproduce the error. Could you include the source code of your > >> working example so I could have a look? > >> > >> Regards, > >> > >> Ayache > >> On 12 May 2015 at 23:49, Davis, Daniel <davi...@si.edu> wrote: > >> > >>> An update. I got rid of camel-saxon and the Saxon bundles. Then > >>> created a Java DSL route packaged with Saxon-HE-9.6.0-5.jar. Same > error > >>> message. > >>> > >>> In smx, it looks like camel-schematron is looking for parsers from the > >>> OSGI framework like - javax.xml.parsers,version=0.0.0 > >>> from org.apache.felix.framework (0) > >>> > >>> I presume if it find Xalan first this is going to be a problem. Onward > >>> and upward. > >>> > >>> -- > >>> Dan > >>> > >>> On 05/12/2015 04:49 PM, Davis, Daniel wrote: > >>>> <dependency> > >>>>> + <groupId>net.sf.saxon</groupId> > >>>>> + <artifactId>Saxon-HE</artifactId> > >>>>> + <version>${saxon-version}</version> > >>>>> + </dependency> > >>>>> > > > >