camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ayache Khettar <ayache.khet...@googlemail.com>
Subject Re: Schematron component: Not supported: http://saxon.sf.net/feature/linenumbering
Date Mon, 01 Jun 2015 19:36:44 GMT
Hi Daniel

I have checked a fix and here is the lira ticket (keep an eye on it):
https://issues.apache.org/jira/browse/CAMEL-8796 Hopefully, the changes
will make it to 2.14.1 version soon.

The above ticket only deals with class loader issue and it should get you
pass the issue you were facing on karaf.

Regards,

Ayache
On 20 May 2015 at 20:53, Davis, Daniel <DavisDa@si.edu> wrote:

> Thank you so much for both the workaround and the additional features!
>
> --
> Dan Davis
>
> On 05/19/2015 03:49 AM, Ayache Khettar wrote:
> > 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 <DavisDa@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 <DavisDa@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>
> >>>>>>>
> >>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message