You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Jean-Baptiste Onofré (JIRA)" <ji...@apache.org> on 2019/01/10 14:37:00 UTC

[jira] [Commented] (KARAF-6076) Blueprint loading fails with Saxon or Xalan

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

Jean-Baptiste Onofré commented on KARAF-6076:
---------------------------------------------

I'm able to reproduce the issue, just installing {{camel-blueprint}} and {{camel-saxon}} features, and dropping a simple route blueprint XML.

Deployment fails with the following error:

{code}
java.io.IOException: Error opening blueprint xml url
        at org.apache.karaf.deployer.blueprint.BlueprintURLHandler$Connection.getInputStream(BlueprintURLHandler.java:78) ~[?:?]
        at java.net.URL.openStream(URL.java:1045) ~[?:?]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:962) [10:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:884) [10:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:489) [10:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [10:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [10:org.apache.felix.fileinstall:3.6.4]
Caused by: java.lang.IllegalArgumentException: Unknown configuration property http://javax.xml.XMLConstants/property/accessExternalDTD
        at net.sf.saxon.Configuration.setConfigurationProperty(Configuration.java:4644) ~[?:?]
        at net.sf.saxon.s9api.Processor.setConfigurationProperty(Processor.java:352) ~[?:?]
        at net.sf.saxon.jaxp.SaxonTransformerFactory.setAttribute(SaxonTransformerFactory.java:306) ~[?:?]
        at org.apache.karaf.util.XmlUtils.transformer(XmlUtils.java:154) ~[?:?]
        at org.apache.karaf.util.XmlUtils.transform(XmlUtils.java:96) ~[?:?]
        at org.apache.karaf.deployer.blueprint.BlueprintTransformer.analyze(BlueprintTransformer.java:129) ~[?:?]
        at org.apache.karaf.deployer.blueprint.BlueprintTransformer.transform(BlueprintTransformer.java:71) ~[?:?]
        at org.apache.karaf.deployer.blueprint.BlueprintURLHandler$Connection.getInputStream(BlueprintURLHandler.java:73) ~[?:?]
{code}

> Blueprint loading fails with Saxon or Xalan
> -------------------------------------------
>
>                 Key: KARAF-6076
>                 URL: https://issues.apache.org/jira/browse/KARAF-6076
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf
>    Affects Versions: 4.2.2
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>
> Reported on the mailing list:
> {code}
> I use Karaf as a runtime to host my Apache Camel routes. They are
> mostly plain blueprint .xmls that are installed and deployed with the
> blueprint handler.  I make heavy use of xsl tranformations and have in
> the past used Xalan but am moving to Saxon for xslt/xpath 2.0.
> On 4.2.1 I don't have any issues installing and using either Xalan or
> Saxon bundles, but on 4.2.2, once either are installed I can no longer
> install through blueprint. It looks to be the result of the change for
> "Set the secure processing feature on TransformerFactory instances" in
> XmlUtils in commit de4c413925379913ffb3bf96ead7edc2dba98d4b. That
> commit sets XMLConstants.ACCESS_EXTERNAL_DTD and neither Xalan nor
> Saxon support that property. From what I've read searching for that
> error I believe external DTD isn't in the purview of transformation
> but in the document parser.
> Note that it is after a restart of Karaf after installing Saxon that I
> get the exception when trying to install another blueprint bundle. I
> believe a transfomer is already created from the default
> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImp.
> Has anyone else seen this?
> Thanks.
> -John
> 2018-12-31T16:17:31,853 | ERROR |
> fileinstall-/opt/sgscamel/karaf/apache-karaf-4.2.2/deploy |
> BlueprintURLHandler              | 63 -
> org.apache.karaf.deployer.blueprint - 4.2.2 | Error opening blueprint
> xml url
> java.lang.IllegalArgumentException: Unknown configuration property
> http://javax.xml.XMLConstants/property/accessExternalDTD
>         at net.sf.saxon.Configuration.setConfigurationProperty(Configuration.java:4644)
> ~[?:?]
>         at net.sf.saxon.s9api.Processor.setConfigurationProperty(Processor.java:352)
> ~[?:?]
>         at net.sf.saxon.jaxp.SaxonTransformerFactory.setAttribute(SaxonTransformerFactory.java:306)
> ~[?:?]
>         at org.apache.karaf.util.XmlUtils.transformer(XmlUtils.java:154)
> ~[63:org.apache.karaf.deployer.blueprint:4.2.2]
>         at org.apache.karaf.util.XmlUtils.transform(XmlUtils.java:96)
> ~[63:org.apache.karaf.deployer.blueprint:4.2.2]
>         at org.apache.karaf.deployer.blueprint.BlueprintTransformer.analyze(BlueprintTransformer.java:129)
> ~[63:org.apache.karaf.deployer.blueprint:4.2.2]
>         at org.apache.karaf.deployer.blueprint.BlueprintTransformer.transform(BlueprintTransformer.java:71)
> ~[63:org.apache.karaf.deployer.blueprint:4.2.2]
>         at org.apache.karaf.deployer.blueprint.BlueprintURLHandler$Connection.getInputStream(BlueprintURLHandler.java:73)
> [63:org.apache.karaf.deployer.blueprint:4.2.2]
>         at java.net.URL.openStream(URL.java:1045) [?:?]
>         at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:962)
> [10:org.apache.felix.fileinstall:3.6.4]
>         at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:884)
> [10:org.apache.felix.fileinstall:3.6.4]
>         at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:489)
> [10:org.apache.felix.fileinstall:3.6.4]
>         at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365)
> [10:org.apache.felix.fileinstall:3.6.4]
>         at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316)
> [10:org.apache.felix.fileinstall:3.6.4]
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)